[Webkit-unassigned] [Bug 75015] New: Setting scrollTop / scrollLeft should not cause a layout

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 21 10:35:21 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=75015

           Summary: Setting scrollTop / scrollLeft should not cause a
                    layout
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jchaffraix at webkit.org
                CC: dglazkov at chromium.org


Currently the setters for scrollTop and scrollLeft forces a layout each time they are called:

void Element::setScrollTop(int newTop)
{
    document()->updateLayoutIgnorePendingStylesheets();
    if (RenderBox* rend = renderBox())
        rend->setScrollTop(static_cast<int>(newTop * rend->style()->effectiveZoom()));
}

The only reason to do that is to be able to clamp the value to the height / width of the box (see the logic in RenderLayer).

This is confusing from a web-developer perspective and also the layout could be postponed until really necessary.

-- 
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