Bug 943482 - remove a11y support of not existing xul:menulist@droppable, r=tbsaunde
authorAlexander Surkov <surkov.alexander@gmail.com>
Sat, 07 Dec 2013 00:40:02 -0500
changeset 175026 921be552b22f7affcffcac8d481c9f2cd2cf2dc7
parent 175025 5ac63cd8d6f4578329ee9bedc652e7994fd5ebb6
child 175027 33e4d9281b5dd50c23e1fd849427058923dcf876
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs943482
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 943482 - remove a11y support of not existing xul:menulist@droppable, r=tbsaunde
accessible/src/base/nsAccessibilityService.cpp
accessible/src/xul/XULFormControlAccessible.cpp
content/base/src/nsGkAtomList.h
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -1248,21 +1248,17 @@ nsAccessibilityService::CreateAccessible
 
   } else if (role.EqualsLiteral("xul:listitem")) {
     accessible = new XULListitemAccessible(aContent, aDoc);
 
   } else if (role.EqualsLiteral("xul:menubar")) {
     accessible = new XULMenubarAccessible(aContent, aDoc);
 
   } else if (role.EqualsLiteral("xul:menulist")) {
-      if (aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::droppable,
-                                nsGkAtoms::_false, eCaseMatters))
-      accessible = new XULTextFieldAccessible(aContent, aDoc);
-      else
-      accessible = new XULComboboxAccessible(aContent, aDoc);
+    accessible = new XULComboboxAccessible(aContent, aDoc);
 
   } else if (role.EqualsLiteral("xul:menuitem")) {
     accessible = new XULMenuitemAccessibleWrap(aContent, aDoc);
 
   } else if (role.EqualsLiteral("xul:menupopup")) {
 #ifdef MOZ_ACCESSIBILITY_ATK
     // ATK considers this node to be redundant when within menubars, and it makes menu
     // navigation with assistive technologies more difficult
--- a/accessible/src/xul/XULFormControlAccessible.cpp
+++ b/accessible/src/xul/XULFormControlAccessible.cpp
@@ -688,31 +688,18 @@ XULTextFieldAccessible::NativeState()
 
   nsCOMPtr<nsIContent> inputField(GetInputField());
   NS_ENSURE_TRUE(inputField, state);
 
   // Create a temporary accessible from the HTML text field to get
   // the accessible state from. Doesn't add to cache into document cache.
   nsRefPtr<HTMLTextFieldAccessible> tempAccessible =
     new HTMLTextFieldAccessible(inputField, mDoc);
-  if (!tempAccessible)
-    return state;
-
-  state |= tempAccessible->NativeState();
-
-  nsCOMPtr<nsIDOMXULMenuListElement> menuList(do_QueryInterface(mContent));
-  if (menuList) {
-    // <xul:menulist droppable="false">
-    if (!mContent->AttrValueIs(kNameSpaceID_None,
-                               nsGkAtoms::editable,
-                               nsGkAtoms::_true, eIgnoreCase)) {
-      state |= states::READONLY;
-    }
-  }
-
+  if (tempAccessible)
+    return state | tempAccessible->NativeState();
   return state;
 }
 
 role
 XULTextFieldAccessible::NativeRole()
 {
   if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
                             nsGkAtoms::password, eIgnoreCase))
@@ -825,23 +812,16 @@ XULTextFieldAccessible::FrameSelection()
 ////////////////////////////////////////////////////////////////////////////////
 // XULTextFieldAccessible protected
 
 already_AddRefed<nsIContent>
 XULTextFieldAccessible::GetInputField() const
 {
   nsCOMPtr<nsIDOMNode> inputFieldDOMNode;
   nsCOMPtr<nsIDOMXULTextBoxElement> textBox = do_QueryInterface(mContent);
-  if (textBox) {
+  if (textBox)
     textBox->GetInputField(getter_AddRefs(inputFieldDOMNode));
 
-  } else {
-    // <xul:menulist droppable="false">
-    nsCOMPtr<nsIDOMXULMenuListElement> menuList = do_QueryInterface(mContent);
-    if (menuList)
-      menuList->GetInputField(getter_AddRefs(inputFieldDOMNode));
-  }
-
   NS_ASSERTION(inputFieldDOMNode, "No input field for XULTextFieldAccessible");
 
   nsCOMPtr<nsIContent> inputField = do_QueryInterface(inputFieldDOMNode);
   return inputField.forget();
 }
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -2160,17 +2160,16 @@ GK_ATOM(columnheader, "columnheader")
 GK_ATOM(containerAtomic, "container-atomic")
 GK_ATOM(containerBusy, "container-busy")
 GK_ATOM(containerLive, "container-live")
 GK_ATOM(containerLiveRole, "container-live-role")
 GK_ATOM(containerRelevant, "container-relevant")
 GK_ATOM(cycles, "cycles")
 GK_ATOM(datatable, "datatable")
 GK_ATOM(directory, "directory")
-GK_ATOM(droppable, "droppable")
 GK_ATOM(eventFromInput, "event-from-input")
 GK_ATOM(grammar, "grammar")
 GK_ATOM(gridcell, "gridcell")
 GK_ATOM(heading, "heading")
 GK_ATOM(InlineBlockFrame, "InlineBlockFrame")
 GK_ATOM(inlinevalue, "inline")
 GK_ATOM(invalid, "invalid")
 GK_ATOM(item, "item")