WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
207760
[Web Animations] Style changes due to Web Animations should not trigger CSS Transitions
https://bugs.webkit.org/show_bug.cgi?id=207760
Summary
[Web Animations] Style changes due to Web Animations should not trigger CSS T...
Antoine Quint
Reported
2020-02-14 07:13:01 PST
[Web Animations] Use running animations unaniamted style when considering new CSS Transitions
Attachments
Patch
(28.26 KB, patch)
2020-02-14 07:39 PST
,
Antoine Quint
simon.fraser
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-02-14 07:14:32 PST
<
rdar://problem/59458111
>
Antoine Quint
Comment 2
2020-02-14 07:39:15 PST
Created
attachment 390767
[details]
Patch
Antoine Quint
Comment 3
2020-02-14 07:40:10 PST
Note that the patch for review is _not_ expected to build since it depends on the one for
bug 207629
and
bug 207364
. We can retry it once it lands, but the "WIP Patch" for
bug 207364
contained all of the code and showed positive bot results.
Simon Fraser (smfr)
Comment 4
2020-02-14 08:43:56 PST
Comment on
attachment 390767
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=390767&action=review
> LayoutTests/ChangeLog:3 > + [Web Animations] Use running animations unanimated style when considering new CSS Transitions
Should this be "Use running animation's unanimated style when considering new CSS Transitions"? It's a bit hard to parse. I think it's more like "Style changes due to Web Animations should not trigger transitions".
> Source/WebCore/animation/KeyframeEffect.cpp:786 > +bool KeyframeEffect::animatesProperty(CSSPropertyID property) const > +{ > + if (!m_blendingKeyframes.isEmpty()) > + return m_blendingKeyframes.properties().contains(property); > + > + for (auto& keyframe : m_parsedKeyframes) { > + for (auto keyframeProperty : keyframe.unparsedStyle.keys()) { > + if (keyframeProperty == property) > + return true; > + } > + } > + return false; > +}
I wonder if this will become a perf bottleneck. People do make keyframe animations with hundreds of keyframes.
Antoine Quint
Comment 5
2020-02-14 10:00:28 PST
(In reply to Simon Fraser (smfr) from
comment #4
)
> Comment on
attachment 390767
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=390767&action=review
> > > LayoutTests/ChangeLog:3 > > + [Web Animations] Use running animations unanimated style when considering new CSS Transitions > > Should this be "Use running animation's unanimated style when considering > new CSS Transitions"? It's a bit hard to parse. > > I think it's more like "Style changes due to Web Animations should not > trigger transitions".
Much better.
> > Source/WebCore/animation/KeyframeEffect.cpp:786 > > +bool KeyframeEffect::animatesProperty(CSSPropertyID property) const > > +{ > > + if (!m_blendingKeyframes.isEmpty()) > > + return m_blendingKeyframes.properties().contains(property); > > + > > + for (auto& keyframe : m_parsedKeyframes) { > > + for (auto keyframeProperty : keyframe.unparsedStyle.keys()) { > > + if (keyframeProperty == property) > > + return true; > > + } > > + } > > + return false; > > +} > > I wonder if this will become a perf bottleneck. People do make keyframe > animations with hundreds of keyframes.
Some more considerations: 1. We'll stop iterating as soon as we find the opacity in one keyframe, hopefully sooner than later, good chance we'll find it right on the first keyframe 2. This only happens for cases where both a transition and a running animation for the same property are specified 3. On top of the previous point, this only happens if the running animation has _not_ yet been applied, at any further point the blending keyframes will be resolved and we take the faster path 4. Finally this only applies to JS-created Web Animations, since CSS Animations have their unanimated style set right away since they're created during style resolution I don't think all of those points are likely to happen all at once outside of specific testing situations, but I could be wrong. If that happens, we can probably find a way to improve on this.
Antoine Quint
Comment 6
2020-02-14 11:00:21 PST
Committed
r256627
: <
https://trac.webkit.org/changeset/256627
>
Antoine Quint
Comment 7
2020-02-24 02:49:54 PST
***
Bug 203081
has been marked as a duplicate of this bug. ***
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