Bug 1697091 - Ensure ResizeDirectManipulationViewport called on move/resize r=tnikkel
authorDoug Thayer <dothayer@mozilla.com>
Wed, 17 Mar 2021 21:12:53 +0000
changeset 571709 382fac4471058b89809bbfc5b1d22deab3ca5da9
parent 571708 6de8f8a159d683d1b1573dc26c0057cbe110b74d
child 571710 b5075bfc56f2d40b197261f2a3c80535443fa09f
push id138846
push userdothayer@mozilla.com
push dateWed, 17 Mar 2021 21:27:13 +0000
treeherderautoland@b5075bfc56f2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1697091
milestone88.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 1697091 - Ensure ResizeDirectManipulationViewport called on move/resize r=tnikkel We were skipping the initial ResizeDirectManipulationViewport call when the skeleton UI showed a maximized window, because it pseudo-ignores the first Move/Resize in order to not break the maximization. There's no reason ResizeDirectManipulationViewport should have been in the else clause - it just wasn't properly considered. Differential Revision: https://phabricator.services.mozilla.com/D108849
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -2059,19 +2059,19 @@ void nsWindow::Resize(double aWidth, dou
       VERIFY(
           ::SetWindowPos(mWnd, nullptr, 0, 0, width, GetHeight(height), flags));
 
       mResizeState = NOT_RESIZING;
       if (WinUtils::LogToPhysFactor(mWnd) != oldScale) {
         ChangedDPI();
       }
       SetThemeRegion();
-
-      ResizeDirectManipulationViewport();
-    }
+    }
+
+    ResizeDirectManipulationViewport();
   }
 
   if (aRepaint) Invalidate();
 
   NotifyRollupGeometryChange();
 }
 
 // Resize this component
@@ -2144,19 +2144,19 @@ void nsWindow::Resize(double aX, double 
       if (mTransitionWnd) {
         // If we have a fullscreen transition window, we need to make
         // it topmost again, otherwise the taskbar may be raised by
         // the system unexpectedly when we leave fullscreen state.
         ::SetWindowPos(mTransitionWnd, HWND_TOPMOST, 0, 0, 0, 0,
                        SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
       }
       SetThemeRegion();
-
-      ResizeDirectManipulationViewport();
-    }
+    }
+
+    ResizeDirectManipulationViewport();
   }
 
   if (aRepaint) Invalidate();
 
   NotifyRollupGeometryChange();
 }
 
 mozilla::Maybe<bool> nsWindow::IsResizingNativeWidget() {