Summary: | Relative font size values (em) within CSS animations compound | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Scott Kellum <scott> | ||||||||||||||
Component: | Animations | Assignee: | Nobody <webkit-unassigned> | ||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||
Severity: | Critical | CC: | dino, graouts, graouts, koivisto, litherum, mail, scott, simon.fraser, webkit-bug-importer, zalan | ||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||
Version: | Safari 12 | ||||||||||||||||
Hardware: | All | ||||||||||||||||
OS: | All | ||||||||||||||||
URL: | https://codepen.io/scottkellum/pen/7c4e82c2744e9dfc0caf706bc525d83f?editors=1100 | ||||||||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=156684 https://bugs.webkit.org/show_bug.cgi?id=194765 https://bugs.webkit.org/show_bug.cgi?id=213125 |
||||||||||||||||
Attachments: |
|
Description
Scott Kellum
2019-02-16 14:05:18 PST
Note on importance: This is a blocker/critical for me because I’m building a fluid typesetting system on top of animations and users want to set text in ems, preventing easy integrations into some websites. Possibly related bug: https://bugs.webkit.org/show_bug.cgi?id=194765 Different bug. This one reproduces without Web Animations enabled. We're not resolving 'em' styles correctly in animation keyframes. This has already caused a lot of frustration on my end. Typo centered layout design is dependent on this to work correctly :( Created attachment 401543 [details]
patch
Created attachment 401544 [details]
patch
Sooo many new WPT PASS results! Created attachment 401635 [details]
patch
Created attachment 401640 [details]
patch
Created attachment 401720 [details]
patch
Created attachment 401721 [details]
patch
Comment on attachment 401721 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=401721&action=review > LayoutTests/animations/keyframe-em-unit.html:5 > +div { > + font-size: 2em; > + animation: div 3s infinite alternate; > +} You can make the duration any value and add `freeze` to ensure the animated style will override the base style. You can remove `alternate` for sure. > Source/WebCore/style/StyleTreeResolver.cpp:324 > + // FIXME: Remove this hack and pass the parent style via updateCSSAnimationsForElement. Can you file a bug and assign it to me to do this refactor? Committed r262946: <https://trac.webkit.org/changeset/262946> All reviewed patches have been landed. Closing bug and clearing flags on attachment 401721 [details]. |