| 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..867f68ab2ca5a4ffab1b6d60b72ef9d6bcb2c825 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;
|
| @@ -187,7 +190,6 @@ bool IntersectionObservation::computeGeometry(
|
| // transforming them to the frame.
|
| if (m_shouldReportRootBounds)
|
| mapRootRectToRootFrameCoordinates(geometry.rootRect);
|
| -
|
| return true;
|
| }
|
|
|
|
|