Backed out changeset 6fea732af766 (bug 1539984) for browser_PanelMultiView_keyboard.js failures CLOSED TREE
authorBogdan Tara <btara@mozilla.com>
Tue, 23 Apr 2019 06:41:42 +0300
changeset 470433 291b093ea26a97f55d0388a134f18dc50184192d
parent 470432 42c76408a8bdeea672dc5144c103cb34fe850b5f
child 470434 831918f009f63596fde1e532cc0f026d2e53cf78
push id35905
push userdvarga@mozilla.com
push dateTue, 23 Apr 2019 09:53:27 +0000
treeherdermozilla-central@831918f009f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1539984
milestone68.0a1
backs out6fea732af7666d74602f9ed66b71c742648f5389
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 6fea732af766 (bug 1539984) for browser_PanelMultiView_keyboard.js failures CLOSED TREE
browser/components/customizableui/PanelMultiView.jsm
browser/themes/shared/controlcenter/panel.inc.css
--- a/browser/components/customizableui/PanelMultiView.jsm
+++ b/browser/components/customizableui/PanelMultiView.jsm
@@ -1494,32 +1494,32 @@ var PanelView = class extends Associated
       this._arrowNavigableWalker : this._tabNavigableWalker;
     walker.currentNode = walker.root;
     this.selectedElement = walker.firstChild();
     if (skipBack && walker.currentNode
         && walker.currentNode.classList.contains("subviewbutton-back")
         && walker.nextNode()) {
       this.selectedElement = walker.currentNode;
     }
-    this.focusSelectedElement(/* byKey */ true);
+    this.focusSelectedElement();
   }
 
   /**
    * Focuses and moves keyboard selection to the last navigable element.
    * This is a no-op if there are no navigable elements.
    *
    * @param {Boolean} endKey   `true` if this is for the end key.
    */
   focusLastNavigableElement(endKey = false) {
     // The end key is conceptually similar to the up/down arrow keys.
     let walker = endKey ?
       this._arrowNavigableWalker : this._tabNavigableWalker;
     walker.currentNode = walker.root;
     this.selectedElement = walker.lastChild();
-    this.focusSelectedElement(/* byKey */ true);
+    this.focusSelectedElement();
   }
 
   /**
    * Based on going up or down, select the previous or next focusable element.
    *
    * @param {Boolean} isDown   whether we're going down (true) or up (false).
    * @param {Boolean} arrowKey   `true` if this is for the up/down arrow keys.
    *
@@ -1602,17 +1602,17 @@ var PanelView = class extends Associated
           break;
         }
         // Fall-through...
       case "Tab": {
         stop();
         let isDown = (keyCode == "ArrowDown") ||
                      (keyCode == "Tab" && !event.shiftKey);
         let button = this.moveSelection(isDown, keyCode != "Tab");
-        Services.focus.setFocus(button, Services.focus.FLAG_BYKEY);
+        button.focus();
         break;
       }
       case "Home":
         if (tabOnly()) {
           break;
         }
         stop();
         this.focusFirstNavigableElement(true);
@@ -1665,25 +1665,21 @@ var PanelView = class extends Associated
         this._doingKeyboardActivation = false;
         break;
       }
     }
   }
 
   /**
    * Focus the last selected element in the view, if any.
-   *
-   * @param byKey {Boolean} whether focus was moved by the user pressing a key.
-   *                        Needed to ensure we show focus styles in the right cases.
    */
-  focusSelectedElement(byKey = false) {
+  focusSelectedElement() {
     let selected = this.selectedElement;
     if (selected) {
-      let flag = byKey ? "FLAG_BYKEY" : "FLAG_BYELEMENTFOCUS";
-      Services.focus.setFocus(selected, Services.focus[flag]);
+      selected.focus();
     }
   }
 
   /**
    * Clear all traces of keyboard navigation happening right now.
    */
   clearNavigation() {
     let selected = this.selectedElement;
--- a/browser/themes/shared/controlcenter/panel.inc.css
+++ b/browser/themes/shared/controlcenter/panel.inc.css
@@ -365,17 +365,16 @@ description#identity-popup-content-verif
   margin: 0;
   padding-inline-start: 0;
 }
 
 .identity-popup-content-blocking-category:-moz-focusring,
 .identity-popup-content-blocking-category:hover {
   border-radius: 2px;
   background-color: var(--arrowpanel-dimmed);
-  outline: none;
 }
 
 .identity-popup-content-blocking-category:hover:active {
   background-color: var(--arrowpanel-dimmed-further);
 }
 
 .identity-popup-content-blocking-category::after {
   content: url(chrome://browser/skin/back-12.svg);