[webkit-reviews] review granted: [Bug 235028] [Web Animations] getKeyframes() for a CSS Animation should not use computed style for keyframes (part 2) : [Attachment 448734] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 10 06:00:02 PST 2022


Antti Koivisto <koivisto at iki.fi> has granted Antoine Quint
<graouts at webkit.org>'s request for review:
Bug 235028: [Web Animations] getKeyframes() for a CSS Animation should not use
computed style for keyframes (part 2)
https://bugs.webkit.org/show_bug.cgi?id=235028

Attachment 448734: Patch

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




--- Comment #2 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 448734
  --> https://bugs.webkit.org/attachment.cgi?id=448734
Patch

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

> Source/WebCore/animation/KeyframeEffect.cpp:674
> +		   if (m_pseudoId == PseudoId::None)
> +		       return styleResolver.styleRulesForElement(target,
Style::Resolver::AllCSSRules);
> +		   return styleResolver.pseudoStyleRulesForElement(target,
m_pseudoId, Style::Resolver::AllCSSRules);

You can just call pseudoStyleRulesForElement with PseudoId::None.

Note that this does style resolution. I suppose it doesn't matter here that
this is slow?


More information about the webkit-reviews mailing list