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

Side by Side Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 23129015: Initialize RenderWidget(Host)(View)s with correct visibility state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix aura, improve comment in RWHI Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/tabs/tab_strip_model.h" 5 #include "chrome/browser/ui/tabs/tab_strip_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 // layout will be performed based on a width of 0 pixels, causing a 697 // layout will be performed based on a width of 0 pixels, causing a
698 // very long, narrow, inaccurate layout. Because some scripts on pages (as 698 // very long, narrow, inaccurate layout. Because some scripts on pages (as
699 // well as WebKit's anchor link location calculation) are run on the 699 // well as WebKit's anchor link location calculation) are run on the
700 // initial layout and not recalculated later, we need to ensure the first 700 // initial layout and not recalculated later, we need to ensure the first
701 // layout is performed with sane view dimensions even when we're opening a 701 // layout is performed with sane view dimensions even when we're opening a
702 // new background tab. 702 // new background tab.
703 if (WebContents* old_contents = GetActiveWebContents()) { 703 if (WebContents* old_contents = GetActiveWebContents()) {
704 if ((add_types & ADD_ACTIVE) == 0) { 704 if ((add_types & ADD_ACTIVE) == 0) {
705 contents->GetView()->SizeContents( 705 contents->GetView()->SizeContents(
706 old_contents->GetView()->GetContainerSize()); 706 old_contents->GetView()->GetContainerSize());
707 // We need to hide the contents or else we get and execute paints for
708 // background tabs. With enough background tabs they will steal the
709 // backing store of the visible tab causing flashing. See bug 20831.
Charlie Reis 2013/08/19 22:18:03 Maybe add 20831 to the BUG list of the CL? There
jamesr 2013/08/19 23:50:40 Done.
710 contents->WasHidden();
711 } 707 }
712 } 708 }
713 } 709 }
714 710
715 void TabStripModel::CloseSelectedTabs() { 711 void TabStripModel::CloseSelectedTabs() {
716 InternalCloseTabs(selection_model_.selected_indices(), 712 InternalCloseTabs(selection_model_.selected_indices(),
717 CLOSE_CREATE_HISTORICAL_TAB | CLOSE_USER_GESTURE); 713 CLOSE_CREATE_HISTORICAL_TAB | CLOSE_USER_GESTURE);
718 } 714 }
719 715
720 void TabStripModel::SelectNextTab() { 716 void TabStripModel::SelectNextTab() {
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 void TabStripModel::ForgetOpenersAndGroupsReferencing( 1281 void TabStripModel::ForgetOpenersAndGroupsReferencing(
1286 const WebContents* tab) { 1282 const WebContents* tab) {
1287 for (WebContentsDataVector::const_iterator i = contents_data_.begin(); 1283 for (WebContentsDataVector::const_iterator i = contents_data_.begin();
1288 i != contents_data_.end(); ++i) { 1284 i != contents_data_.end(); ++i) {
1289 if ((*i)->group == tab) 1285 if ((*i)->group == tab)
1290 (*i)->group = NULL; 1286 (*i)->group = NULL;
1291 if ((*i)->opener == tab) 1287 if ((*i)->opener == tab)
1292 (*i)->opener = NULL; 1288 (*i)->opener = NULL;
1293 } 1289 }
1294 } 1290 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | content/browser/renderer_host/render_view_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698