Bug 1451098 Part 2: Update nsView::DoResetWidgetBounds to check for empty rects returned from CalcWidgetBounds(). r=bz
authorBrad Werth <bwerth@mozilla.com>
Tue, 03 Apr 2018 12:27:02 -0700
changeset 470454 c0eacd0c16628a3cdd5eadc4ebf7807ccce3fb4d
parent 470453 4f5b6a619ca0ac514ef0e86f7ed90b1fa8bff1df
child 470455 84aa9286a0313e225c48b45b04bf4dc4f6478a9a
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1451098
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 1451098 Part 2: Update nsView::DoResetWidgetBounds to check for empty rects returned from CalcWidgetBounds(). r=bz 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);
   }