WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
118495
Page zoom/scale causes javascript auto scroll not work
https://bugs.webkit.org/show_bug.cgi?id=118495
Summary
Page zoom/scale causes javascript auto scroll not work
Chen Zhixiang
Reported
2013-07-09 01:10:12 PDT
When set page zoom/scale factor to a value < 1, then the JS code `element.content.scrollTop++` will be affected by this And the page auto scroll will not work. This problem exists in both newest Chrome 27 and Firefox 22. Reason for this: (1)In fact, zoom/scale operator should NOT apply to the point/position type, but only to the length type; (2)Or maybe we can change the internal DOM layput impl's type from int to double? (3)I had to say, the testcase expects a "continuous" style changing behavor, while discretized int-type values should always give a gap; void Element::setScrollTop(int newTop) { document()->updateLayoutIgnorePendingStylesheets(); if (RenderBox* rend = renderBox()) rend->setScrollTop(static_cast<int>(newTop * rend->style()->effectiveZoom())); //<--- }
Attachments
Testcase for this bug report
(1.11 KB, text/html)
2013-07-09 01:12 PDT
,
Chen Zhixiang
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Chen Zhixiang
Comment 1
2013-07-09 01:12:12 PDT
Created
attachment 206298
[details]
Testcase for this bug report Load this page, and change the page zoom to <1 value, then the auto scroll will stop working
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug