[csswg-drafts] [cssom-view] Restore `"instant"` IDL enum value of ScrollBehavior (#7773)

saschanaz has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Restore `"instant"` IDL enum value of ScrollBehavior ==
#3074 removed "instant" from the IDL, arguing that it's removed from `scroll-behavior` CSS property. But that enum value is not for CSS but for scroll APIs and is still supported on all engines including Gecko, Blink, and WebKit. It's behavior is different from `"auto"`, per https://w3c.github.io/csswg-drafts/cssom-view-1/#perform-a-scroll:

> 2. If the user agent honors the [scroll-behavior](https://w3c.github.io/csswg-drafts/css-overflow-3/#propdef-scroll-behavior) property and one of the following are true:
> 
>     * behavior is "auto" and element is not null and its computed value of the [scroll-behavior](https://w3c.github.io/csswg-drafts/css-overflow-3/#propdef-scroll-behavior) property is [smooth](https://w3c.github.io/csswg-drafts/css-overflow-3/#valdef-scroll-behavior-smooth)
>     * behavior is smooth 
> 
>    ...then perform a [smooth scroll](https://w3c.github.io/csswg-drafts/cssom-view-1/#concept-smooth-scroll) of box to position. Once the position has finished updating, emit the [scrollend](https://w3c.github.io/csswg-drafts/cssom-view-1/#eventdef-document-scrollend) event. Otherwise, perform an [instant scroll](https://w3c.github.io/csswg-drafts/cssom-view-1/#concept-instant-scroll) of box to position. After an instant scroll emit the scrollend event.

Passing `"instant"` allows devs to force instant scroll regardless of `scroll-behavior` property.

Hi @tabatkins, I think you were confused there, what do you think?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7773 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 22 September 2022 01:58:06 UTC