WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 232366
Add discrete animation support between PathOperations
https://bugs.webkit.org/show_bug.cgi?id=232366
Summary
Add discrete animation support between PathOperations
Kiet Ho
Reported
2021-10-26 20:31:46 PDT
Add discrete animation support between two PathOperations
Attachments
Patch
(85.02 KB, patch)
2021-10-26 21:05 PDT
,
Kiet Ho
no flags
Details
Formatted Diff
Diff
Patch
(85.37 KB, patch)
2021-10-27 14:02 PDT
,
Kiet Ho
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kiet Ho
Comment 1
2021-10-26 21:05:17 PDT
Created
attachment 442567
[details]
Patch
Myles C. Maxfield
Comment 2
2021-10-27 13:09:25 PDT
Comment on
attachment 442567
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442567&action=review
> Source/WebCore/ChangeLog:7 > +
Ideally there would be a description of the change here.
Simon Fraser (smfr)
Comment 3
2021-10-27 13:13:27 PDT
Comment on
attachment 442567
[details]
Patch r+ but please put some words in the changelog.
Myles C. Maxfield
Comment 4
2021-10-27 13:13:44 PDT
Comment on
attachment 442567
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442567&action=review
r=me assuming all CSS animations hitting this codepath expect this behavior.
> Source/WebCore/animation/CSSPropertyAnimation.cpp:274 > static inline RefPtr<PathOperation> blendFunc(PathOperation* from, PathOperation* to, const CSSPropertyBlendingContext& context)
Is this changing the behavior of all path animations, not just motion-path? (For example, will clip-path be affected by this change?) If so, are we confident that all CSS animations which will hit this codepath have the 50% swap behavior? The old behavior seemed pretty deliberate in its implementation of a 100% swap behavior.
Myles C. Maxfield
Comment 5
2021-10-27 13:16:14 PDT
Comment on
attachment 442567
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442567&action=review
> Source/WebCore/animation/CSSPropertyAnimation.cpp:1027 > + bool canInterpolate(const RenderStyle& from, const RenderStyle& to, CompositeOperation) const override
I don't see this called anywhere in this patch. Where is it called from?
Kiet Ho
Comment 6
2021-10-27 13:34:16 PDT
Comment on
attachment 442567
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=442567&action=review
>> Source/WebCore/ChangeLog:7 >> + > > Ideally there would be a description of the change here.
Will add, I thought this patch is small enough that just the bug title is enough.
>> Source/WebCore/animation/CSSPropertyAnimation.cpp:274 >> static inline RefPtr<PathOperation> blendFunc(PathOperation* from, PathOperation* to, const CSSPropertyBlendingContext& context) > > Is this changing the behavior of all path animations, not just motion-path? (For example, will clip-path be affected by this change?) > > If so, are we confident that all CSS animations which will hit this codepath have the 50% swap behavior? The old behavior seemed pretty deliberate in its implementation of a 100% swap behavior.
This will change the behavior of all path animations, including clip-path. This patch fixes a bunch of WPT clip-path interpolation test, so I'm confident this is correct. I talked to Antoine about this, and he said that "This code predates any notion of discrete animations, so yeah that function probably needs to be updated to account for this."
>> Source/WebCore/animation/CSSPropertyAnimation.cpp:1027 >> + bool canInterpolate(const RenderStyle& from, const RenderStyle& to, CompositeOperation) const override > > I don't see this called anywhere in this patch. Where is it called from?
This overrides AnimationPropertyWrapperBase::canInterpolate, which is called by CSSPropertyAnimation::canPropertyBeInterpolated, which is called by updateCSSTransitionsForStyleableAndProperty. CSS Transition uses canInterpolate to figure out if it's possible to have a transition or not. I quote Antoine below:
> this is where it is specified that when blending of two values is discrete no CSS Transition can be created, in Section 3 Starting of Transitions: > > When comparing the before-change style and after-change style for a given property, the property values are transitionable if they have an animation type that is neither not animatable nor discrete. > We implement this in updateCSSTransitionsForStyleableAndProperty() in Styleable.cpp with a call to CSSPropertyAnimation::canPropertyBeInterpolated()
Myles C. Maxfield
Comment 7
2021-10-27 13:53:07 PDT
Cool.
Kiet Ho
Comment 8
2021-10-27 14:02:49 PDT
Created
attachment 442633
[details]
Patch
EWS
Comment 9
2021-10-27 15:06:59 PDT
Committed
r284961
(
243613@main
): <
https://commits.webkit.org/243613@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 442633
[details]
.
Radar WebKit Bug Importer
Comment 10
2021-10-27 15:07:31 PDT
<
rdar://problem/84729545
>
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