Backed out changeset 155281fd18fd (bug 1571461) for mochitest failures at test_general.xhtml. CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Tue, 24 Mar 2020 21:27:46 +0200
changeset 520264 be2533473311e2fc79d5917998d419c9cc479543
parent 520263 6aa798ae8615af885ebe9efc461db4d5b26f6d9f
child 520265 581560b069b4a21494b9f8b9953b0860034d0616
push id37246
push useropoprus@mozilla.com
push dateWed, 25 Mar 2020 03:40:33 +0000
treeherdermozilla-central@14b59d4adc95 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1571461
milestone76.0a1
backs out155281fd18fd0ca2bd27e5d8ceb583cf10055a22
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
Backed out changeset 155281fd18fd (bug 1571461) for mochitest failures at test_general.xhtml. CLOSED TREE
accessible/base/XULMap.h
toolkit/content/widgets/search-textbox.js
--- a/accessible/base/XULMap.h
+++ b/accessible/base/XULMap.h
@@ -40,17 +40,17 @@ XULMAP_TYPE(tooltip, XULTooltipAccessibl
 XULMAP(label, [](Element* aElement, Accessible* aContext) -> Accessible* {
   if (aElement->ClassList()->Contains(NS_LITERAL_STRING("text-link"))) {
     return new XULLinkAccessible(aElement, aContext->Document());
   }
   return new XULLabelAccessible(aElement, aContext->Document());
 })
 
 XULMAP(image, [](Element* aElement, Accessible* aContext) -> Accessible* {
-  if (nsCoreUtils::HasClickListener(aElement)) {
+  if (aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::onclick)) {
     return new XULToolbarButtonAccessible(aElement, aContext->Document());
   }
 
   // Don't include nameless images in accessible tree.
   if (!aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::tooltiptext)) {
     return nullptr;
   }
 
--- a/toolkit/content/widgets/search-textbox.js
+++ b/toolkit/content/widgets/search-textbox.js
@@ -115,21 +115,25 @@
 
     get timeout() {
       return parseInt(this.getAttribute("timeout")) || 500;
     }
 
     set searchButton(val) {
       if (val) {
         this.setAttribute("searchbutton", "true");
-        this._searchButtonIcon.removeAttribute("aria-hidden");
         this.removeAttribute("aria-autocomplete");
+        // Hack for the button to get the right accessible:
+        // If you update the 'onclick' event handler code within the
+        // _searchButtonIcon you also have to update the sha512 hash in the
+        // CSP of about:addons within extensions.xhtml.
+        this._searchButtonIcon.setAttribute("onclick", "true");
       } else {
         this.removeAttribute("searchbutton");
-        this._searchButtonIcon.setAttribute("aria-hidden", "true");
+        this._searchButtonIcon.removeAttribute("onclick");
         this.setAttribute("aria-autocomplete", "list");
       }
       return val;
     }
 
     get searchButton() {
       return this.getAttribute("searchbutton") == "true";
     }