summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 17:04:36 +0000
committercpu@chromium.org <cpu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 17:04:36 +0000
commitfa35c9c28bda4a9dcbe6ce5eb9533be87b74fbd6 (patch)
tree1052edf26a3f4d6f63b780cd74151d67e9b4f842
parentd95fa1894447a1b5b96c482f4bb0290e9983636b (diff)
downloadchromium_src-fa35c9c28bda4a9dcbe6ce5eb9533be87b74fbd6.zip
chromium_src-fa35c9c28bda4a9dcbe6ce5eb9533be87b74fbd6.tar.gz
chromium_src-fa35c9c28bda4a9dcbe6ce5eb9533be87b74fbd6.tar.bz2
Fix for the flashing of the front tab.
- The background tabs think they are visible causing paints to be executed. These steal the backing store from the visible tab Please read the bug for more info. BUG=20831 TEST= see bug for steps Review URL: http://codereview.chromium.org/199010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25739 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 2883cd0..3fd5af6 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -398,8 +398,14 @@ void TabStripModel::AddTabContents(TabContents* contents,
// layout is performed with sane view dimensions even when we're opening a
// new background tab.
if (TabContents* old_contents = GetSelectedTabContents()) {
- if (!foreground)
+ if (!foreground) {
+ contents->HideContents();
contents->view()->SizeContents(old_contents->view()->GetContainerSize());
+ // We need to hide the contents or else we get and execute paints for
+ // background tabs. With enough background tabs they will steal the
+ // backing store of the visible tab causing flashing. See bug 20831.
+
+ }
}
}