[Webkit-unassigned] [Bug 118495] New: Page zoom/scale causes javascript auto scroll not work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 9 01:08:11 PDT 2013


           Summary: Page zoom/scale causes javascript auto scroll not work
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: chenzx at cn.fujitsu.com

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)
    if (RenderBox* rend = renderBox())
        rend->setScrollTop(static_cast<int>(newTop * rend->style()->effectiveZoom())); //<---

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list