WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
222588
Eliminate ScrollAnimatorGeneric::m_smoothAnimation
https://bugs.webkit.org/show_bug.cgi?id=222588
Summary
Eliminate ScrollAnimatorGeneric::m_smoothAnimation
Martin Robinson
Reported
2021-03-01 23:10:22 PST
The base class already contains a ScrollAnimationSmooth, so ScrollAnimatorGeneric can reuse that.
Attachments
Patch
(12.07 KB, patch)
2021-03-01 23:42 PST
,
Martin Robinson
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(11.96 KB, patch)
2021-03-01 23:55 PST
,
Martin Robinson
no flags
Details
Formatted Diff
Diff
Patch
(12.24 KB, patch)
2021-04-19 08:22 PDT
,
Martin Robinson
no flags
Details
Formatted Diff
Diff
Patch
(12.24 KB, patch)
2021-04-20 02:25 PDT
,
Martin Robinson
no flags
Details
Formatted Diff
Diff
Patch
(12.24 KB, patch)
2021-04-20 03:22 PDT
,
Martin Robinson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Martin Robinson
Comment 1
2021-03-01 23:42:01 PST
Created
attachment 421909
[details]
Patch
Martin Robinson
Comment 2
2021-03-01 23:55:47 PST
Created
attachment 421911
[details]
Patch
Chris Lord
Comment 3
2021-03-02 02:36:01 PST
Comment on
attachment 421911
[details]
Patch fwiw, this looks good to me. I find these class names quite confusing though... So we have ScrollAnimator for animating programmatic scrolls, then ScrollAnimatorGeneric for animating user-initiated scrolling? 'Generic' doesn't really imply that to me, something like ScrollAnimatorUserInitiated would make the distinction clearer.
Martin Robinson
Comment 4
2021-03-02 03:12:46 PST
(In reply to Chris Lord from
comment #3
)
> Comment on
attachment 421911
[details]
> Patch > > fwiw, this looks good to me. > > I find these class names quite confusing though... So we have ScrollAnimator > for animating programmatic scrolls, then ScrollAnimatorGeneric for animating > user-initiated scrolling? 'Generic' doesn't really imply that to me, > something like ScrollAnimatorUserInitiated would make the distinction > clearer.
Thanks for taking a look at this! The way I understand the ScrollAnimator / ScrollAnimatorGeneric split is that ScrollAnimator is an abstract parent class that knows hows animate things using platform-independent animations. Some implementations of this abstract class, such as ScrollAnimatorMac rely on platform-specific APIs to animate scrolling. ScrollAnimatorGeneric is another implementation that uses the ScrollAnimator fallbacks to scroll and also implements kinetic scrolling using cross-platform animations. What might make sense is to merge ScrollAnimatorGeneric into ScrollAnimator (making it also the fallback for kinetic scrolling) or to simply move kinetic scrolling into a new ScrollController so that it can also be used by the scrolling tree. This is what Mac does for rubber banding.
Chris Lord
Comment 5
2021-03-02 03:16:43 PST
(In reply to Martin Robinson from
comment #4
)
> (In reply to Chris Lord from
comment #3
) > > Comment on
attachment 421911
[details]
> > Patch > > > > fwiw, this looks good to me. > > > > I find these class names quite confusing though... So we have ScrollAnimator > > for animating programmatic scrolls, then ScrollAnimatorGeneric for animating > > user-initiated scrolling? 'Generic' doesn't really imply that to me, > > something like ScrollAnimatorUserInitiated would make the distinction > > clearer. > > Thanks for taking a look at this! > > The way I understand the ScrollAnimator / ScrollAnimatorGeneric split is > that ScrollAnimator is an abstract parent class that knows hows animate > things using platform-independent animations. Some implementations of this > abstract class, such as ScrollAnimatorMac rely on platform-specific APIs to > animate scrolling. > > ScrollAnimatorGeneric is another implementation that uses the ScrollAnimator > fallbacks to scroll and also implements kinetic scrolling using > cross-platform animations. What might make sense is to merge > ScrollAnimatorGeneric into ScrollAnimator (making it also the fallback for > kinetic scrolling) or to simply move kinetic scrolling into a new > ScrollController so that it can also be used by the scrolling tree. This is > what Mac does for rubber banding.
Thanks for the explanation, this makes sense - any idea that brings us closer to what Mac does is a good idea imo too :)
Martin Robinson
Comment 6
2021-03-02 09:53:16 PST
Comment on
attachment 421911
[details]
Patch Thanks for the review!
EWS
Comment 7
2021-03-02 09:57:58 PST
Committed
r273733
: <
https://commits.webkit.org/r273733
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 421911
[details]
.
Radar WebKit Bug Importer
Comment 8
2021-03-02 09:58:15 PST
<
rdar://problem/74934452
>
WebKit Commit Bot
Comment 9
2021-04-16 12:23:54 PDT
Re-opened since this is blocked by
bug 224686
Martin Robinson
Comment 10
2021-04-19 08:22:26 PDT
Created
attachment 426423
[details]
Patch
Martin Robinson
Comment 11
2021-04-19 08:23:44 PDT
The new version of this change adds the following lines in `ScrollAnimator::scroll`: 111 if (!m_scrollAnimation->isActive()) 112 m_scrollAnimation->setCurrentPosition(m_currentPosition); The check here is required or else the new scroll will stomp on the currently running animation. This is the behavior that ScrollAnimatorGeneric was using and now it is ported to ScrollAnimator.
Martin Robinson
Comment 12
2021-04-20 02:25:35 PDT
Created
attachment 426529
[details]
Patch
EWS
Comment 13
2021-04-20 03:21:01 PDT
Zan Dobersek found in /Volumes/Data/worker/Commit-Queue/build/Source/WebCore/ChangeLog does not appear to be a valid reviewer according to contributors.json. /Volumes/Data/worker/Commit-Queue/build/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Martin Robinson
Comment 14
2021-04-20 03:22:51 PDT
Created
attachment 426534
[details]
Patch
EWS
Comment 15
2021-04-20 03:54:45 PDT
Committed
r276299
(
236781@main
): <
https://commits.webkit.org/236781@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 426534
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug