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); |
} |