From 2099727c0ca8de1cf31c4968df7aa04d4a50742b Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Mon, 10 Aug 2026 21:06:16 +0100 Subject: [PATCH] LibWeb: Interpolate axis-keyword and calculated `rotate` values Interpolation of the `rotate` property only handled the bare angle and numeric axis forms. The `x`, `y`, and `z` axis keyword forms fell back to discrete interpolation. Arguments containing math functions did the same. Normalize the axis keyword forms to their rotate3d axis vectors. Resolve calculated angle and axis arguments before interpolating. The same resolution now applies to rotate3d pairs in `transform` lists. --- Libraries/LibWeb/Rust/src/css/animation.rs | 82 +++--- .../animation/rotate-composition.txt | 138 ++++++++++ ...interpolation-math-functions-tentative.txt | 53 ++++ .../animation/rotate-composition.html | 247 ++++++++++++++++++ ...nterpolation-math-functions-tentative.html | 46 ++++ 5 files changed, 521 insertions(+), 45 deletions(-) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-composition.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-composition.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.html diff --git a/Libraries/LibWeb/Rust/src/css/animation.rs b/Libraries/LibWeb/Rust/src/css/animation.rs index 9960fa1da6f7..736772a8857b 100644 --- a/Libraries/LibWeb/Rust/src/css/animation.rs +++ b/Libraries/LibWeb/Rust/src/css/animation.rs @@ -1301,7 +1301,12 @@ fn interpolate_translate(from: &StyleValueData, to: &StyleValueData, delta: f32) }) } -fn interpolate_individual_rotate(from: &StyleValueData, to: &StyleValueData, delta: f32) -> FfiAnimationValueResult { +fn interpolate_individual_rotate( + context: Option<&FfiAnimationContext>, + from: &StyleValueData, + to: &StyleValueData, + delta: f32, +) -> FfiAnimationValueResult { let none = crate::css::style_compute::none_keyword(); if matches!(from, StyleValueData::Keyword { keyword } if *keyword == none) && matches!(to, StyleValueData::Keyword { keyword } if *keyword == none) @@ -1321,7 +1326,8 @@ fn interpolate_individual_rotate(from: &StyleValueData, to: &StyleValueData, del let is_2d = |value: &StyleValueData| { is_none(value) || matches!(value, StyleValueData::Transformation { transform_function, values, .. } - if *transform_function == TRANSFORM_FUNCTION_ROTATE && values.as_slice().len() == 1) + if matches!(*transform_function, TRANSFORM_FUNCTION_ROTATE | TRANSFORM_FUNCTION_ROTATE_Z) + && values.as_slice().len() == 1) }; if is_2d(from) && is_2d(to) { let angle = |value: &StyleValueData| { @@ -1334,10 +1340,7 @@ fn interpolate_individual_rotate(from: &StyleValueData, to: &StyleValueData, del let [angle] = values.as_slice() else { return None; }; - match angle.data() { - StyleValueData::Angle { value, unit } => angle_to_degrees(*value, *unit), - _ => None, - } + resolve_animation_angle(context, angle.data()) }; let (Some(from), Some(to)) = (angle(from), angle(to)) else { return not_handled(); @@ -1355,6 +1358,14 @@ fn interpolate_individual_rotate(from: &StyleValueData, to: &StyleValueData, del }); } + let axis_rotation = |x: f64, y: f64, z: f64, angle: &RetainedStyleValueData| { + Some(RetainedStyleValueDataList::from_retained_values(vec![ + retained_number(x), + retained_number(y), + retained_number(z), + angle.clone_retained(), + ])) + }; let normalize = |value: &StyleValueData| { if is_none(value) { let angle = Arc::into_raw(Arc::new(StyleValueData::Angle { value: 0.0, unit: 0 })); @@ -1374,12 +1385,9 @@ fn interpolate_individual_rotate(from: &StyleValueData, to: &StyleValueData, del return None; }; match (*transform_function, values.as_slice()) { - (TRANSFORM_FUNCTION_ROTATE, [angle]) => Some(RetainedStyleValueDataList::from_retained_values(vec![ - retained_number(0.0), - retained_number(0.0), - retained_number(1.0), - angle.clone_retained(), - ])), + (TRANSFORM_FUNCTION_ROTATE | TRANSFORM_FUNCTION_ROTATE_Z, [angle]) => axis_rotation(0.0, 0.0, 1.0, angle), + (TRANSFORM_FUNCTION_ROTATE_X, [angle]) => axis_rotation(1.0, 0.0, 0.0, angle), + (TRANSFORM_FUNCTION_ROTATE_Y, [angle]) => axis_rotation(0.0, 1.0, 0.0, angle), (TRANSFORM_FUNCTION_ROTATE_3D, [..]) if values.as_slice().len() == 4 => { Some(RetainedStyleValueDataList::from_retained_values( values @@ -1396,6 +1404,7 @@ fn interpolate_individual_rotate(from: &StyleValueData, to: &StyleValueData, del return not_handled(); }; interpolate_rotate_3d( + context, crate::css::property_metadata::property_id::ROTATE, TRANSFORM_FUNCTION_ROTATE_3D, &from, @@ -4004,6 +4013,7 @@ fn interpolate_scalar_value( } fn interpolate_rotate_3d( + context: Option<&FfiAnimationContext>, property: u16, transform_function: u8, from_arguments: &RetainedStyleValueDataList, @@ -4015,38 +4025,18 @@ fn interpolate_rotate_3d( else { return None; }; - let ( - StyleValueData::Number { value: from_x }, - StyleValueData::Number { value: from_y }, - StyleValueData::Number { value: from_z }, - StyleValueData::Angle { - value: from_angle, - unit: from_angle_unit, - }, - StyleValueData::Number { value: to_x }, - StyleValueData::Number { value: to_y }, - StyleValueData::Number { value: to_z }, - StyleValueData::Angle { - value: to_angle, - unit: to_angle_unit, - }, - ) = ( - from_x.data(), - from_y.data(), - from_z.data(), - from_angle.data(), - to_x.data(), - to_y.data(), - to_z.data(), - to_angle.data(), - ) - else { - return None; - }; - let from_angle = angle_to_degrees(*from_angle, *from_angle_unit)?.to_radians(); - let to_angle = angle_to_degrees(*to_angle, *to_angle_unit)?.to_radians(); - let from_axis = [*from_x, *from_y, *from_z]; - let to_axis = [*to_x, *to_y, *to_z]; + let from_angle = resolve_animation_angle(context, from_angle.data())?.to_radians(); + let to_angle = resolve_animation_angle(context, to_angle.data())?.to_radians(); + let from_axis = [ + resolve_animation_number(context, from_x.data())?, + resolve_animation_number(context, from_y.data())?, + resolve_animation_number(context, from_z.data())?, + ]; + let to_axis = [ + resolve_animation_number(context, to_x.data())?, + resolve_animation_number(context, to_y.data())?, + resolve_animation_number(context, to_z.data())?, + ]; let length = |vector: [f64; 3]| vector.iter().map(|component| component * component).sum::().sqrt(); let normalize = |vector: [f64; 3]| { @@ -5145,6 +5135,7 @@ fn interpolate_transform_list( .collect(), ); let transformation = interpolate_rotate_3d( + context, *from_property, transform_function, &from_arguments, @@ -6294,7 +6285,7 @@ pub(crate) fn interpolate_value( } } if animation_type == ANIMATION_TYPE_CUSTOM && property_id == crate::css::property_metadata::property_id::ROTATE { - let result = interpolate_individual_rotate(from, to, delta); + let result = interpolate_individual_rotate(context, from, to, delta); if result.handled { return result; } @@ -7091,6 +7082,7 @@ mod tests { retained_angle(180.0), ]); let result = interpolate_rotate_3d( + None, crate::css::property_metadata::property_id::TRANSFORM, 0, &from, diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-composition.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-composition.txt new file mode 100644 index 000000000000..82394288b60a --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-composition.txt @@ -0,0 +1,138 @@ +Harness status: OK + +Found 132 tests + +46 Pass +86 Fail +Fail Compositing CSS Animations: property underlying [100deg] from add [10deg] to add [30deg] at (-1) should be [90deg] +Fail Compositing CSS Animations: property underlying [100deg] from add [10deg] to add [30deg] at (0) should be [110deg] +Fail Compositing CSS Animations: property underlying [100deg] from add [10deg] to add [30deg] at (0.25) should be [115deg] +Fail Compositing CSS Animations: property underlying [100deg] from add [10deg] to add [30deg] at (0.75) should be [125deg] +Fail Compositing CSS Animations: property underlying [100deg] from add [10deg] to add [30deg] at (1) should be [130deg] +Fail Compositing CSS Animations: property underlying [100deg] from add [10deg] to add [30deg] at (2) should be [150deg] +Fail Compositing Web Animations: property underlying [100deg] from add [10deg] to add [30deg] at (-1) should be [90deg] +Fail Compositing Web Animations: property underlying [100deg] from add [10deg] to add [30deg] at (0) should be [110deg] +Fail Compositing Web Animations: property underlying [100deg] from add [10deg] to add [30deg] at (0.25) should be [115deg] +Fail Compositing Web Animations: property underlying [100deg] from add [10deg] to add [30deg] at (0.75) should be [125deg] +Fail Compositing Web Animations: property underlying [100deg] from add [10deg] to add [30deg] at (1) should be [130deg] +Fail Compositing Web Animations: property underlying [100deg] from add [10deg] to add [30deg] at (2) should be [150deg] +Fail Compositing CSS Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (-1) should be [1 0 0 160deg] +Fail Compositing CSS Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0) should be [1 0 0 100deg] +Fail Compositing CSS Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.25) should be [1 0 0 85deg] +Fail Compositing CSS Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.75) should be [1 0 0 55deg] +Pass Compositing CSS Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (1) should be [1 0 0 40deg] +Fail Compositing CSS Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (2) should be [1 0 0 -20deg] +Fail Compositing Web Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (-1) should be [1 0 0 160deg] +Fail Compositing Web Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0) should be [1 0 0 100deg] +Fail Compositing Web Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.25) should be [1 0 0 85deg] +Fail Compositing Web Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (0.75) should be [1 0 0 55deg] +Pass Compositing Web Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (1) should be [1 0 0 40deg] +Fail Compositing Web Animations: property underlying [1 0 0 200deg] from add [1 0 0 -100deg] to replace [1 0 0 40deg] at (2) should be [1 0 0 -20deg] +Fail Compositing CSS Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (-1) should be [0 1 0 130deg] +Pass Compositing CSS Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0) should be [0 1 0 50deg] +Fail Compositing CSS Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.25) should be [0 1 0 30deg] +Fail Compositing CSS Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.75) should be [0 1 0 -10deg] +Fail Compositing CSS Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (1) should be [0 1 0 -30deg] +Fail Compositing CSS Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (2) should be [0 1 0 -110deg] +Fail Compositing Web Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (-1) should be [0 1 0 130deg] +Pass Compositing Web Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0) should be [0 1 0 50deg] +Fail Compositing Web Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.25) should be [0 1 0 30deg] +Fail Compositing Web Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (0.75) should be [0 1 0 -10deg] +Fail Compositing Web Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (1) should be [0 1 0 -30deg] +Fail Compositing Web Animations: property underlying [0 1 0 -40deg] from replace [0 1 0 50deg] to add [0 1 0 10deg] at (2) should be [0 1 0 -110deg] +Fail Compositing CSS Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (-1) should be [0.27 0.53 0.8 10deg] +Fail Compositing CSS Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (0) should be [0.27 0.53 0.8 50deg] +Fail Compositing CSS Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (0.25) should be [0.27 0.53 0.8 60deg] +Fail Compositing CSS Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (0.75) should be [0.27 0.53 0.8 80deg] +Fail Compositing CSS Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (1) should be [0.27 0.53 0.8 90deg] +Fail Compositing CSS Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (2) should be [0.27 0.53 0.8 130deg] +Fail Compositing Web Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (-1) should be [0.27 0.53 0.8 10deg] +Fail Compositing Web Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (0) should be [0.27 0.53 0.8 50deg] +Fail Compositing Web Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (0.25) should be [0.27 0.53 0.8 60deg] +Fail Compositing Web Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (0.75) should be [0.27 0.53 0.8 80deg] +Fail Compositing Web Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (1) should be [0.27 0.53 0.8 90deg] +Fail Compositing Web Animations: property underlying [1 2 3 40deg] from add [2 4 6 10deg] to add [3 6 9 50deg] at (2) should be [0.27 0.53 0.8 130deg] +Fail Compositing CSS Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (-1) should be [0 -1 0 100deg] +Fail Compositing CSS Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (0) should be [0deg] +Fail Compositing CSS Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (0.25) should be [y 25deg] +Fail Compositing CSS Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (0.75) should be [y 75deg] +Pass Compositing CSS Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (1) should be [y 100deg] +Fail Compositing CSS Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (2) should be [y 200deg] +Fail Compositing Web Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (-1) should be [0 -1 0 100deg] +Fail Compositing Web Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (0) should be [0deg] +Fail Compositing Web Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (0.25) should be [y 25deg] +Fail Compositing Web Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (0.75) should be [y 75deg] +Pass Compositing Web Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (1) should be [y 100deg] +Fail Compositing Web Animations: property underlying [1 2 3 270deg] from add [1 2 3 90deg] to replace [0 1 0 100deg] at (2) should be [y 200deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (-1) should be [0 -1 0 100deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (0) should be [0deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (0.25) should be [y 25deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (0.75) should be [y 75deg] +Pass Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (1) should be [y 100deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (2) should be [y 200deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (-1) should be [0 -1 0 100deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (0) should be [0deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (0.25) should be [y 25deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (0.75) should be [y 75deg] +Pass Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (1) should be [y 100deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [0 1 0 100deg] at (2) should be [y 200deg] +Fail Compositing CSS Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (-1) should be [0.67 -0.06 -0.74 124.97deg] +Pass Compositing CSS Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (0) should be [0.71 0.71 0 90deg] +Pass Compositing CSS Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (0.25) should be [0.54 0.8 0.26 94.83deg] +Pass Compositing CSS Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (0.75) should be [0.17 0.78 0.61 118.68deg] +Pass Compositing CSS Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (1) should be [0 0.71 0.71 135deg] +Pass Compositing CSS Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (2) should be [-0.52 0.29 0.81 208.96deg] +Fail Compositing Web Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (-1) should be [0.67 -0.06 -0.74 124.97deg] +Pass Compositing Web Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (0) should be [0.71 0.71 0 90deg] +Pass Compositing Web Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (0.25) should be [0.54 0.8 0.26 94.83deg] +Pass Compositing Web Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (0.75) should be [0.17 0.78 0.61 118.68deg] +Pass Compositing Web Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (1) should be [0 0.71 0.71 135deg] +Pass Compositing Web Animations: property underlying [1 0 0 0deg] from add [1 1 0 90deg] to replace [0 1 1 135deg] at (2) should be [-0.52 0.29 0.81 208.96deg] +Pass Compositing CSS Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (-1) should be [y -100deg] +Pass Compositing CSS Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (0) should be [y 0deg] +Pass Compositing CSS Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (0.25) should be [y 25deg] +Pass Compositing CSS Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (0.75) should be [y 75deg] +Pass Compositing CSS Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (1) should be [y 100deg] +Pass Compositing CSS Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (2) should be [y 200deg] +Pass Compositing Web Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (-1) should be [y -100deg] +Pass Compositing Web Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (0) should be [y 0deg] +Pass Compositing Web Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (0.25) should be [y 25deg] +Pass Compositing Web Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (0.75) should be [y 75deg] +Pass Compositing Web Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (1) should be [y 100deg] +Pass Compositing Web Animations: property underlying [none] from add [none] to replace [0 1 0 100deg] at (2) should be [y 200deg] +Pass Compositing CSS Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (-1) should be [0.27 0.53 0.8 540deg] +Pass Compositing CSS Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (0) should be [0.27 0.53 0.8 270deg] +Pass Compositing CSS Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (0.25) should be [0.27 0.53 0.8 202.5deg] +Pass Compositing CSS Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (0.75) should be [0.27 0.53 0.8 67.5deg] +Pass Compositing CSS Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (1) should be [0.27 0.53 0.8 0deg] +Pass Compositing CSS Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (2) should be [0.27 0.53 0.8 -270deg] +Pass Compositing Web Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (-1) should be [0.27 0.53 0.8 540deg] +Pass Compositing Web Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (0) should be [0.27 0.53 0.8 270deg] +Pass Compositing Web Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (0.25) should be [0.27 0.53 0.8 202.5deg] +Pass Compositing Web Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (0.75) should be [0.27 0.53 0.8 67.5deg] +Pass Compositing Web Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (1) should be [0.27 0.53 0.8 0deg] +Pass Compositing Web Animations: property underlying [none] from add [2 4 6 270deg] to replace [none] at (2) should be [0.27 0.53 0.8 -270deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (-1) should be [0.31 -0.22 0.92 131.66deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0) should be [1 2 3 90deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.25) should be [0.21 0.73 0.64 86.72deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.75) should be [0.07 0.97 0.21 92.05deg] +Pass Compositing CSS Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (1) should be [0 1 0 100deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (2) should be [-0.2 0.79 -0.59 151.11deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (-1) should be [0.31 -0.22 0.92 131.66deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0) should be [1 2 3 90deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.25) should be [0.21 0.73 0.64 86.72deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (0.75) should be [0.07 0.97 0.21 92.05deg] +Pass Compositing Web Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (1) should be [0 1 0 100deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [none] to replace [0 1 0 100deg] at (2) should be [-0.2 0.79 -0.59 151.11deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (-1) should be [0.27 0.53 0.8 720deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (0) should be [0.27 0.53 0.8 360deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (0.25) should be [0.27 0.53 0.8 270deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (0.75) should be [0.27 0.53 0.8 90deg] +Pass Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (1) should be [0.27 0.53 0.8 0deg] +Fail Compositing CSS Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (2) should be [0.27 0.53 0.8 -360deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (-1) should be [0.27 0.53 0.8 720deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (0) should be [0.27 0.53 0.8 360deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (0.25) should be [0.27 0.53 0.8 270deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (0.75) should be [0.27 0.53 0.8 90deg] +Pass Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (1) should be [0.27 0.53 0.8 0deg] +Fail Compositing Web Animations: property underlying [1 2 3 90deg] from add [2 4 6 270deg] to replace [none] at (2) should be [0.27 0.53 0.8 -360deg] \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.txt new file mode 100644 index 000000000000..58b77afefd0f --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.txt @@ -0,0 +1,53 @@ +Harness status: OK + +Found 48 tests + +48 Pass +Pass CSS Transitions: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (-1) should be [20deg] +Pass CSS Transitions: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0) should be [100deg] +Pass CSS Transitions: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.125) should be [110deg] +Pass CSS Transitions: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.875) should be [170deg] +Pass CSS Transitions: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (1) should be [180deg] +Pass CSS Transitions: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (2) should be [260deg] +Pass CSS Transitions with transition: all: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (-1) should be [20deg] +Pass CSS Transitions with transition: all: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0) should be [100deg] +Pass CSS Transitions with transition: all: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.125) should be [110deg] +Pass CSS Transitions with transition: all: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.875) should be [170deg] +Pass CSS Transitions with transition: all: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (1) should be [180deg] +Pass CSS Transitions with transition: all: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (2) should be [260deg] +Pass CSS Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (-1) should be [20deg] +Pass CSS Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0) should be [100deg] +Pass CSS Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.125) should be [110deg] +Pass CSS Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.875) should be [170deg] +Pass CSS Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (1) should be [180deg] +Pass CSS Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (2) should be [260deg] +Pass Web Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (-1) should be [20deg] +Pass Web Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0) should be [100deg] +Pass Web Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.125) should be [110deg] +Pass Web Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (0.875) should be [170deg] +Pass Web Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (1) should be [180deg] +Pass Web Animations: property from [100deg] to [calc(sign(20rem - 20px) * 180deg)] at (2) should be [260deg] +Pass CSS Transitions: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (-1) should be [20deg] +Pass CSS Transitions: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0) should be [100deg] +Pass CSS Transitions: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.125) should be [110deg] +Pass CSS Transitions: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.875) should be [170deg] +Pass CSS Transitions: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (1) should be [180deg] +Pass CSS Transitions: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (2) should be [260deg] +Pass CSS Transitions with transition: all: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (-1) should be [20deg] +Pass CSS Transitions with transition: all: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0) should be [100deg] +Pass CSS Transitions with transition: all: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.125) should be [110deg] +Pass CSS Transitions with transition: all: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.875) should be [170deg] +Pass CSS Transitions with transition: all: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (1) should be [180deg] +Pass CSS Transitions with transition: all: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (2) should be [260deg] +Pass CSS Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (-1) should be [20deg] +Pass CSS Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0) should be [100deg] +Pass CSS Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.125) should be [110deg] +Pass CSS Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.875) should be [170deg] +Pass CSS Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (1) should be [180deg] +Pass CSS Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (2) should be [260deg] +Pass Web Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (-1) should be [20deg] +Pass Web Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0) should be [100deg] +Pass Web Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.125) should be [110deg] +Pass Web Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (0.875) should be [170deg] +Pass Web Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (1) should be [180deg] +Pass Web Animations: property from [calc(sign(20rem - 20px) * 100deg)] to [calc(progress(10rem, 20px, 100px) * 180deg)] at (2) should be [260deg] \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-composition.html b/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-composition.html new file mode 100644 index 000000000000..9d96c720f757 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-composition.html @@ -0,0 +1,247 @@ + + + rotate composition + + + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.html b/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.html new file mode 100644 index 000000000000..02f42f99911f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-interpolation-math-functions-tentative.html @@ -0,0 +1,46 @@ + + + + + rotate interpolation with css math functions + + + + + + + + + + +