|
| 1 | +# CSS generated-pseudo animation source validation |
| 2 | + |
| 3 | +Issue #676 extends WebScene's retained, eight-track CSS animation runtime under |
| 4 | +#242 to generated `::before` and `::after` boxes. The originating element owns |
| 5 | +each bounded pseudo timeline and receives its animation event with the standard |
| 6 | +`pseudoElement` identity. No pseudo node or public ABI surface is introduced. |
| 7 | + |
| 8 | +## Cascade and retained state |
| 9 | + |
| 10 | +Animation shorthand and longhands cascade into the existing generated-pseudo |
| 11 | +style record. Each eligible generated box compiles its maximum eight tracks |
| 12 | +once after cascade, using the same bounded opacity, two-dimensional translate, |
| 13 | +scale, rotation, and filter keyframes as an ordinary element. The retained |
| 14 | +signature includes name, list-coordinated timing, delay, iteration, direction, |
| 15 | +fill, play state, and compiled stops. A changed signature restarts only that |
| 16 | +pseudo track; removing its rule, `content`, generated box, or originating |
| 17 | +element clears its contribution and queued completion. |
| 18 | + |
| 19 | +Sampling uses the host animation clock and the existing direction, fill, |
| 20 | +pause, finite, fractional, infinite, and zero-time phase rules. Retained scene |
| 21 | +commands bracket only that pseudo box for scale, rotation, and filters; |
| 22 | +translation adjusts its retained box coordinates and animated opacity applies |
| 23 | +to its generated paint. The principal element and the sibling pseudo box are |
| 24 | +not included in those effect brackets. |
| 25 | + |
| 26 | +## Ownership, lifecycle, and bounds |
| 27 | + |
| 28 | +`animationend` dispatches exactly once on the originating element with |
| 29 | +`pseudoElement` set to `::before` or `::after`. Identity mutation removes stale |
| 30 | +queued pseudo events. Disconnected owners do not advance or request frames; |
| 31 | +navigation and document teardown discard nodes, runtime tracks, and events. |
| 32 | +Paused, completed, and fill-only pseudo tracks remain static without host-frame |
| 33 | +demand. |
| 34 | + |
| 35 | +Cascade and keyframe compilation occur only when style changes. A frame scans |
| 36 | +at most eight retained tracks for each of the two generated boxes. Sampling |
| 37 | +does no selector matching, cascade, keyframe parsing, DOM construction, or |
| 38 | +visual-tree mutation. Allocation metrics include pseudo track and filter |
| 39 | +storage. |
| 40 | + |
| 41 | +## Evidence and deferred scope |
| 42 | + |
| 43 | +`test_generated_pseudo_animations_share_owner_lifecycle` covers a running |
| 44 | +`::before`, paused `::after`, retained midpoint transform paint, exact owner and |
| 45 | +`pseudoElement` completion data, static fill, rule/content removal, detach, and |
| 46 | +settled frame demand. The browser contract checks the same before/after |
| 47 | +midpoint and owner-event shape against standard browser semantics. |
| 48 | + |
| 49 | +Transitions on generated pseudo boxes, animationstart/animationiteration/ |
| 50 | +animationcancel expansion, CSS Animations on other pseudo types, Web Animations |
| 51 | +API pseudo targets, additive composition, and properties outside the existing |
| 52 | +bounded retained keyframe set remain deferred. Under the fast implementation |
| 53 | +policy, only `git diff --check` is executed. Native, browser, package, and |
| 54 | +unchanged Code OSS acceptance remain unexecuted. |
0 commit comments