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

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

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address dcheng's comments Created 6 years 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: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 7a0ece3d6d78e04468e4e4c8f0377f5de92733f8..db69098979ef542195bad22014c8a4f0e31813d7 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -1945,17 +1945,18 @@ void FrameView::scrollToAnchor()
if (anchorNode != m_frame->document())
rect = anchorNode->boundingBox();
- RefPtrWillBeRawPtr<LocalFrame> boundaryFrame = m_frame->document()->findUnsafeParentScrollPropagationBoundary();
+ RefPtrWillBeRawPtr<Frame> boundaryFrame = m_frame->findUnsafeParentScrollPropagationBoundary();
- if (boundaryFrame)
- boundaryFrame->view()->setSafeToPropagateScrollToParent(false);
+ // FIXME: Handle RemoteFrames
+ if (boundaryFrame && boundaryFrame->isLocalFrame())
+ toLocalFrame(boundaryFrame.get())->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 (boundaryFrame && boundaryFrame->isLocalFrame())
+ toLocalFrame(boundaryFrame.get())->view()->setSafeToPropagateScrollToParent(true);
if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache())
cache->handleScrolledToAnchor(anchorNode.get());

Powered by Google App Engine
This is Rietveld 408576698