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

Unified Diff: Source/core/dom/Element.cpp

Issue 610423004: Preserve fractional scroll offset for JS scrolling API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 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
« no previous file with comments | « LayoutTests/fast/scrolling/scrolling-apis-subpixel-expected.txt ('k') | Source/core/frame/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 008fb9055e6258dde22c6474eb0809919eb8d8ec..a3807aec2b78bdc81ec01a43bcb432c81df92be3 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -680,7 +680,7 @@ void Element::setScrollLeft(double newLeft)
if (!view)
return;
- view->setScrollPosition(IntPoint(roundf(newLeft * frame->pageZoomFactor()), view->scrollY()));
+ view->setScrollPosition(DoublePoint(newLeft * frame->pageZoomFactor(), view->scrollY()));
}
}
@@ -727,7 +727,7 @@ void Element::setScrollTop(double newTop)
if (!view)
return;
- view->setScrollPosition(IntPoint(view->scrollX(), roundf(newTop * frame->pageZoomFactor())));
+ view->setScrollPosition(DoublePoint(view->scrollX(), newTop * frame->pageZoomFactor()));
}
}
« no previous file with comments | « LayoutTests/fast/scrolling/scrolling-apis-subpixel-expected.txt ('k') | Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698