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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.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/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index bc3ab68c3224a822d95c125fd48b2e22d2e619da..8dfaf9b20dfcc91e38f442b836d7af75357170b9 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -458,16 +458,25 @@ bool LayoutView::mapToVisualRectInAncestorSpace(
rect.move(offsetForFixedPosition(true));
// Apply our transform if we have one (because of full page zooming).
- if (!ancestor && layer() && layer()->transform())
+ if (layer() && layer()->transform())
rect = layer()->transform()->mapRect(rect);
- ASSERT(ancestor);
if (ancestor == this)
return true;
Element* owner = document().localOwner();
- if (!owner)
+ if (!owner) {
+ // This is the case of a Frame with a remote parent.
+ if (!document().frame()->isMainFrame()) {
+ DCHECK(!ancestor);
+ LayoutRect viewportIntersectionRect(
+ frameView()->remoteViewportIntersection());
+ rect.intersect(viewportIntersectionRect);
+ if (rect.isEmpty())
+ return false;
+ }
return true;
+ }
if (LayoutBox* obj = owner->layoutBox()) {
if (!(mode & InputIsInFrameCoordinates)) {

Powered by Google App Engine
This is Rietveld 408576698