Bug 1574016. Fix logic error in patch from bug 1547277. r=bradwerth
authorTimothy Nikkel <tnikkel@gmail.com>
Thu, 15 Aug 2019 01:28:11 +0000
changeset 488168 f5cc355f51aa846cbb998b5d49bafc2ead3bfa53
parent 488167 2e7460e2a73e061e3bc75646dc7d8b5e76943160
child 488169 05a7f106aada858b64772765a7c180ed06e36e27
push id36437
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:33:18 +0000
treeherdermozilla-central@44aac6fc3352 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbradwerth
bugs1574016, 1547277
milestone70.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 1574016. Fix logic error in patch from bug 1547277. r=bradwerth The fixed still worked because we get another SetBounds call right after with the same bounds. But it does mean we are doing some useless invalidation. Differential Revision: https://phabricator.services.mozilla.com/D42059
layout/base/nsDocumentViewer.cpp
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2092,17 +2092,17 @@ void nsDocumentViewer::SetPreviousViewer
   mPreviousViewer = aViewer;
 }
 
 NS_IMETHODIMP
 nsDocumentViewer::SetBoundsWithFlags(const nsIntRect& aBounds,
                                      uint32_t aFlags) {
   NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_AVAILABLE);
 
-  bool boundsChanged = mBounds.IsEqualEdges(aBounds);
+  bool boundsChanged = !mBounds.IsEqualEdges(aBounds);
   mBounds = aBounds;
 
   if (mWindow && !mAttachedToParent) {
     // Resize the widget, but don't trigger repaint. Layout will generate
     // repaint requests during reflow.
     mWindow->Resize(aBounds.x, aBounds.y, aBounds.width, aBounds.height, false);
   } else if (mPresContext && mViewManager) {
     // Ensure presContext's deviceContext is up to date, as we sometimes get