Bug 1226102 - Fix focus selection with F6. r=IanN a=IanN CLOSED TREE
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Thu, 11 Aug 2016 22:21:56 +0200
changeset 27261 db96791b7cb205f4e9bed6767820be21454c7777
parent 27260 22f02b328e4a23a119f35b5737b4d2f08aacae94
child 27262 e8030ba9c303a113807005927d421d847dbb7835
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1226102, 1132518
Bug 1226102 - Fix focus selection with F6. r=IanN a=IanN CLOSED TREE See Bug 1132518.
suite/browser/navigator.js
suite/browser/navigator.xul
suite/browser/unix/platformNavigationBindings.xul
suite/browser/win/platformNavigationBindings.xul
--- a/suite/browser/navigator.js
+++ b/suite/browser/navigator.js
@@ -2209,27 +2209,16 @@ function stylesheetSwitchAll(frameset, t
     stylesheetSwitchAll(frameset.frames[i], title);
   }
 }
 
 function setStyleDisabled(disabled) {
   getMarkupDocumentViewer().authorStyleDisabled = disabled;
 }
 
-function focusNextFrame(aEvent)
-{
-  var fm = Components.classes["@mozilla.org/focus-manager;1"]
-                     .getService(Components.interfaces.nsIFocusManager);
-  var dir = aEvent.shiftKey ? fm.MOVEFOCUS_BACKWARDDOC
-                            : fm.MOVEFOCUS_FORWARDDOC;
-  var element = fm.moveFocus(window, null, dir, fm.FLAG_BYKEY);
-  if (element && element.ownerDocument == document)
-    ShowAndSelectContentsOfURLBar();
-}
-
 function URLBarFocusHandler(aEvent)
 {
   if (gIgnoreFocus)
     gIgnoreFocus = false;
   else if (gClickSelectsAll)
     gURLBar.select();
 }
 
--- a/suite/browser/navigator.xul
+++ b/suite/browser/navigator.xul
@@ -32,16 +32,17 @@
         titlemodifier="&mainWindow.titlemodifier;" 
         titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
         titleprivate="&mainWindow.titleprivate;"
         toggletoolbar="true"
         lightweightthemes="true"
         lightweightthemesfooter="status-bar"
         windowtype="navigator:browser"
         macanimationtype="document"
+        retargetdocumentfocus="urlbar"
         drawtitle="true"
         persist="screenX screenY width height sizemode"> 
 
   <!-- Generic Utility -->
   <script type="application/javascript" src="chrome://global/content/nsUserSettings.js"/>
   <script type="application/javascript" src="chrome://global/content/nsClipboard.js"/>
   <script type="application/javascript" src="chrome://global/content/viewSourceUtils.js"/>
 
--- a/suite/browser/unix/platformNavigationBindings.xul
+++ b/suite/browser/unix/platformNavigationBindings.xul
@@ -24,14 +24,11 @@
     <key keycode="VK_F5" oncommand="BrowserReload();"/>
     <key keycode="VK_F5" modifiers="control" oncommand="BrowserReloadSkipCache();"/>
 
     <!-- Specific keybinding for Sun keyboard -->
     <key id="goHome" keycode="VK_HOME" oncommand="BrowserHome();" modifiers="alt"/>
     <key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
     <key id="key_newTabWithTargetBg" keycode="VK_INSERT" command="cmd_newTabWithTarget"/>
     <key id="key_newTabWithTargetFg" keycode="VK_INSERT" modifiers="alt" command="cmd_newTabWithTarget"/>
-
-    <!-- Location bar -->
-    <key keycode="VK_F6" oncommand="focusNextFrame(event);" modifiers="shift any"/>
   </keyset>
 
 </overlay>
--- a/suite/browser/win/platformNavigationBindings.xul
+++ b/suite/browser/win/platformNavigationBindings.xul
@@ -20,14 +20,11 @@
     <key keycode="VK_F5" oncommand="BrowserReload();"/>
     <key keycode="VK_F5" modifiers="control" oncommand="BrowserReloadSkipCache();"/>
 
     <key id="goHome" keycode="VK_HOME" oncommand="BrowserHome();" modifiers="alt"/>
 
     <key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
     <key id="key_newTabWithTargetBg" keycode="VK_INSERT" command="cmd_newTabWithTarget"/>
     <key id="key_newTabWithTargetFg" keycode="VK_INSERT" modifiers="alt" command="cmd_newTabWithTarget"/>
-
-    <!-- Location bar -->
-    <key keycode="VK_F6" oncommand="focusNextFrame(event);" modifiers="shift any"/>
   </keyset>
 
 </overlay>