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

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

Issue 400633005: Use LayoutUnit::fromFloatRound for setting scroll values (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/scroll-max-value-expected.txt ('k') | no next file » | 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 438e0a2b670744d44c94116f38379b5e31d74ef4..9a028feda3fa93351938554e53c44e05ce8ded0f 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -689,7 +689,7 @@ void Element::setScrollLeft(int newLeft)
if (document().documentElement() != this) {
if (RenderBox* rend = renderBox())
- rend->setScrollLeft(roundf(newLeft * rend->style()->effectiveZoom()));
+ rend->setScrollLeft(LayoutUnit::fromFloatRound(newLeft * rend->style()->effectiveZoom()));
return;
}
@@ -735,7 +735,7 @@ void Element::setScrollTop(int newTop)
if (document().documentElement() != this) {
if (RenderBox* rend = renderBox())
- rend->setScrollTop(roundf(newTop * rend->style()->effectiveZoom()));
+ rend->setScrollTop(LayoutUnit::fromFloatRound(newTop * rend->style()->effectiveZoom()));
return;
}
« no previous file with comments | « LayoutTests/fast/scrolling/scroll-max-value-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698