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

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: Mimic old behavior in WebViewImpl Created 5 years, 9 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 4813badfa6d09a11e38a60368f9a39cb94f5f401..4e69deb1124d0c7aea28c89db8e2b0b366a524e0 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -719,7 +719,7 @@ int Element::scrollWidth()
{
document().updateLayoutIgnorePendingStylesheets();
if (LayoutBox* box = layoutBox())
- return adjustLayoutUnitForAbsoluteZoom(box->scrollWidth(), *box).toDouble();
+ return adjustLayoutUnitForAbsoluteZoom(box->scrollWidth(), *box).round();
return 0;
}
@@ -727,7 +727,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