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

Unified Diff: chrome/browser/ui/views/ash/tab_scrubber.cc

Issue 2656983005: Fix the TabScrubber always starting from the first tab in full screen mode. (Closed)
Patch Set: Created 3 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
Index: chrome/browser/ui/views/ash/tab_scrubber.cc
diff --git a/chrome/browser/ui/views/ash/tab_scrubber.cc b/chrome/browser/ui/views/ash/tab_scrubber.cc
index 72b39b71878fffd6f2185851403fb9db477dcf75..45eb1abae9bf0fbc36dc6d3c8f3c703dc240c210 100644
--- a/chrome/browser/ui/views/ash/tab_scrubber.cc
+++ b/chrome/browser/ui/views/ash/tab_scrubber.cc
@@ -234,9 +234,9 @@ void TabScrubber::BeginScrub(Browser* browser,
browser_ = browser;
tab_strip_ = browser_view->tabstrip();
- Direction direction = (x_offset < 0) ? LEFT : RIGHT;
- ScrubDirectionChanged(direction);
-
+ // The browser's top view must be revealed first, before we attempt to get the
+ // start point, otherwise that tab's bounds we get in GetStartPoint() will be
+ // wrong.
James Cook 2017/01/27 23:21:27 nice comment
afakhry 2017/01/28 00:48:21 Thanks!
ImmersiveModeController* immersive_controller =
browser_view->immersive_mode_controller();
if (immersive_controller->IsEnabled()) {
@@ -244,6 +244,9 @@ void TabScrubber::BeginScrub(Browser* browser,
ImmersiveModeController::ANIMATE_REVEAL_YES));
}
+ Direction direction = (x_offset < 0) ? LEFT : RIGHT;
+ ScrubDirectionChanged(direction);
+
tab_strip_->AddObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698