[webkit-reviews] review denied: [Bug 217709] Make isUserScrollInProgress supporting more user scroll actions : [Attachment 411325] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 15 10:10:18 PDT 2020


Simon Fraser (smfr) <simon.fraser at apple.com> has denied cathiechen
<cathiechen at igalia.com>'s request for review:
Bug 217709: Make isUserScrollInProgress supporting more user scroll actions
https://bugs.webkit.org/show_bug.cgi?id=217709

Attachment 411325: Patch

https://bugs.webkit.org/attachment.cgi?id=411325&action=review




--- Comment #3 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 411325
  --> https://bugs.webkit.org/attachment.cgi?id=411325
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=411325&action=review

> Source/WebCore/page/AutoscrollController.cpp:69
> +    if (!renderbox)
> +	   return;
> +    if (renderbox->isRenderView()) {
> +	  
renderbox->view().frameView().scrollAnimator().setUserScrollInProgress(inProgre
ss);
> +	   return;
> +    }
> +    if (renderbox->layer())
> +	  
renderbox->layer()->scrollAnimator().setUserScrollInProgress(inProgress);
> +}

Should this really call setUserScrollInProgress on both? We only ever scroll
one thing at a time, so not sure if this is necessary. Also, what about all the
overflow:scroll that might be between this renderBox and the view?

> Source/WebCore/page/AutoscrollController.cpp:297
> +    updateScrollActionState(m_autoscrollRenderer, true);

Unclear what "true" means here.

> Source/WebCore/platform/ScrollAnimator.h:127
> -    virtual bool isUserScrollInProgress() const { return false; }
> +    void setUserScrollInProgress(bool);
> +    virtual bool isUserScrollInProgress() const { return
m_scrollActionsInProgress; }

Currently ScrollController has isUserScrollInProgress() (but ScrollAnimator has
a virtual function, and ScrollAnimatorMac just overrides it to call its
m_scrollController, which is confusing. But storing additional state in
ScrollAnimator is now spreading state around in too many places. I think this
needs a cleaner solution.

I've never liked the ScrollAnimator/ScrollController split. Maybe it's time to
decide on a good design for that.

> Source/WebCore/platform/ScrollView.cpp:544
> +    scrollAnimator().setUserScrollInProgress(true);

How do we know this is a user scroll here?

> Source/WebCore/rendering/RenderLayer.cpp:4168
> +    scrollAnimator().setUserScrollInProgress(true);

Do we know this is a user scroll here?

There's also ambiguity with ScrollableArea::currentScrollType(). What's the
distinction between that and setUserScrollInProgress()?


More information about the webkit-reviews mailing list