[webkit-dev] [CSSOM View] Smooth scroll behavior via CSS property / DOM scroll* API

Frédéric Wang fwang at igalia.com
Tue Dec 10 08:52:21 PST 2019


Hi everybody,

Cathie has taken over my work on this. In order to facilitate review, we
decided to split the patch into three parts. If there is no opposition,
we'll probably go ahead and land (1) and (2) below. But in any case, we
need approval from Apple reviewers on (3).

(1) Introduce CSS/IDL changes under a new preference flag
    https://bugs.webkit.org/show_bug.cgi?id=205009

    I already r+ed this part and I think Simon Fraser had reviewed this part
    before so I don't expect it to be controversial. The only question is
    whether it makes sense to land this before the rest of the
implementation
    is done. I guess it is ok to take it with (2) in any case.

(2) Implement a generic animator class running in the scrolling thread,
based
    on the one that already exists on GTK for smooth scrolling.
    https://bugs.webkit.org/show_bug.cgi?id=204882

    Simon has also partially reviewed this piece and modulo minor changes I
    think it looks good to me too. The issue here is that I'm not sure I
should
    review it given I wrote most of this code. Also, it's probably not
the most
    efficient approach and ports should probably rely on any existing
    platform API to animate scrolling when available. However, it is a
necessary
    fallback and the preference flag is turned off for now, so I think it is
    safe to take this for now...

(3) Implement scroll animator in the UI process for iOS, based on native
    platform support (UIScrollView).
    https://bugs.webkit.org/show_bug.cgi?id=204936

    This part hasn't been reviewed yet although the general design has been
    discussed with Simon. Alternatively, this patch can be taken before (2)
    since the two are more or less independent and each one really only
depends
    on (1).

I'm interested to hear about suggestions to rely on native scroll
animations for other ports. However, this can probably be done in
follow-up patches. Web developers really requested support on iOS and it
seems very important to have (3) for that port.

Thank you,


On 14/11/2018 19:58, Frédéric Wang wrote:
> Hi all,
>
> The main implementation is now submitted for review at:
> https://bugs.webkit.org/show_bug.cgi?id=188043
>
> It has some issue with smooth scrolling via scrollIntoView on nested
> scrollers but I don't plan to work on this until the main part is
> merged. See https://bugs.webkit.org/show_bug.cgi?id=189907
>
> On 20/09/2018 22:26, Frédéric Wang wrote:
>> Hi all,
>>
>> This email is to announce that I have started to work on (programmatic)
>> smooth scrolling in WebKit from the CSSOM View specification [1]. To use
>> this effect, web developers can pass a behavior parameter (auto, smooth,
>> or instant) to Element.scroll, Element.scrollTo, Element.scrollBy,
>> Element.scrollIntoView, Window.scroll, Window.scrollTo or
>> Window.scrollBy [2]. When behavior is auto, the instant/smooth
>> characteristic is actually taken from the value of a new CSS
>> scroll-behavior property [3]. This new feature will be protected by a
>> compile flag (enabled by default) and a runtime flag (an experimental
>> feature). If you are interested, you can follow advancement on Bugzilla [4].
>>
>> Incidentally (and since that was convenient to do it before) I also
>> added some basic support for new ScrollIntoView options [5] [6] that
>> allow to specify how you want the revealed element to be aligned with
>> respect to its scrollable ancestors.
>>
>> Cheers,
>>
>>
>> Frédéric
>>
>> [1] https://drafts.csswg.org/cssom-view
>> [2] https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
>> [3] https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior
>> [4] https://bugs.webkit.org/show_bug.cgi?id=188043
>> [5] https://bugs.webkit.org/show_bug.cgi?id=189258
>> [6] https://drafts.csswg.org/cssom-view/#dictdef-scrollintoviewoptions
>>
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> https://lists.webkit.org/mailman/listinfo/webkit-dev
>

-- 
Frédéric Wang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20191210/1326811d/attachment.htm>


More information about the webkit-dev mailing list