Bug 1451098 Part 2: Update nsView::DoResetWidgetBounds to check for empty rects returned from CalcWidgetBounds(). draft
authorBrad Werth <bwerth@mozilla.com>
Tue, 03 Apr 2018 12:27:02 -0700
changeset 776808 41bad8d12f6605f7bf4a6927796a53e96e418797
parent 776807 49a00dfb356fe43dbaac6659dae77f7465b77e30
child 776829 459726776ef295ce14254b2f00edd421cbf71f5b
push id105004
push userbwerth@mozilla.com
push dateTue, 03 Apr 2018 19:42:10 +0000
bugs1451098
milestone61.0a1
Bug 1451098 Part 2: Update nsView::DoResetWidgetBounds to check for empty rects returned from CalcWidgetBounds(). MozReview-Commit-ID: F9Mkf9Yjf07
view/nsView.cpp
--- a/view/nsView.cpp
+++ b/view/nsView.cpp
@@ -328,16 +328,17 @@ void nsView::DoResetWidgetBounds(bool aM
   bool invisiblePopup = type == eWindowType_popup &&
                         ((curBounds.IsEmpty() && mDimBounds.IsEmpty()) ||
                          mVis == nsViewVisibility_kHide);
 
   if (invisiblePopup) {
     // We're going to hit the early exit below, avoid calling CalcWidgetBounds.
   } else {
     newBounds = CalcWidgetBounds(type);
+    invisiblePopup = newBounds.IsEmpty();
   }
 
   bool curVisibility = widget->IsVisible();
   bool newVisibility = IsEffectivelyVisible();
   if (curVisibility && !newVisibility) {
     widget->Show(false);
   }