RESOLVED FIXED 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
Summary [Web Animations] getKeyframes() for a CSS Animation should not use computed s...
Antoine Quint
Reported 2022-01-10 04:59:14 PST
getKeyframes() should not use the computed value for animated properties
Attachments
Patch (11.68 KB, patch)
2022-01-10 05:04 PST, Antoine Quint
koivisto: review+
ews-feeder: commit-queue-
Antoine Quint
Comment 1 2022-01-10 05:04:18 PST
Antti Koivisto
Comment 2 2022-01-10 06:00:02 PST
Comment on attachment 448734 [details] 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?
Antoine Quint
Comment 3 2022-01-10 07:05:37 PST
(In reply to Antti Koivisto from comment #2) > Comment on attachment 448734 [details] > 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. Cool! I'll change that. > Note that this does style resolution. I suppose it doesn't matter here that > this is slow? Not a concern at all. Would you have some tips to obtain a CSSValue with substituted variables? That's the last piece of this puzzle.
Antoine Quint
Comment 4 2022-01-10 07:09:26 PST
Radar WebKit Bug Importer
Comment 5 2022-01-10 07:10:23 PST
Note You need to log in before you can comment on or make changes to this bug.