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

Unified Diff: third_party/WebKit/Source/web/FindInPageCoordinates.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/FindInPageCoordinates.cpp
diff --git a/third_party/WebKit/Source/web/FindInPageCoordinates.cpp b/third_party/WebKit/Source/web/FindInPageCoordinates.cpp
index e05aa70bcb9219ebc344d7bc9b921cfffca69f9d..a182d293e886938677e8ade9ddc10de2971dda7a 100644
--- a/third_party/WebKit/Source/web/FindInPageCoordinates.cpp
+++ b/third_party/WebKit/Source/web/FindInPageCoordinates.cpp
@@ -91,9 +91,10 @@ static FloatRect toNormalizedRect(const FloatRect& absoluteRect,
// Fixed positions do not make sense in this coordinate system, but need to leave consistent tickmarks.
// So, use their position when the view is not scrolled, like an absolute position.
if (layoutObject->style()->position() == FixedPosition &&
- container->isLayoutView())
+ container->isLayoutView()) {
normalizedRect.moveBy(
bokan 2016/10/02 19:47:51 move()
szager1 2016/10/05 07:43:36 Done.
- -toLayoutView(container)->frameView()->scrollPosition());
+ -FloatPoint(toLayoutView(container)->frameView()->scrollOffset()));
+ }
normalizedRect.scale(1 / containerRect.width(), 1 / containerRect.height());
return normalizedRect;

Powered by Google App Engine
This is Rietveld 408576698