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

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObservation.cpp

Issue 2431473003: Intersection Observer support for OOPIF (Closed)
Patch Set: Fixed test issue Created 4 years, 1 month 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: 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..3cb835cb6681cc96dcf31ff6ac946856eb311a10 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
@@ -64,7 +64,8 @@ void IntersectionObservation::clipToRoot(IntersectionGeometry& geometry) const {
LayoutObject* targetLayoutObject = target()->layoutObject();
geometry.doesIntersect = targetLayoutObject->mapToVisualRectInAncestorSpace(
- rootLayoutObject, geometry.intersectionRect, EdgeInclusive);
+ toLayoutBox(m_observer->rootLayoutObjectForIntersection()),
+ geometry.intersectionRect, EdgeInclusive);
if (rootLayoutObject->hasOverflowClip())
geometry.intersectionRect.move(-rootLayoutObject->scrolledContentOffset());
@@ -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;

Powered by Google App Engine
This is Rietveld 408576698