Bug 1503745: Make widgets with empty bounds consistently hide themselves. r=karlt a=lizzard
authorBrad Werth <bwerth@mozilla.com>
Mon, 04 Feb 2019 06:51:50 +0000
changeset 516158 5f890c9359edaa25ed64bf38b089b4a98c0ab396
parent 516157 d1fb2e847334af3bf461d28d350ceda7074be92b
child 516159 2a50443802ba4760f9846ba8acc1835712c17bd6
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt, lizzard
bugs1503745
milestone66.0
Bug 1503745: Make widgets with empty bounds consistently hide themselves. r=karlt a=lizzard Previously, popup widgets with empty bounds would not be hidden. Non-popup GTK widgets with empty bounds would be hidden during ResizeClient(). Skipping the resize for popups is only appropriate when they are hidden. Differential Revision: https://phabricator.services.mozilla.com/D17394
view/nsView.cpp
--- a/view/nsView.cpp
+++ b/view/nsView.cpp
@@ -311,17 +311,17 @@ void nsView::DoResetWidgetBounds(bool aM
   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();
+  bool newVisibility = !invisiblePopup && IsEffectivelyVisible();
   if (curVisibility && !newVisibility) {
     widget->Show(false);
   }
 
   if (invisiblePopup) {
     // Don't manipulate empty or hidden popup widgets. For example there's no
     // point moving hidden comboboxes around, or doing X server roundtrips
     // to compute their true screen position. This could mean that