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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 1566313002: Remove layout during paint in Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: With sky's changes to fake controller Created 4 years, 11 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 | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 8313719bd8881a6c1db6df5af3d1ee5abd372b52..f0e0722e0bed1e3637b37cb55e46f2eeb9d679ab 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -545,6 +545,7 @@ bool Tab::IsActive() const {
void Tab::ActiveStateChanged() {
OnButtonColorMaybeChanged();
media_indicator_button_->UpdateEnabledForMuteToggle();
+ Layout();
}
bool Tab::IsSelected() const {
@@ -1176,18 +1177,9 @@ void Tab::DataChanged(const TabRendererData& old) {
}
void Tab::PaintTab(gfx::Canvas* canvas) {
- // See if the model changes whether the icons should be painted.
- const bool show_icon = ShouldShowIcon();
- const bool show_media_indicator = ShouldShowMediaIndicator();
- const bool show_close_button = ShouldShowCloseBox();
- if (show_icon != showing_icon_ ||
- show_media_indicator != showing_media_indicator_ ||
- show_close_button != showing_close_button_)
- Layout();
-
PaintTabBackground(canvas);
- if (show_icon)
+ if (showing_icon_)
PaintIcon(canvas);
}
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698