[webkit-dev] [CSSOM View] Smooth scroll behavior via CSS property / DOM scroll* API
fwang at igalia.com
Tue Dec 10 08:52:21 PST 2019
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
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
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,
on the one that already exists on GTK for smooth scrolling.
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
review it given I wrote most of this code. Also, it's probably not
efficient approach and ports should probably rely on any existing
platform API to animate scrolling when available. However, it is a
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).
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
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.
On 14/11/2018 19:58, Frédéric Wang wrote:
> Hi all,
> The main implementation is now submitted for review at:
> 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 . 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 . When behavior is auto, the instant/smooth
>> characteristic is actually taken from the value of a new CSS
>> scroll-behavior property . 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 .
>> Incidentally (and since that was convenient to do it before) I also
>> added some basic support for new ScrollIntoView options   that
>> allow to specify how you want the revealed element to be aligned with
>> respect to its scrollable ancestors.
>>  https://drafts.csswg.org/cssom-view
>>  https://drafts.csswg.org/cssom-view/#dictdef-scrolloptions
>>  https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior
>>  https://bugs.webkit.org/show_bug.cgi?id=188043
>>  https://bugs.webkit.org/show_bug.cgi?id=189258
>>  https://drafts.csswg.org/cssom-view/#dictdef-scrollintoviewoptions
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev