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

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

Issue 1007013002: Make scrollWidth and scrollHeight match other DOM measurement APIs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add additional test expectation Created 5 years, 8 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: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 778ecdfd7218e53761ddd96d16305c1e385d4335..71191c2d41e13f567b68072831047999af2ca051 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -799,7 +799,7 @@ int Element::scrollWidth()
{
document().updateLayoutIgnorePendingStylesheets();
if (LayoutBox* box = layoutBox())
- return adjustLayoutUnitForAbsoluteZoom(box->scrollWidth(), *box).toDouble();
+ return adjustLayoutUnitForAbsoluteZoom(box->scrollWidth(), *box).round();
return 0;
}
@@ -807,7 +807,7 @@ int Element::scrollHeight()
{
document().updateLayoutIgnorePendingStylesheets();
if (LayoutBox* box = layoutBox())
- return adjustLayoutUnitForAbsoluteZoom(box->scrollHeight(), *box).toDouble();
+ return adjustLayoutUnitForAbsoluteZoom(box->scrollHeight(), *box).round();
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698