W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [cssom-view] Add a "smooth" parameter to scrollTo and scrollBy functions

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 19 Mar 2013 11:14:27 -0700
Message-ID: <CAAWBYDCHLQ1ekU-oMu1yM0Tft4PatgtB30w-qStvfHv_15bmag@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style list <www-style@w3.org>
On Tue, Mar 19, 2013 at 11:07 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 3/19/13 1:46 PM, Tab Atkins Jr. wrote:
>> Thus, I propose that we amend the existing scrollTo and scrollBy
>> functions in CSSOM View to take a third parameter: an optional
>> "smooth" string.  If omitted, the scroll is instant.
> So Gecko internally has:
>   enum ScrollMode { INSTANT, SMOOTH, NORMAL };
> INSTANT is what scrollTo and scrollBy do.  NORMAL is done as one scroll, but
> possibly async.  SMOOTH will do smooth scrolling if the user has that
> enabled, and behave like NORMAL otherwise.
> There's also a comment:
>     * If an INSTANT request happens while a smooth or async scroll is
> already in
>     * progress, the async scroll is interrupted and we instantly scroll to
> the
>     * destination.
> So clearly supporting "smooth" as described (at the level of detail
> described) would not be too hard.  The questions I have are:
> 1)  Do we want an equivalent to NORMAL?

Is this accessible directly in any way from author code in Gecko?  Or
is it just a mode for handling the "author requests smooth scrolling,
but user doesn't want it" case?

> 2)  I believe it's it's important to keep the user override that turns
>     SMOOTH into NORMAL if the user so chooses.

Sounds very reasonable.

> 3)  The behavior of scrolls while another scroll is pending would
>     obviously need to be defined.
> Probably lots of other details to sort out, but in general this is a good
> idea.


Received on Tuesday, 19 March 2013 18:15:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC