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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: rebase 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/FindInPageCoordinates.cpp
diff --git a/third_party/WebKit/Source/web/FindInPageCoordinates.cpp b/third_party/WebKit/Source/web/FindInPageCoordinates.cpp
index fb0f337f35e8a5074f214fd9e34845c05c22fa10..c8ed56dff03a580443c3ffc187d9c2896b81a585 100644
--- a/third_party/WebKit/Source/web/FindInPageCoordinates.cpp
+++ b/third_party/WebKit/Source/web/FindInPageCoordinates.cpp
@@ -96,9 +96,9 @@ static FloatRect toNormalizedRect(const FloatRect& absoluteRect,
// leave consistent tickmarks. So, use their position when the view is not
// scrolled, like an absolute position.
if (layoutObject->style()->position() == FixedPosition &&
- container->isLayoutView())
- normalizedRect.moveBy(
- -toLayoutView(container)->frameView()->scrollPosition());
+ container->isLayoutView()) {
+ normalizedRect.move(-toLayoutView(container)->frameView()->scrollOffset());
+ }
normalizedRect.scale(1 / containerRect.width(), 1 / containerRect.height());
return normalizedRect;

Powered by Google App Engine
This is Rietveld 408576698