Summary: | [Web Animations] getKeyframes() for a CSS Animation should not use computed style for keyframes (part 2) | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||
Component: | Animations | Assignee: | Antoine Quint <graouts> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | dino, graouts, koivisto, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=235008 | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 235138 | ||||||
Attachments: |
|
Description
Antoine Quint
2022-01-10 04:59:14 PST
Created attachment 448734 [details]
Patch
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? (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. Committed r287835 (245887@trunk): <https://commits.webkit.org/245887@trunk> |