[Webkit-unassigned] [Bug 5991] [CSSOM View] Implement standard behavior for scroll(Left/Top/Width/Height/To/By/ingElement)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 24 01:41:51 PDT 2017


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

Frédéric Wang (:fredw) <fred.wang at free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darin at apple.com
            Summary|scrollLeft/Top on the root  |[CSSOM View] Implement
                   |element should scroll the   |standard behavior for
                   |document                    |scroll(Left/Top/Width/Heigh
                   |                            |t/To/By/ingElement)

--- Comment #14 from Frédéric Wang (:fredw) <fred.wang at free.fr> ---
The issue with scrollTop/scrollLeft is actually a specific case of a general problem with that WebKit does not align on the CSSOM View Module [1], especially for quirks VS non-quirks modes. Hence I am renaming this bug to make it more explicit.

There are some tests in the W3C test suite [2] that we should probably import. In particular, the following tests are relevant:
* scrollingElement.html
* scrolling-quirks-vs-nonquirks.html

Chromium has a scrollLeftTopInterop runtime flag to implement the behavior specified in CSSOM View. Comparing Blink and WebKit code (dom/Element.cpp and dom/Document.cpp), I essentially see the following differences:

1) Chromium implements the spec's "If document is not the active document" for scrollLeft/Top (getting & setting), scrollTo/By and scrollWidth/Height. WebKit does not do that but I think it would be safe to change it without breaking existing page. I am not exactly sure how to test it, though.

2) Chromium implements the spec's behavior of scrollingElement, which can be be the root, the body or null. WebKit always returns the body (bug 143609).

3) For scroll(Left/Top/Width/Height/To/By), Chromium has specific cases to perform the operation on viewport when the element is the scrollingElement, corresponding to the "element == body or root" cases in the spec. WebKit always performs the operation on the element itself.

I believe it would not be hard to import code from Chromium into WebKit in order to implement the standard behavior. The main issue I see is that it may break existing pages. AFAIK, Google still has not enabled the scrollLeftTopInterop flag for that reason [3]. @Rick: Can you please indicate the latest update on this?

[1] https://drafts.csswg.org/cssom-view/
[2] http://w3c-test.org/cssom-view/
[3] https://bugs.chromium.org/p/chromium/issues/detail?id=157855#c110

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170424/1a5e12c1/attachment.html>


More information about the webkit-unassigned mailing list