Bug 1574016. Fix logic error in patch from bug 1547277. r=bradwerth, a=RyanVM
authorTimothy Nikkel <tnikkel@gmail.com>
Thu, 15 Aug 2019 01:28:11 +0000
changeset 545230 3749ea604ad9274259291efdc86eddd4a8b8192b
parent 545229 e04819022cb11281277c013c6041edc88d6e6fdc
child 545231 79ab9ee7d7e9714c21874dd237660ac8ee7872c7
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbradwerth, RyanVM
bugs1574016, 1547277
milestone69.0
Bug 1574016. Fix logic error in patch from bug 1547277. r=bradwerth, a=RyanVM 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