On Thu, Oct 30, 2014 at 3:55 PM, Robert O'Callahan <rob...@ocallahan.org> wrote:
> On Fri, Oct 31, 2014 at 11:32 AM, Jonas Sicking <jo...@sicking.cc> wrote:
>>
>> Another use case that's not well supported by the current spec text is
>> "smoothly scoll down by 50 pixels". The way you'd do that is to call
>> element.scrollBy({ top: 50, behavior: "smooth" }). However that
>> function call is defined as synchronously getting .scrollLeft from the
>> main thread, which means that you might perform an entirely different
>> scroll.
>
> That's true. I guess you want a third behavior for scrollBy, say "async", to
> handle this case. Oddly enough this actually matches a behavior we have
> internally. I believe that would handle the other cases you mentioned too.

Couldn't we simply change the defined behavior of element.scrollBy({
top: 50, behavior: "smooth" }) such that it sends the delta
coordinates to the composition thread, and adds the current scroll
position there instead of on the main thread?

Having a scrollBy function which doesn't actually scroll the current
position by the given delta seems like asking for trouble.

/ Jonas
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to