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

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

Issue 1994203003: Apply scroll offset and content box offset before recursing in mapAncestorToLocal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c8edc685b37ecdab67cf653bcef12374d76d1757..deca6e0e88b7dbe2d78fd744d2b5056f73ee96e4 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObservation.cpp
@@ -94,7 +94,7 @@ void IntersectionObservation::mapTargetRectToTargetFrameCoordinates(LayoutRect&
{
LayoutObject& targetLayoutObject = *target()->layoutObject();
Document& targetDocument = target()->document();
- LayoutSize scrollPosition = LayoutSize(toIntSize(targetDocument.view()->scrollPosition()));
+ LayoutSize scrollPosition = LayoutSize(targetDocument.view()->scrollOffset());
mapRectUpToDocument(rect, targetLayoutObject, targetDocument);
rect.move(-scrollPosition);
}
@@ -103,7 +103,7 @@ void IntersectionObservation::mapRootRectToRootFrameCoordinates(LayoutRect& rect
{
LayoutObject& rootLayoutObject = *m_observer->rootLayoutObject();
Document& rootDocument = rootLayoutObject.document();
- LayoutSize scrollPosition = LayoutSize(toIntSize(rootDocument.view()->scrollPosition()));
+ LayoutSize scrollPosition = LayoutSize(rootDocument.view()->scrollOffset());
mapRectUpToDocument(rect, rootLayoutObject, rootLayoutObject.document());
rect.move(-scrollPosition);
}
@@ -112,7 +112,7 @@ void IntersectionObservation::mapRootRectToTargetFrameCoordinates(LayoutRect& re
{
LayoutObject& rootLayoutObject = *m_observer->rootLayoutObject();
Document& targetDocument = target()->document();
- LayoutSize scrollPosition = LayoutSize(toIntSize(targetDocument.view()->scrollPosition()));
+ LayoutSize scrollPosition = LayoutSize(targetDocument.view()->scrollOffset());
if (&targetDocument == &rootLayoutObject.document())
mapRectUpToDocument(rect, rootLayoutObject, targetDocument);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698