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

Unified Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 years, 2 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
Index: third_party/WebKit/Source/web/LinkHighlightImpl.cpp
diff --git a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
index 496dda7a88013ecd58873c8237ae444d19086452..77810d59ee4c3db5ab40151035ab870de9a05403 100644
--- a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
+++ b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
@@ -261,11 +261,10 @@ bool LinkHighlightImpl::computeHighlightLayerPathAndPosition(
// Scrolling content layers have the same offset from layout object as the non-scrolling layers. Thus we need
// to adjust for their scroll offset.
if (m_isScrollingGraphicsLayer) {
- DoubleSize adjustedScrollOffset = paintInvalidationContainer.layer()
- ->getScrollableArea()
- ->offsetFromOrigin();
- absoluteQuad.move(adjustedScrollOffset.width(),
- adjustedScrollOffset.height());
+ FloatPoint scrollPosition = paintInvalidationContainer.layer()
+ ->getScrollableArea()
+ ->absolutePosition();
+ absoluteQuad.move(toScrollOffset(scrollPosition));
}
// Transform node quads in target absolute coords to local coordinates in the compositor layer.

Powered by Google App Engine
This is Rietveld 408576698