| Index: third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| index c9c04457e5ea67c7f176de9f8542466870e0c392..1f612eb1b7041ce707aa1d7fe55492d097848368 100644
|
| --- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
|
| @@ -53,6 +53,7 @@ void IntersectionObservation::initializeRootRect(LayoutRect& rect) const {
|
| else
|
| rect = LayoutRect(
|
| toLayoutBoxModelObject(rootLayoutObject)->borderBoundingBox());
|
| + m_observer->intersectWithRemoteAncestorsIfNeeded(rect);
|
| applyRootMargin(rect);
|
| }
|
|
|
| @@ -131,8 +132,10 @@ static bool isContainingBlockChainDescendant(LayoutObject* descendant,
|
| LocalFrame* ancestorFrame = ancestor->document().frame();
|
| LocalFrame* descendantFrame = descendant->document().frame();
|
|
|
| - if (ancestor->isLayoutView())
|
| - return descendantFrame && descendantFrame->tree().top() == ancestorFrame;
|
| + if (ancestor->isLayoutView()) {
|
| + return descendantFrame &&
|
| + descendantFrame->localFrameRoot() == ancestorFrame;
|
| + }
|
|
|
| if (ancestorFrame != descendantFrame)
|
| return false;
|
|
|