Bug 1456616 - Remove suppressFocusScroll from nsXULCommandDispatcher;r=bz
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 24 Apr 2018 13:22:12 -0700
changeset 468997 c3ce5469b3ae507082792fdd206f43af41b62c88
parent 468996 83c1e6e742fd39d81cce344396df9e98885a395c
child 468998 eb4c9a9c7320474ca9690fd23414f336d40f32b5
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1456616
milestone61.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 1456616 - Remove suppressFocusScroll from nsXULCommandDispatcher;r=bz This attribute doesn't do anything. MozReview-Commit-ID: FnshlyyAms5
devtools/client/shared/widgets/VariablesView.jsm
devtools/client/shared/widgets/view-helpers.js
dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl
dom/xul/nsXULCommandDispatcher.cpp
--- a/devtools/client/shared/widgets/VariablesView.jsm
+++ b/devtools/client/shared/widgets/VariablesView.jsm
@@ -762,17 +762,16 @@ VariablesView.prototype = {
    *         in this view was focused instead.
    */
   _focusChange: function(aDirection) {
     let commandDispatcher = this.document.commandDispatcher;
     let prevFocusedElement = commandDispatcher.focusedElement;
     let currFocusedItem = null;
 
     do {
-      commandDispatcher.suppressFocusScroll = true;
       commandDispatcher[aDirection]();
 
       // Make sure the newly focused item is a part of this view.
       // If the focus goes out of bounds, revert the previously focused item.
       if (!(currFocusedItem = this.getFocusedItem())) {
         prevFocusedElement.focus();
         return false;
       }
--- a/devtools/client/shared/widgets/view-helpers.js
+++ b/devtools/client/shared/widgets/view-helpers.js
@@ -1128,17 +1128,16 @@ const WidgetMethods = exports.WidgetMeth
    *         in this container was focused instead.
    */
   _focusChange: function(direction) {
     let commandDispatcher = this._commandDispatcher;
     let prevFocusedElement = commandDispatcher.focusedElement;
     let currFocusedElement;
 
     do {
-      commandDispatcher.suppressFocusScroll = true;
       commandDispatcher[direction]();
       currFocusedElement = commandDispatcher.focusedElement;
 
       // Make sure the newly focused item is a part of this container. If the
       // focus goes out of bounds, revert the previously focused item.
       if (!this.getItemForElement(currFocusedElement)) {
         prevFocusedElement.focus();
         return false;
--- a/dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl
+++ b/dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl
@@ -25,15 +25,14 @@ interface nsIDOMXULCommandDispatcher : n
   void                      updateCommands(in DOMString eventName);
 
   nsIController             getControllerForCommand(in string command);
   nsIControllers            getControllers();
 
   void advanceFocus();
   void rewindFocus();
   void advanceFocusIntoSubtree(in nsIDOMElement elt);
-  attribute boolean suppressFocusScroll;
 
   // When locked, command updating is batched until unlocked. Always ensure that
   // lock and unlock is called in a pair.
   void lock();
   void unlock();
 };
--- a/dom/xul/nsXULCommandDispatcher.cpp
+++ b/dom/xul/nsXULCommandDispatcher.cpp
@@ -448,29 +448,16 @@ nsXULCommandDispatcher::GetControllerFor
   nsCOMPtr<nsPIWindowRoot> root = GetWindowRoot();
   NS_ENSURE_TRUE(root, NS_ERROR_FAILURE);
 
   return root->GetControllerForCommand(aCommand, false /* for any window */,
                                        _retval);
 }
 
 NS_IMETHODIMP
-nsXULCommandDispatcher::GetSuppressFocusScroll(bool* aSuppressFocusScroll)
-{
-  *aSuppressFocusScroll = false;
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsXULCommandDispatcher::SetSuppressFocusScroll(bool aSuppressFocusScroll)
-{
-  return NS_OK;
-}
-
-NS_IMETHODIMP
 nsXULCommandDispatcher::Lock()
 {
   // Since locking is used only as a performance optimization, we don't worry
   // about nested lock calls. If that does happen, it just means we will unlock
   // and process updates earlier.
   mLocked = true;
   return NS_OK;
 }