Bug 310030
| Summary: | [css-animations] animation-fill-mode: forwards not resolved during print | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brandon <brandonstewart> |
| Component: | Printing | Assignee: | Brandon <brandonstewart> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brandon
When printing, CSS animations with animation-fill-mode: forwards don't
resolve to their final state. Elements that animated from opacity: 0 to
opacity: 1 remain invisible in print output.
The updateAnimations lambda in StyleTreeResolver bailed out entirely when
document->printing() was true, which skipped updateCSSAnimations(). This
meant animation objects weren't maintained across the screen-to-print
media type transition, and for test infrastructure paths where
setPrinting() is called before first render, animations were never
created at all.
Restructure the guard so that only transitions and scroll/view timelines
are skipped during print (irrelevant for paginated media), while
updateCSSAnimations() is always called. This is safe because
updateCSSAnimations() is a no-op when the animation list hasn't changed.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Brandon
<rdar://36901701>
Brandon
Pull request: https://github.com/WebKit/WebKit/pull/60700
EWS
Committed 309488@main (06f70dafd01f): <https://commits.webkit.org/309488@main>
Reviewed commits have been landed. Closing PR #60700 and removing active labels.