| Index: Source/core/frame/FrameView.cpp
|
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
|
| index 06f3a1bcf93d61e257292119d2d34d596fbee8f7..80e9b1a5e42f210b9f718e7c4c8af4ed20063fae 100644
|
| --- a/Source/core/frame/FrameView.cpp
|
| +++ b/Source/core/frame/FrameView.cpp
|
| @@ -1968,17 +1968,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());
|
|
|