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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 627663003: Merge 182954 "Don't bubble scrolls across boundary when scrollin..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2171/
Patch Set: Created 6 years, 2 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 | « LayoutTests/http/tests/navigation/resources/focus-shifting-frame-with-anchor.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
===================================================================
--- Source/core/frame/FrameView.cpp (revision 183206)
+++ Source/core/frame/FrameView.cpp (working copy)
@@ -1815,10 +1815,18 @@
if (anchorNode != m_frame->document())
rect = anchorNode->boundingBox();
+ RefPtrWillBeRawPtr<LocalFrame> boundaryFrame = m_frame->document()->findUnsafeParentScrollPropagationBoundary();
+
+ if (boundaryFrame)
+ boundaryFrame->view()->setSafeToPropagateScrollToParent(false);
+
// Scroll nested layers and frames to reveal the anchor.
// Align to the top and to the closest side (this matches other browsers).
anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways);
+ if (boundaryFrame)
+ boundaryFrame->view()->setSafeToPropagateScrollToParent(true);
+
if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache())
cache->handleScrolledToAnchor(anchorNode.get());
« no previous file with comments | « LayoutTests/http/tests/navigation/resources/focus-shifting-frame-with-anchor.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698