diff --git a/docs/validation/css-animation-play-state-665-242.md b/docs/validation/css-animation-play-state-665-242.md new file mode 100644 index 00000000..7e373159 --- /dev/null +++ b/docs/validation/css-animation-play-state-665-242.md @@ -0,0 +1,55 @@ +# CSS animation play-state source validation + +Issue #665 adds bounded `animation-play-state` behavior to WebScene's existing +single-animation opacity, `rotate()`, and compatible foreground-filter keyframe +runtime under #242. The first longhand list item and first shorthand animation +accept `running` or `paused`. `animationPlayState`, the kebab-case CSSOM name, +`getPropertyValue("animation-play-state")`, shorthand serialization, mutation, +and clearing expose the retained value without an ABI or AppScene change. + +## Held timeline contract + +Play state remains outside keyframe identity. A running-to-paused mutation stores +one bounded host timestamp on the node's existing animation runtime. Opacity, +rotation, and filter tracks sample that held timestamp, so positive delay remains +in its fill-aware before phase and negative delay immediately exposes its active +or terminal sample. No timer or background clock advances the hold. + +On resume, unchanged active track origins move forward once by the elapsed held +host duration. Their effective progress therefore continues from the held sample +without rebuilding keyframes or restarting the animation. If supported keyframe +identity changes while paused, changed tracks retain the established restart +behavior while unchanged active tracks preserve their held progress. + +A terminal sample reached while paused remains held and cannot dispatch +`animationend`; resume performs the existing finite completion path. The shared +end latch still dispatches at most once. Completed fill remains settled. Removal, +node detach, document replacement, navigation, and engine teardown discard the +node-owned hold with the established animation runtime lifecycle. + +## Scheduling and bounds + +- Paused keyframes are excluded from `has_active_animations()`, including delay + and active phases. A play-state mutation can publish its held sample once, but + does not sustain host-frame demand. +- Resume uses the existing visibility and paint-area gates. Opacity, rotation, + and filters remain paint-only and do not add selector, cascade, layout, scene + node, queue, or per-frame allocation work. +- The runtime still configures one animation and the first coordinated-list item. + Existing duration, iteration, keyframe-stop, and filter-list bounds remain. +- Zero-duration/zero-count behavior, multiple animations, translate/scale, + pseudo-elements, additional animation events, and Web Animations playback APIs + remain deferred. + +## Evidence + +- `test_animation_play_state_holds_and_resumes_host_time` covers shorthand and + longhand metadata, CSSOM mutation/clear, positive and negative delay, reverse + opacity/rotation/filter samples, hold stability, resumed continuity, terminal + fill, exactly-once `animationend`, detach, and settled frame demand. +- `tests/WebPlatformSubset/contracts/css-animation-play-state.html` is a bounded + WPT-aligned browser contract for the same observable boundaries. Its dedicated + profile selects only that contract. +- Under the fast implementation policy, only `git diff --check` is executed. + Native, browser, package, idle, and unchanged Code OSS acceptance remain + unexecuted. diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_decoration_values.h b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_decoration_values.h index 8e73021b..c483471c 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_decoration_values.h +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_decoration_values.h @@ -187,6 +187,11 @@ bool apply_decoration_value(dom_node& node,const std::string& name,const std::st decision.semantic_slice = "first animation; none, forwards, backwards, both"; return true; + } else if (name == "animation-play-state") { + node.style.mutable_animations().animation_play_state_value = value; + decision.classification = "partially-supported"; + decision.semantic_slice = "first animation; running, paused"; + return true; } else if (property_mask(name) == inline_border && is_inline(inline_border)) { return true; diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_specified_coverage.h b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_specified_coverage.h index 87ddce54..3ca74a0b 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_css_specified_coverage.h +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_css_specified_coverage.h @@ -44,6 +44,7 @@ inline constexpr auto specified_property_samples = std::to_array opacity_keyframes; std::string rotation_keyframe_animation_signature; @@ -240,6 +245,7 @@ struct node_style final { float opacity_keyframe_iterations{1}; direction_kind keyframe_direction{direction_kind::normal}; fill_kind keyframe_fill_mode{fill_kind::none}; + play_kind keyframe_play_state{play_kind::running}; float opacity_keyframe_x1{0.25F}; float opacity_keyframe_y1{0.1F}; float opacity_keyframe_x2{0.25F}; @@ -1530,6 +1536,8 @@ struct dom_node final { bool filter_keyframe_animation_filled{false}; node_style::animation_data::fill_kind keyframe_fill_mode{ node_style::animation_data::fill_kind::none}; + bool keyframe_animation_paused{false}; + double keyframe_animation_paused_at_ms{0}; bool keyframe_animation_end_event_sent{false}; uint32_t painted_foreground_rgba{0}; uint32_t color_animation_from_rgba{0}; diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_animations.inc b/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_animations.inc index 8d66fd71..da819186 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_animations.inc +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_native_dom_animations.inc @@ -259,6 +259,16 @@ void native_document::update_style_animations(dom_node& node) != node.style.animations().filter_keyframe_animation_signature; const auto fill_mode_changed = animation.keyframe_fill_mode != node.style.animations().keyframe_fill_mode; + const auto has_configured_keyframes = + !node.style.animations().opacity_keyframe_animation_signature.empty() + || !node.style.animations().rotation_keyframe_animation_signature.empty() + || !node.style.animations().filter_keyframe_animation_signature.empty(); + const auto desired_keyframe_pause = has_configured_keyframes + && node.style.animations().keyframe_play_state + == node_style::animation_data::play_kind::paused; + const auto was_keyframe_paused = animation.keyframe_animation_paused; + const auto previous_pause_timestamp = + animation.keyframe_animation_paused_at_ms; animation.keyframe_fill_mode = node.style.animations().keyframe_fill_mode; if (opacity_keyframe_changed || rotation_keyframe_changed || filter_keyframe_changed) { @@ -366,6 +376,32 @@ void native_document::update_style_animations(dom_node& node) animation.filter_keyframe_animation_valid; } } + const auto keyframe_identity_changed = opacity_keyframe_changed + || rotation_keyframe_changed || filter_keyframe_changed; + if (was_keyframe_paused + && (!desired_keyframe_pause || keyframe_identity_changed)) { + const auto held_duration = std::max( + 0.0, animation_frame_timestamp_ms_ - previous_pause_timestamp); + if (!opacity_keyframe_changed + && animation.opacity_keyframe_animation_active) { + animation.opacity_keyframe_animation_started_ms += held_duration; + } + if (!rotation_keyframe_changed + && animation.rotation_keyframe_animation_active) { + animation.rotation_keyframe_animation_started_ms += held_duration; + } + if (!filter_keyframe_changed + && animation.filter_keyframe_animation_active) { + animation.filter_keyframe_animation_started_ms += held_duration; + } + } + animation.keyframe_animation_paused = desired_keyframe_pause; + if (desired_keyframe_pause + && (!was_keyframe_paused || keyframe_identity_changed)) { + animation.keyframe_animation_paused_at_ms = animation_frame_timestamp_ms_; + } else if (!has_configured_keyframes) { + animation.keyframe_animation_paused_at_ms = 0; + } if (animation.opacity_animation_active && node.style.animations().transition_property_value == "none") { transition_events_.push_back({node.id,"transitioncancel","opacity", @@ -1052,6 +1088,9 @@ bool native_document::advance_animations() noexcept } auto keyframe_animation_completed = false; + const auto keyframe_timestamp_ms = animation.keyframe_animation_paused + ? animation.keyframe_animation_paused_at_ms + : animation_frame_timestamp_ms_; if (animation.opacity_keyframe_animation_active) { const auto sample_opacity = [&](float cycle_progress) { const auto& stops = node.style.animations().opacity_keyframes; @@ -1084,7 +1123,7 @@ bool native_document::advance_animations() noexcept } }; const auto elapsed_ms = static_cast( - animation_frame_timestamp_ms_ + keyframe_timestamp_ms - animation.opacity_keyframe_animation_started_ms - node.style.animations().opacity_keyframe_delay_ms); if (elapsed_ms < 0) { @@ -1110,8 +1149,10 @@ bool native_document::advance_animations() noexcept } else { animation.painted_opacity = node.style.opacity; } - animation.opacity_keyframe_animation_active = false; - keyframe_animation_completed = true; + if (!animation.keyframe_animation_paused) { + animation.opacity_keyframe_animation_active = false; + keyframe_animation_completed = true; + } advanced = advanced || keyframe_paint_visible; } else { sample_opacity(active_keyframe_progress( @@ -1154,7 +1195,7 @@ bool native_document::advance_animations() noexcept } }; const auto elapsed_ms = static_cast( - animation_frame_timestamp_ms_ + keyframe_timestamp_ms - animation.rotation_keyframe_animation_started_ms - node.style.animations().opacity_keyframe_delay_ms); if (elapsed_ms < 0) { @@ -1184,8 +1225,10 @@ bool native_document::advance_animations() noexcept node.style.transform_rotate_degrees; animation.rotation_keyframe_animation_filled = false; } - animation.rotation_keyframe_animation_active = false; - keyframe_animation_completed = true; + if (!animation.keyframe_animation_paused) { + animation.rotation_keyframe_animation_active = false; + keyframe_animation_completed = true; + } advanced = advanced || keyframe_paint_visible; } else { sample_rotation(active_keyframe_progress( @@ -1242,7 +1285,7 @@ bool native_document::advance_animations() noexcept } }; const auto elapsed_ms = static_cast( - animation_frame_timestamp_ms_ + keyframe_timestamp_ms - animation.filter_keyframe_animation_started_ms - node.style.animations().opacity_keyframe_delay_ms); if (elapsed_ms < 0) { @@ -1272,8 +1315,10 @@ bool native_document::advance_animations() noexcept animation.filter_keyframe_underlying; animation.filter_keyframe_animation_filled = false; } - animation.filter_keyframe_animation_active = false; - keyframe_animation_completed = true; + if (!animation.keyframe_animation_paused) { + animation.filter_keyframe_animation_active = false; + keyframe_animation_completed = true; + } advanced = advanced || keyframe_paint_visible; } else { sample_filter(active_keyframe_progress( @@ -1344,7 +1389,8 @@ bool native_document::has_active_animations() const noexcept || animation->rotation_keyframe_animation_active || animation->filter_keyframe_animation_active; return transition_active - || (keyframe_active && intersects_visible_paint_area(*node)); + || (keyframe_active && !animation->keyframe_animation_paused + && intersects_visible_paint_area(*node)); }); active_animation_demand_cache_valid_ = true; return active_animation_demand_cache_; diff --git a/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_style.inc b/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_style.inc index b9abd24e..a0fcd168 100644 --- a/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_style.inc +++ b/experiments/WebScene.NativeEngine.Probe/native/webscene_v8_runtime_style.inc @@ -290,6 +290,8 @@ node.style.mutable_animations().animation_direction_value = "normal"; } else if (name == "animationFillMode" || name == "animation-fill-mode") { node.style.mutable_animations().animation_fill_mode_value = "none"; + } else if (name == "animationPlayState" || name == "animation-play-state") { + node.style.mutable_animations().animation_play_state_value = "running"; } else if (name == "animation" || name == "animationName" || name == "animation-name" || name == "animationDuration" || name == "animation-duration" || name == "animationDelay" @@ -304,6 +306,7 @@ animations.animation_iteration_count_value = "1"; animations.animation_direction_value = "normal"; animations.animation_fill_mode_value = "none"; + animations.animation_play_state_value = "running"; } else if (name == "opacity") { node.style.opacity = 1; node.style.inline_property_mask &= ~inline_opacity; @@ -1437,6 +1440,8 @@ value = node->style.animations().transition_timing_function_value; } else if (name == "animation-fill-mode") { value = node->style.animations().animation_fill_mode_value; + } else if (name == "animation-play-state") { + value = node->style.animations().animation_play_state_value; } else if (name == "opacity") { value = serialize_css_number(node->painted_opacity_value()); } else if (name == "color") { @@ -2046,7 +2051,8 @@ + node->style.animations().animation_delay_value + " " + node->style.animations().animation_iteration_count_value + " " + node->style.animations().animation_direction_value + " " - + node->style.animations().animation_fill_mode_value; + + node->style.animations().animation_fill_mode_value + " " + + node->style.animations().animation_play_state_value; } else if (name == "animationName" || name == "animation-name") { value = node->style.animations().animation_name_value; } else if (name == "animationDuration" || name == "animation-duration") { @@ -2063,6 +2069,8 @@ value = node->style.animations().animation_direction_value; } else if (name == "animationFillMode" || name == "animation-fill-mode") { value = node->style.animations().animation_fill_mode_value; + } else if (name == "animationPlayState" || name == "animation-play-state") { + value = node->style.animations().animation_play_state_value; } else if (name == "zIndex") { value = node->style.z_index_auto ? "auto" : std::to_string(node->style.z_index); @@ -2576,6 +2584,8 @@ node->style.mutable_animations().animation_direction_value = value; } else if (name == "animationFillMode") { node->style.mutable_animations().animation_fill_mode_value = value; + } else if (name == "animationPlayState") { + node->style.mutable_animations().animation_play_state_value = value; } else if (name == "opacity") { node->style.opacity = raw_value->IsNullOrUndefined() ? 1.0F diff --git a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_animation_cssom_tests.inc b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_animation_cssom_tests.inc index 60b0f013..d77112f4 100644 --- a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_animation_cssom_tests.inc +++ b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_animation_cssom_tests.inc @@ -823,6 +823,148 @@ void test_animation_fill_maps_before_after_and_preserves_timeline( engine, false, "detached fill animations retained host-frame demand"); } +void test_animation_play_state_holds_and_resumes_host_time( + webscene_engine* engine) +{ + animation_frame_and_wait(engine, 8000.0, 7110U); + execute_and_wait(engine, R"JS( + (() => { + document.body.innerHTML = ` + +
`; + globalThis.__playStateEndCount = 0; + document.getElementById('active').addEventListener( + 'animationend', () => ++globalThis.__playStateEndCount); + void document.body.offsetHeight; + })() + )JS", "animation-play-state-setup.js"); + + animation_frame_and_wait(engine, 8250.0, 7111U); + const auto initial = evaluate(engine, R"JS( + (() => { + const close = (left, right) => Math.abs(left - right) < .001; + const opacity = id => Number(getComputedStyle( + document.getElementById(id)).opacity); + const active = document.getElementById('active'); + const matrix = getComputedStyle(active).transform + .slice(7, -1).split(',').map(Number); + let angle = Math.atan2(matrix[1], matrix[0]) * 180 / Math.PI; + if (angle < 0) angle += 360; + const brightness = Number((getComputedStyle(active).filter + .match(/brightness\(([-.\d]+)/) || [0, NaN])[1]); + const states = ['delayed', 'negative', 'active'].map(id => + getComputedStyle(document.getElementById(id)).animationPlayState); + return JSON.stringify(states) + === '["paused","paused, running","running, paused"]' + && getComputedStyle(document.getElementById('delayed')) + .animation.includes('paused') + && getComputedStyle(document.getElementById('negative')) + .getPropertyValue('animation-play-state') === 'paused, running' + && close(opacity('delayed'), 0) && close(opacity('negative'), .25) + && close(opacity('active'), .75) && close(angle, 135) + && close(brightness, 1.25) && __playStateEndCount === 0; + })() + )JS", "animation-play-state-initial.js"); + require(initial == "true", + "initial play state did not hold delay/negative-delay/directed samples"); + + execute_and_wait(engine, R"JS( + (() => { + const active = document.getElementById('active'); + active.style.animationPlayState = 'paused'; + return active.style.animationPlayState; + })() + )JS", "animation-play-state-pause.js"); + animation_frame_and_wait(engine, 8750.0, 7112U); + const auto held = evaluate(engine, R"JS( + (() => { + const close = (left, right) => Math.abs(left - right) < .001; + const active = document.getElementById('active'); + const matrix = getComputedStyle(active).transform + .slice(7, -1).split(',').map(Number); + let angle = Math.atan2(matrix[1], matrix[0]) * 180 / Math.PI; + if (angle < 0) angle += 360; + const brightness = Number((getComputedStyle(active).filter + .match(/brightness\(([-.\d]+)/) || [0, NaN])[1]); + return getComputedStyle(active).animationPlayState === 'paused' + && close(Number(getComputedStyle(active).opacity), .75) + && close(angle, 135) && close(brightness, 1.25) + && __playStateEndCount === 0; + })() + )JS", "animation-play-state-held.js"); + require(held == "true", "paused keyframes advanced on a later host timestamp"); + wait_for_animation_frame_demand( + engine, false, "paused keyframes retained host-frame demand"); + + execute_and_wait(engine, R"JS( + (() => { + document.getElementById('active').style.animationPlayState = ''; + document.getElementById('negative').style.animationPlayState = 'running'; + })() + )JS", "animation-play-state-resume.js"); + animation_frame_and_wait(engine, 9000.0, 7113U); + const auto resumed = evaluate(engine, R"JS( + (() => { + const close = (left, right) => Math.abs(left - right) < .001; + const active = document.getElementById('active'); + const matrix = getComputedStyle(active).transform + .slice(7, -1).split(',').map(Number); + let angle = Math.atan2(matrix[1], matrix[0]) * 180 / Math.PI; + if (angle < 0) angle += 360; + const brightness = Number((getComputedStyle(active).filter + .match(/brightness\(([-.\d]+)/) || [0, NaN])[1]); + return getComputedStyle(active).animationPlayState === 'running, paused' + && close(Number(getComputedStyle(active).opacity), .5) + && close(Number(getComputedStyle( + document.getElementById('negative')).opacity), .5) + && close(angle, 90) && close(brightness, 1) + && __playStateEndCount === 0; + })() + )JS", "animation-play-state-resumed.js"); + require(resumed == "true", + "resumed keyframes restarted or included held host-clock time"); + + animation_frame_and_wait(engine, 9500.0, 7114U); + const auto completed = evaluate(engine, R"JS( + (() => { + const close = (left, right) => Math.abs(left - right) < .001; + const active = document.getElementById('active'); + const matrix = getComputedStyle(active).transform + .slice(7, -1).split(',').map(Number); + const angle = Math.abs(Math.atan2(matrix[1], matrix[0]) * 180 / Math.PI); + return close(Number(getComputedStyle(active).opacity), 0) + && close(Number(getComputedStyle( + document.getElementById('negative')).opacity), 1) + && close(angle, 0) && getComputedStyle(active).filter === 'brightness(0.5)' + && __playStateEndCount === 1; + })() + )JS", "animation-play-state-completed.js"); + require(completed == "true", + "resumed keyframes missed directed fill or exactly-once completion"); + wait_for_animation_frame_demand( + engine, false, "completed play-state animations retained host-frame demand"); + + execute_and_wait(engine, + "document.body.innerHTML = '
play-state animations detached
'", + "animation-play-state-detach.js"); + wait_for_animation_frame_demand( + engine, false, "detached play-state animations retained host-frame demand"); +} + void test_filter_keyframes_use_host_clock_and_retained_paint( webscene_engine* engine) { diff --git a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp index 0ebdb647..4322cc8b 100644 --- a/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp +++ b/experiments/WebScene.NativeEngine.Probe/tests/native_v8_runtime_tests.cpp @@ -1139,6 +1139,7 @@ int main() test_clipped_offscreen_keyframes_do_not_keep_host_frame_clock_alive(focused_engine); test_animation_direction_maps_cycles_and_terminal_boundaries(focused_engine); test_animation_fill_maps_before_after_and_preserves_timeline(focused_engine); + test_animation_play_state_holds_and_resumes_host_time(focused_engine); webscene_engine_destroy(focused_engine); return 0; } @@ -1635,6 +1636,7 @@ int main() test_finite_rotation_keyframe_dispatches_animation_end(engine); test_animation_direction_maps_cycles_and_terminal_boundaries(engine); test_animation_fill_maps_before_after_and_preserves_timeline(engine); + test_animation_play_state_holds_and_resumes_host_time(engine); // This regression uses fixed host timestamps beginning at 2700 ms. Give it // a fresh timeline so earlier animation tests cannot make those frames stale. webscene_engine_destroy(engine); diff --git a/tests/WebPlatformSubset/capabilities.json b/tests/WebPlatformSubset/capabilities.json index 4d9bc5e8..2b27965d 100644 --- a/tests/WebPlatformSubset/capabilities.json +++ b/tests/WebPlatformSubset/capabilities.json @@ -97,11 +97,11 @@ }, { "family": "transitions-and-animation", - "required": ["host-frame-driven requestAnimationFrame", "transition longhands and delay", "four-number cubic-bezier timing", "translate, scale, rotate, opacity, foreground color, background color, supported compound filters, left and top interpolation", "background shorthand transition aliasing", "filter none identity interpolation", "logical inset transition aliasing", "intermediate computed style, paint and client geometry", "transition run/start/cancel/end events", "cancellation and reversal", "bounded paint samples", "dense bounded rotation cadence", "native opacity, rotate, and bounded filter keyframes", "native animation shorthand and longhands", "native staggered delay and infinite iteration", "single-animation normal, reverse, alternate, and alternate-reverse direction", "single-animation none, forwards, backwards, and both fill"], + "required": ["host-frame-driven requestAnimationFrame", "transition longhands and delay", "four-number cubic-bezier timing", "translate, scale, rotate, opacity, foreground color, background color, supported compound filters, left and top interpolation", "background shorthand transition aliasing", "filter none identity interpolation", "logical inset transition aliasing", "intermediate computed style, paint and client geometry", "transition run/start/cancel/end events", "cancellation and reversal", "bounded paint samples", "dense bounded rotation cadence", "native opacity, rotate, and bounded filter keyframes", "native animation shorthand and longhands", "native staggered delay and infinite iteration", "single-animation normal, reverse, alternate, and alternate-reverse direction", "single-animation none, forwards, backwards, and both fill", "single-animation running and paused play state"], "candidate": ["innerHTML transition-longhand retention", "inline transition recascade and per-longhand importance", "computed transition times serialized in seconds", "synthetic click timer task ordering"], "productEvidence": ["calendar segmented-tab underline", "Code OSS Chat and session filter transitions", "Code OSS dictation brightness and incremental Chat blur keyframes", "automatically discovered three-dot loader animation", "automatically discovered rotating spinner", "animated toolbar and dialog state changes", "continuous live-resize chart layout"], - "coverage": ["contracts/segmented-transform-transition.html", "contracts/transform-none-transition.html", "contracts/paint-transitions-temporal.html", "contracts/css-filter-transition-temporal.html", "contracts/css-filter-transition-midpoint.html", "contracts/logical-inset-transition-cadence.html", "contracts/rotation-transition-cadence.html", "contracts/dynamic-transition-style-task-order.html", "contracts/css-opacity-keyframes-temporal.html", "contracts/css-animation-fill-mode-forwards.html", "contracts/css-animation-fill-mode-boundaries.html", "contracts/css-animation-direction.html", "contracts/css-rotation-keyframes-cadence.html", "contracts/css-filter-keyframes-temporal.html", "contracts/css-filter-keyframes-midpoint.html", "CssTransformTransitionTests", "test_inline_transition_longhands_survive_dynamic_parse_and_recascade", "test_logical_inset_transition_smooths_throttled_pointer_updates", "test_filter_keyframes_use_host_clock_and_retained_paint", "test_animation_direction_maps_cycles_and_terminal_boundaries", "test_animation_fill_maps_before_after_and_preserves_timeline", "native host-clock transition, retained filter paint, and keyframe regressions", "hosted component automatically discovered temporal checkpoints", "hosted component intermediate viewport-publication gate"], - "gap": "Native is required to pass the bounded transform/opacity/foreground-color/background-color/filter transition slice, including events, cancellation, reversal, authored compound order, identity interpolation, paint, and cadence. Filter transitions and keyframes are limited to the retained blur, brightness, contrast, grayscale, and saturate functions and their existing list/value bounds. Bounded filter keyframes cover Code OSS dictation brightness and incremental Chat blur, including compatible compound order, none identities, finite fill, animationend, retained paint, and host-clock cleanup. The single-animation keyframe slice maps normal, reverse, alternate, and alternate-reverse through negative delays and finite, fractional, or infinite iteration counts before opacity, rotation, and bounded-filter sampling. For positive-duration, nonzero-count animations, none, forwards, backwards, and both now apply direction-aware fill boundaries to those supported properties without extending frame demand; positive-delay backwards fill samples its boundary without applying the between-keyframe timing function. Identity interpolation from transform:none is part of the neutral forward/reverse contract. The candidate dynamic-style reduction passes Chrome and native and closes Bootstrap Modal's static-backdrop callback guard by retaining inline transition longhands through parser construction and recascade, honoring per-longhand importance, and exposing computed times in seconds. Native also passes candidate opacity and rotate() CSS Animations contracts, while generic discovery proves changing staggered-dot and spinner paint samples. Other animated properties, play state, zero-duration or zero-count fill, multiple-animation composition, and the complete Web Animations API are not claimed." + "coverage": ["contracts/segmented-transform-transition.html", "contracts/transform-none-transition.html", "contracts/paint-transitions-temporal.html", "contracts/css-filter-transition-temporal.html", "contracts/css-filter-transition-midpoint.html", "contracts/logical-inset-transition-cadence.html", "contracts/rotation-transition-cadence.html", "contracts/dynamic-transition-style-task-order.html", "contracts/css-opacity-keyframes-temporal.html", "contracts/css-animation-fill-mode-forwards.html", "contracts/css-animation-fill-mode-boundaries.html", "contracts/css-animation-direction.html", "contracts/css-animation-play-state.html", "contracts/css-rotation-keyframes-cadence.html", "contracts/css-filter-keyframes-temporal.html", "contracts/css-filter-keyframes-midpoint.html", "CssTransformTransitionTests", "test_inline_transition_longhands_survive_dynamic_parse_and_recascade", "test_logical_inset_transition_smooths_throttled_pointer_updates", "test_filter_keyframes_use_host_clock_and_retained_paint", "test_animation_direction_maps_cycles_and_terminal_boundaries", "test_animation_fill_maps_before_after_and_preserves_timeline", "test_animation_play_state_holds_and_resumes_host_time", "native host-clock transition, retained filter paint, and keyframe regressions", "hosted component automatically discovered temporal checkpoints", "hosted component intermediate viewport-publication gate"], + "gap": "Native is required to pass the bounded transform/opacity/foreground-color/background-color/filter transition slice, including events, cancellation, reversal, authored compound order, identity interpolation, paint, and cadence. Filter transitions and keyframes are limited to the retained blur, brightness, contrast, grayscale, and saturate functions and their existing list/value bounds. Bounded filter keyframes cover Code OSS dictation brightness and incremental Chat blur, including compatible compound order, none identities, finite fill, animationend, retained paint, and host-clock cleanup. The single-animation keyframe slice maps normal, reverse, alternate, and alternate-reverse through negative delays and finite, fractional, or infinite iteration counts before opacity, rotation, and bounded-filter sampling. For positive-duration, nonzero-count animations, none, forwards, backwards, and both apply direction-aware fill boundaries to those supported properties without extending frame demand; positive-delay backwards fill samples its boundary without applying the between-keyframe timing function. Running and paused play state now hold and resume the same bounded host-clock timeline, including delay, direction, fill, supported-property paint, exactly-once completion, and zero paused frame demand. Identity interpolation from transform:none is part of the neutral forward/reverse contract. The candidate dynamic-style reduction passes Chrome and native and closes Bootstrap Modal's static-backdrop callback guard by retaining inline transition longhands through parser construction and recascade, honoring per-longhand importance, and exposing computed times in seconds. Native also passes candidate opacity and rotate() CSS Animations contracts, while generic discovery proves changing staggered-dot and spinner paint samples. Other animated properties, zero-duration or zero-count fill, multiple-animation composition, and the complete Web Animations API are not claimed." }, { "family": "clipping-and-rounded-borders", diff --git a/tests/WebPlatformSubset/contracts/css-animation-play-state.html b/tests/WebPlatformSubset/contracts/css-animation-play-state.html new file mode 100644 index 00000000..1b2cd03c --- /dev/null +++ b/tests/WebPlatformSubset/contracts/css-animation-play-state.html @@ -0,0 +1,114 @@ + + +CSS animation play state holds and resumes the supported timeline + +
+ diff --git a/tests/WebPlatformSubset/webscene-component-profile.json b/tests/WebPlatformSubset/webscene-component-profile.json index 2aecbd9d..a8bb056b 100644 --- a/tests/WebPlatformSubset/webscene-component-profile.json +++ b/tests/WebPlatformSubset/webscene-component-profile.json @@ -1888,6 +1888,13 @@ "evidence": ["css-animation-direction-659-242"], "reason": "WPT-aligned single-animation reduction for normal, reverse, alternate, and alternate-reverse cycle mapping. It covers longhand and shorthand metadata, negative delay, even/odd iteration parity, bounded host-frame samples, and direction-aware fractional forwards fill." }, + { + "path": "contracts/css-animation-play-state.html", + "type": "contract", + "capabilities": ["animation-play-state-longhand", "animation-play-state-shorthand", "paused-delay-and-active-time", "resume-timeline-continuity", "opacity-rotation-filter-pause", "exactly-once-animation-end", "paused-zero-frame-demand"], + "evidence": ["css-animation-play-state-665-242"], + "reason": "WPT-aligned single-animation reduction for running/paused metadata, positive- and negative-delay holds, mid-active pause and resume continuity, direction-aware supported-property paint, exactly-once completion, cleanup, and settled scheduling." + }, { "path": "contracts/css-filter-keyframes-temporal.html", "type": "contract", diff --git a/tests/WebPlatformSubset/webscene-css-animation-play-state-profile.json b/tests/WebPlatformSubset/webscene-css-animation-play-state-profile.json new file mode 100644 index 00000000..c78082aa --- /dev/null +++ b/tests/WebPlatformSubset/webscene-css-animation-play-state-profile.json @@ -0,0 +1,29 @@ +{ + "profile": "webscene-css-animation-play-state-1", + "wptRevision": "2c705104a295c48053eeddf7fe0170d790a4e853", + "runtime": "v8", + "viewport": { + "width": 800, + "height": 600, + "deviceScaleFactor": 1 + }, + "required": [ + { + "path": "contracts/css-animation-play-state.html", + "type": "contract", + "capabilities": [ + "animation-play-state-longhand", + "animation-play-state-shorthand", + "paused-delay-and-active-time", + "resume-timeline-continuity", + "opacity-rotation-filter-pause", + "exactly-once-animation-end", + "paused-zero-frame-demand" + ], + "evidence": ["css-animation-play-state-665-242"], + "reason": "WPT-aligned single-animation reduction for retained play-state metadata, initial and mid-active holds, host-clock resume continuity, supported-property terminal fill, exactly-once completion, removal, and settled scheduling." + } + ], + "harnessBlocked": [], + "excluded": [] +}