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

Unified Diff: content/browser/web_contents/aura/overscroll_navigation_overlay.cc

Issue 2102283002: Gesture Nav: Protect against the case when navigation completes as soon as it is requested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: content/browser/web_contents/aura/overscroll_navigation_overlay.cc
diff --git a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
index 56e4a42d90f29081a5cef533d59374381dd8f43a..e5e2019d223d977ce9c96489f49e0188db760615 100644
--- a/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
+++ b/content/browser/web_contents/aura/overscroll_navigation_overlay.cc
@@ -223,6 +223,14 @@ void OverscrollNavigationOverlay::OnOverscrollCompleted(
return;
}
+ main_window->SetTransform(gfx::Transform());
+ window_ = std::move(window);
+ // Make sure the window is in its default position.
+ window_->SetBounds(gfx::Rect(web_contents_window_->bounds().size()));
+ window_->SetTransform(gfx::Transform());
+ // Make sure the overlay window is on top.
+ web_contents_window_->StackChildAtTop(window_.get());
+
// Make sure we can navigate first, as other factors can trigger a navigation
// during an overscroll gesture and navigating without history produces a
// crash.
@@ -247,13 +255,6 @@ void OverscrollNavigationOverlay::OnOverscrollCompleted(
StartObserving();
}
- main_window->SetTransform(gfx::Transform());
- window_ = std::move(window);
- // Make sure the window is in its default position.
- window_->SetBounds(gfx::Rect(web_contents_window_->bounds().size()));
- window_->SetTransform(gfx::Transform());
- // Make sure the overlay window is on top.
- web_contents_window_->StackChildAtTop(window_.get());
direction_ = NONE;
StopObservingIfDone();
}

Powered by Google App Engine
This is Rietveld 408576698