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

Unified Diff: chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.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 | « no previous file | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc
diff --git a/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc
index 2ea2fb84ca99558ad566b3549f024bd00e777332..5054a372df1d1b389e39447971847afb1fdfad78 100644
--- a/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.cc
@@ -66,9 +66,13 @@ bool FakeBaseTabStripController::IsNewTabPage(int index) const {
}
void FakeBaseTabStripController::SelectTab(int index) {
- if (!IsValidIndex(index))
+ if (!IsValidIndex(index) || active_index_ == index)
return;
+ ui::ListSelectionModel old_selection_model;
+ old_selection_model.SetSelectedIndex(active_index_);
active_index_ = index;
+ selection_model_.SetSelectedIndex(active_index_);
+ tab_strip_->SetSelection(old_selection_model, selection_model_);
}
void FakeBaseTabStripController::ExtendSelectionTo(int index) {
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698