Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 3142034: Fixes bug where Layout might not get invoked on view hosting (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index e0e836305cde894038d92364b9b291960944b813..79c27dd6323bc7a632ce6a692e08e30b69b15028 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -190,6 +190,10 @@ class BrowserView::ContentsContainer : public views::View {
preview_->SetBounds(0, 0, 0, 0);
}
}
+
+ // Need to invoke views::View in case any views whose bounds didn't change
+ // still need a layout.
+ views::View::Layout();
}
private:
@@ -836,6 +840,11 @@ void BrowserView::SelectedTabToolbarSizeChanged(bool is_animating) {
contents_container_->SetFastResize(false);
} else {
UpdateUIForContents(browser_->GetSelectedTabContents());
+ // When transitioning from animating to not animating we need to make sure
+ // the contents_container_ gets layed out. If we don't do this and the
+ // bounds haven't changed contents_container_ won't get a Layout out and
+ // we'll end up with a gray rect because the clip wasn't updated.
+ contents_container_->InvalidateLayout();
contents_split_->Layout();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698