Commit 004e0cf1 authored by eae@chromium.org's avatar eae@chromium.org

Fix scrollWidth/Height to not truncate scroll offset

Fix bug in Element::scrollWidth/scrollHeight where the scroll offset
was truncated to an integer value before being adjusted for zoom.

TEST=fast/sub-pixel/clientwidth-matches-scrollwidth-for-float.html
BUG=381039

Review URL: https://codereview.chromium.org/319633004

git-svn-id: svn://svn.chromium.org/blink/trunk@175698 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent adaec547
......@@ -804,7 +804,7 @@ double Element::scrollWidth()
{
document().updateLayoutIgnorePendingStylesheets();
if (RenderBox* rend = renderBox())
return adjustForAbsoluteZoom(rend->scrollWidth(), rend);
return adjustLayoutUnitForAbsoluteZoom(rend->scrollWidth(), *rend).toDouble();
return 0;
}
......@@ -812,7 +812,7 @@ double Element::scrollHeight()
{
document().updateLayoutIgnorePendingStylesheets();
if (RenderBox* rend = renderBox())
return adjustForAbsoluteZoom(rend->scrollHeight(), rend);
return adjustLayoutUnitForAbsoluteZoom(rend->scrollHeight(), *rend).toDouble();
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment