diff --git a/Libraries/LibWeb/CSS/Interpolation.cpp b/Libraries/LibWeb/CSS/Interpolation.cpp index a6589311c34..a5df26512f8 100644 --- a/Libraries/LibWeb/CSS/Interpolation.cpp +++ b/Libraries/LibWeb/CSS/Interpolation.cpp @@ -177,6 +177,89 @@ static FloatVector4 slerp(FloatVector4 const& from, FloatVector4 const& to, floa return from * (cosf(delta * theta) - (product * w)) + to * w; } +static RefPtr interpolate_rotate(DOM::Element& element, CalculationContext calculation_context, CSSStyleValue const& a_from, CSSStyleValue const& a_to, float delta, AllowDiscrete allow_discrete) +{ + if (a_from.to_keyword() == Keyword::None && a_to.to_keyword() == Keyword::None) + return a_from; + + static auto zero_degrees_value = AngleStyleValue::create(Angle::make_degrees(0)); + static auto zero = TransformationStyleValue::create(PropertyID::Rotate, TransformFunction::Rotate, { zero_degrees_value }); + + auto const& from = a_from.to_keyword() == Keyword::None ? *zero : a_from; + auto const& to = a_to.to_keyword() == Keyword::None ? *zero : a_to; + + auto const& from_transform = from.as_transformation(); + auto const& to_transform = to.as_transformation(); + + auto from_transform_type = from_transform.transform_function(); + auto to_transform_type = to_transform.transform_function(); + + if (from_transform_type == to_transform_type && from_transform.values().size() == 1) { + auto interpolated_angle = interpolate_value(element, calculation_context, from_transform.values()[0], to_transform.values()[0], delta, allow_discrete); + if (!interpolated_angle) + return {}; + return TransformationStyleValue::create(PropertyID::Rotate, from_transform_type, { *interpolated_angle.release_nonnull() }); + } + + FloatVector3 from_axis { 0, 0, 1 }; + auto from_angle_value = from_transform.values()[0]; + if (from_transform.values().size() == 4) { + from_axis.set_x(from_transform.values()[0]->as_number().number()); + from_axis.set_y(from_transform.values()[1]->as_number().number()); + from_axis.set_z(from_transform.values()[2]->as_number().number()); + from_angle_value = from_transform.values()[3]; + } + float from_angle = from_angle_value->as_angle().angle().to_radians(); + + FloatVector3 to_axis { 0, 0, 1 }; + auto to_angle_value = to_transform.values()[0]; + if (to_transform.values().size() == 4) { + to_axis.set_x(to_transform.values()[0]->as_number().number()); + to_axis.set_y(to_transform.values()[1]->as_number().number()); + to_axis.set_z(to_transform.values()[2]->as_number().number()); + to_angle_value = to_transform.values()[3]; + } + float to_angle = to_angle_value->as_angle().angle().to_radians(); + + auto from_axis_angle = [](FloatVector3 const& axis, float angle) -> FloatVector4 { + auto normalized = axis.normalized(); + auto half_angle = angle / 2.0f; + auto sin_half_angle = sin(half_angle); + FloatVector4 result { normalized.x() * sin_half_angle, normalized.y() * sin_half_angle, normalized.z() * sin_half_angle, cosf(half_angle) }; + return result; + }; + + struct AxisAngle { + FloatVector3 axis; + float angle; + }; + auto quaternion_to_axis_angle = [](FloatVector4 const& quaternion) { + FloatVector3 axis { quaternion[0], quaternion[1], quaternion[2] }; + auto epsilon = 1e-5f; + auto sin_half_angle = sqrtf(max(0.0f, 1.0f - quaternion[3] * quaternion[3])); + if (sin_half_angle < epsilon) + return AxisAngle { axis, quaternion[3] }; + auto angle = 2.0f * acosf(quaternion[3]); + axis = axis * (1.0f / sin_half_angle); + return AxisAngle { axis, angle }; + }; + + auto from_quaternion = from_axis_angle(from_axis, from_angle); + auto to_quaternion = from_axis_angle(to_axis, to_angle); + + auto interpolated_quaternion = slerp(from_quaternion, to_quaternion, delta); + auto interpolated_axis_angle = quaternion_to_axis_angle(interpolated_quaternion); + auto interpolated_x_axis = NumberStyleValue::create(interpolated_axis_angle.axis.x()); + auto interpolated_y_axis = NumberStyleValue::create(interpolated_axis_angle.axis.y()); + auto interpolated_z_axis = NumberStyleValue::create(interpolated_axis_angle.axis.z()); + auto interpolated_angle = AngleStyleValue::create(Angle::make_degrees(AK::to_degrees(interpolated_axis_angle.angle))); + + return TransformationStyleValue::create( + PropertyID::Rotate, + TransformFunction::Rotate3d, + { interpolated_x_axis, interpolated_y_axis, interpolated_z_axis, interpolated_angle }); +} + ValueComparingRefPtr interpolate_property(DOM::Element& element, PropertyID property_id, CSSStyleValue const& a_from, CSSStyleValue const& a_to, float delta, AllowDiscrete allow_discrete) { auto from = with_keyword_values_resolved(element, property_id, a_from); @@ -273,6 +356,12 @@ ValueComparingRefPtr interpolate_property(DOM::Element& ele return interpolate_discrete(from, to, delta, allow_discrete); } + if (property_id == PropertyID::Rotate) { + if (auto result = interpolate_rotate(element, calculation_context, from, to, delta, allow_discrete)) + return result; + return interpolate_discrete(from, to, delta, allow_discrete); + } + // FIXME: Handle all custom animatable properties [[fallthrough]]; } diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-interpolation.txt new file mode 100644 index 00000000000..0ec3f1a6c44 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/rotate-interpolation.txt @@ -0,0 +1,366 @@ +Harness status: OK + +Found 360 tests + +238 Pass +122 Fail +Pass CSS Transitions: property from [100deg] to [180deg] at (-1) should be [20deg] +Pass CSS Transitions: property from [100deg] to [180deg] at (0) should be [100deg] +Pass CSS Transitions: property from [100deg] to [180deg] at (0.125) should be [110deg] +Pass CSS Transitions: property from [100deg] to [180deg] at (0.875) should be [170deg] +Pass CSS Transitions: property from [100deg] to [180deg] at (1) should be [180deg] +Pass CSS Transitions: property from [100deg] to [180deg] at (2) should be [260deg] +Pass CSS Transitions with transition: all: property from [100deg] to [180deg] at (-1) should be [20deg] +Pass CSS Transitions with transition: all: property from [100deg] to [180deg] at (0) should be [100deg] +Pass CSS Transitions with transition: all: property from [100deg] to [180deg] at (0.125) should be [110deg] +Pass CSS Transitions with transition: all: property from [100deg] to [180deg] at (0.875) should be [170deg] +Pass CSS Transitions with transition: all: property from [100deg] to [180deg] at (1) should be [180deg] +Pass CSS Transitions with transition: all: property from [100deg] to [180deg] at (2) should be [260deg] +Pass CSS Animations: property from [100deg] to [180deg] at (-1) should be [20deg] +Pass CSS Animations: property from [100deg] to [180deg] at (0) should be [100deg] +Pass CSS Animations: property from [100deg] to [180deg] at (0.125) should be [110deg] +Pass CSS Animations: property from [100deg] to [180deg] at (0.875) should be [170deg] +Pass CSS Animations: property from [100deg] to [180deg] at (1) should be [180deg] +Pass CSS Animations: property from [100deg] to [180deg] at (2) should be [260deg] +Pass Web Animations: property from [100deg] to [180deg] at (-1) should be [20deg] +Pass Web Animations: property from [100deg] to [180deg] at (0) should be [100deg] +Pass Web Animations: property from [100deg] to [180deg] at (0.125) should be [110deg] +Pass Web Animations: property from [100deg] to [180deg] at (0.875) should be [170deg] +Pass Web Animations: property from [100deg] to [180deg] at (1) should be [180deg] +Pass Web Animations: property from [100deg] to [180deg] at (2) should be [260deg] +Pass CSS Transitions: property from [45deg] to [-1 1 0 60deg] at (-1) should be [0.447214 -0.447214 0.774597 104.478deg] +Pass CSS Transitions: property from [45deg] to [-1 1 0 60deg] at (0) should be [45deg] +Pass CSS Transitions: property from [45deg] to [-1 1 0 60deg] at (0.125) should be [-0.136456 0.136456 0.981203 40.6037deg] +Pass CSS Transitions: property from [45deg] to [-1 1 0 60deg] at (0.875) should be [-0.70246 0.70246 0.114452 53.1994deg] +Pass CSS Transitions: property from [45deg] to [-1 1 0 60deg] at (1) should be [-0.71 0.71 0 60deg] +Fail CSS Transitions: property from [45deg] to [-1 1 0 60deg] at (2) should be [-0.637897 0.637897 -0.431479 124.975deg] +Pass CSS Transitions with transition: all: property from [45deg] to [-1 1 0 60deg] at (-1) should be [0.447214 -0.447214 0.774597 104.478deg] +Pass CSS Transitions with transition: all: property from [45deg] to [-1 1 0 60deg] at (0) should be [45deg] +Pass CSS Transitions with transition: all: property from [45deg] to [-1 1 0 60deg] at (0.125) should be [-0.136456 0.136456 0.981203 40.6037deg] +Pass CSS Transitions with transition: all: property from [45deg] to [-1 1 0 60deg] at (0.875) should be [-0.70246 0.70246 0.114452 53.1994deg] +Pass CSS Transitions with transition: all: property from [45deg] to [-1 1 0 60deg] at (1) should be [-0.71 0.71 0 60deg] +Fail CSS Transitions with transition: all: property from [45deg] to [-1 1 0 60deg] at (2) should be [-0.637897 0.637897 -0.431479 124.975deg] +Pass CSS Animations: property from [45deg] to [-1 1 0 60deg] at (-1) should be [0.447214 -0.447214 0.774597 104.478deg] +Pass CSS Animations: property from [45deg] to [-1 1 0 60deg] at (0) should be [45deg] +Pass CSS Animations: property from [45deg] to [-1 1 0 60deg] at (0.125) should be [-0.136456 0.136456 0.981203 40.6037deg] +Pass CSS Animations: property from [45deg] to [-1 1 0 60deg] at (0.875) should be [-0.70246 0.70246 0.114452 53.1994deg] +Pass CSS Animations: property from [45deg] to [-1 1 0 60deg] at (1) should be [-0.71 0.71 0 60deg] +Fail CSS Animations: property from [45deg] to [-1 1 0 60deg] at (2) should be [-0.637897 0.637897 -0.431479 124.975deg] +Pass Web Animations: property from [45deg] to [-1 1 0 60deg] at (-1) should be [0.447214 -0.447214 0.774597 104.478deg] +Pass Web Animations: property from [45deg] to [-1 1 0 60deg] at (0) should be [45deg] +Pass Web Animations: property from [45deg] to [-1 1 0 60deg] at (0.125) should be [-0.136456 0.136456 0.981203 40.6037deg] +Pass Web Animations: property from [45deg] to [-1 1 0 60deg] at (0.875) should be [-0.70246 0.70246 0.114452 53.1994deg] +Pass Web Animations: property from [45deg] to [-1 1 0 60deg] at (1) should be [-0.71 0.71 0 60deg] +Fail Web Animations: property from [45deg] to [-1 1 0 60deg] at (2) should be [-0.637897 0.637897 -0.431479 124.975deg] +Fail CSS Transitions: property from [none] to [7 -8 9 400grad] at (-1) should be [0.5 -0.57 0.65 -400grad] +Fail CSS Transitions: property from [none] to [7 -8 9 400grad] at (0) should be [0.5 -0.57 0.65 0deg] +Fail CSS Transitions: property from [none] to [7 -8 9 400grad] at (0.125) should be [0.5 -0.57 0.65 50grad] +Fail CSS Transitions: property from [none] to [7 -8 9 400grad] at (0.875) should be [0.5 -0.57 0.65 350grad] +Fail CSS Transitions: property from [none] to [7 -8 9 400grad] at (1) should be [0.5 -0.57 0.65 400grad] +Fail CSS Transitions: property from [none] to [7 -8 9 400grad] at (2) should be [0.5 -0.57 0.65 800grad] +Fail CSS Transitions with transition: all: property from [none] to [7 -8 9 400grad] at (-1) should be [0.5 -0.57 0.65 -400grad] +Fail CSS Transitions with transition: all: property from [none] to [7 -8 9 400grad] at (0) should be [0.5 -0.57 0.65 0deg] +Fail CSS Transitions with transition: all: property from [none] to [7 -8 9 400grad] at (0.125) should be [0.5 -0.57 0.65 50grad] +Fail CSS Transitions with transition: all: property from [none] to [7 -8 9 400grad] at (0.875) should be [0.5 -0.57 0.65 350grad] +Fail CSS Transitions with transition: all: property from [none] to [7 -8 9 400grad] at (1) should be [0.5 -0.57 0.65 400grad] +Fail CSS Transitions with transition: all: property from [none] to [7 -8 9 400grad] at (2) should be [0.5 -0.57 0.65 800grad] +Fail CSS Animations: property from [none] to [7 -8 9 400grad] at (-1) should be [0.5 -0.57 0.65 -400grad] +Fail CSS Animations: property from [none] to [7 -8 9 400grad] at (0) should be [0.5 -0.57 0.65 0deg] +Fail CSS Animations: property from [none] to [7 -8 9 400grad] at (0.125) should be [0.5 -0.57 0.65 50grad] +Fail CSS Animations: property from [none] to [7 -8 9 400grad] at (0.875) should be [0.5 -0.57 0.65 350grad] +Fail CSS Animations: property from [none] to [7 -8 9 400grad] at (1) should be [0.5 -0.57 0.65 400grad] +Fail CSS Animations: property from [none] to [7 -8 9 400grad] at (2) should be [0.5 -0.57 0.65 800grad] +Fail Web Animations: property from [none] to [7 -8 9 400grad] at (-1) should be [0.5 -0.57 0.65 -400grad] +Fail Web Animations: property from [none] to [7 -8 9 400grad] at (0) should be [0.5 -0.57 0.65 0deg] +Fail Web Animations: property from [none] to [7 -8 9 400grad] at (0.125) should be [0.5 -0.57 0.65 50grad] +Fail Web Animations: property from [none] to [7 -8 9 400grad] at (0.875) should be [0.5 -0.57 0.65 350grad] +Fail Web Animations: property from [none] to [7 -8 9 400grad] at (1) should be [0.5 -0.57 0.65 400grad] +Fail Web Animations: property from [none] to [7 -8 9 400grad] at (2) should be [0.5 -0.57 0.65 800grad] +Pass CSS Transitions: property from [none] to [none] at (-1) should be [none] +Pass CSS Transitions: property from [none] to [none] at (0) should be [none] +Pass CSS Transitions: property from [none] to [none] at (0.125) should be [none] +Pass CSS Transitions: property from [none] to [none] at (0.875) should be [none] +Pass CSS Transitions: property from [none] to [none] at (1) should be [none] +Pass CSS Transitions: property from [none] to [none] at (2) should be [none] +Pass CSS Transitions with transition: all: property from [none] to [none] at (-1) should be [none] +Pass CSS Transitions with transition: all: property from [none] to [none] at (0) should be [none] +Pass CSS Transitions with transition: all: property from [none] to [none] at (0.125) should be [none] +Pass CSS Transitions with transition: all: property from [none] to [none] at (0.875) should be [none] +Pass CSS Transitions with transition: all: property from [none] to [none] at (1) should be [none] +Pass CSS Transitions with transition: all: property from [none] to [none] at (2) should be [none] +Pass CSS Animations: property from [none] to [none] at (-1) should be [none] +Pass CSS Animations: property from [none] to [none] at (0) should be [none] +Pass CSS Animations: property from [none] to [none] at (0.125) should be [none] +Pass CSS Animations: property from [none] to [none] at (0.875) should be [none] +Pass CSS Animations: property from [none] to [none] at (1) should be [none] +Pass CSS Animations: property from [none] to [none] at (2) should be [none] +Pass Web Animations: property from [none] to [none] at (-1) should be [none] +Pass Web Animations: property from [none] to [none] at (0) should be [none] +Pass Web Animations: property from [none] to [none] at (0.125) should be [none] +Pass Web Animations: property from [none] to [none] at (0.875) should be [none] +Pass Web Animations: property from [none] to [none] at (1) should be [none] +Pass Web Animations: property from [none] to [none] at (2) should be [none] +Pass CSS Transitions: property from [none] to [30deg] at (-1) should be [-30deg] +Pass CSS Transitions: property from [none] to [30deg] at (0) should be [0deg] +Pass CSS Transitions: property from [none] to [30deg] at (0.25) should be [7.5deg] +Pass CSS Transitions: property from [none] to [30deg] at (0.75) should be [22.5deg] +Pass CSS Transitions: property from [none] to [30deg] at (1) should be [30deg] +Pass CSS Transitions: property from [none] to [30deg] at (2) should be [60deg] +Pass CSS Transitions with transition: all: property from [none] to [30deg] at (-1) should be [-30deg] +Pass CSS Transitions with transition: all: property from [none] to [30deg] at (0) should be [0deg] +Pass CSS Transitions with transition: all: property from [none] to [30deg] at (0.25) should be [7.5deg] +Pass CSS Transitions with transition: all: property from [none] to [30deg] at (0.75) should be [22.5deg] +Pass CSS Transitions with transition: all: property from [none] to [30deg] at (1) should be [30deg] +Pass CSS Transitions with transition: all: property from [none] to [30deg] at (2) should be [60deg] +Pass CSS Animations: property from [none] to [30deg] at (-1) should be [-30deg] +Pass CSS Animations: property from [none] to [30deg] at (0) should be [0deg] +Pass CSS Animations: property from [none] to [30deg] at (0.25) should be [7.5deg] +Pass CSS Animations: property from [none] to [30deg] at (0.75) should be [22.5deg] +Pass CSS Animations: property from [none] to [30deg] at (1) should be [30deg] +Pass CSS Animations: property from [none] to [30deg] at (2) should be [60deg] +Pass Web Animations: property from [none] to [30deg] at (-1) should be [-30deg] +Pass Web Animations: property from [none] to [30deg] at (0) should be [0deg] +Pass Web Animations: property from [none] to [30deg] at (0.25) should be [7.5deg] +Pass Web Animations: property from [none] to [30deg] at (0.75) should be [22.5deg] +Pass Web Animations: property from [none] to [30deg] at (1) should be [30deg] +Pass Web Animations: property from [none] to [30deg] at (2) should be [60deg] +Pass CSS Transitions: property from neutral to [30deg] at (-1) should be [-10deg] +Pass CSS Transitions: property from neutral to [30deg] at (0) should be [10deg] +Pass CSS Transitions: property from neutral to [30deg] at (0.25) should be [15deg] +Pass CSS Transitions: property from neutral to [30deg] at (0.75) should be [25deg] +Pass CSS Transitions: property from neutral to [30deg] at (1) should be [30deg] +Pass CSS Transitions: property from neutral to [30deg] at (2) should be [50deg] +Pass CSS Transitions with transition: all: property from neutral to [30deg] at (-1) should be [-10deg] +Pass CSS Transitions with transition: all: property from neutral to [30deg] at (0) should be [10deg] +Pass CSS Transitions with transition: all: property from neutral to [30deg] at (0.25) should be [15deg] +Pass CSS Transitions with transition: all: property from neutral to [30deg] at (0.75) should be [25deg] +Pass CSS Transitions with transition: all: property from neutral to [30deg] at (1) should be [30deg] +Pass CSS Transitions with transition: all: property from neutral to [30deg] at (2) should be [50deg] +Fail CSS Animations: property from neutral to [30deg] at (-1) should be [-10deg] +Fail CSS Animations: property from neutral to [30deg] at (0) should be [10deg] +Fail CSS Animations: property from neutral to [30deg] at (0.25) should be [15deg] +Fail CSS Animations: property from neutral to [30deg] at (0.75) should be [25deg] +Pass CSS Animations: property from neutral to [30deg] at (1) should be [30deg] +Fail CSS Animations: property from neutral to [30deg] at (2) should be [50deg] +Fail Web Animations: property from neutral to [30deg] at (-1) should be [-10deg] +Fail Web Animations: property from neutral to [30deg] at (0) should be [10deg] +Fail Web Animations: property from neutral to [30deg] at (0.25) should be [15deg] +Fail Web Animations: property from neutral to [30deg] at (0.75) should be [25deg] +Pass Web Animations: property from neutral to [30deg] at (1) should be [30deg] +Fail Web Animations: property from neutral to [30deg] at (2) should be [50deg] +Pass CSS Transitions: property from [inherit] to [270deg] at (-1) should be [-90deg] +Pass CSS Transitions: property from [inherit] to [270deg] at (0) should be [90deg] +Pass CSS Transitions: property from [inherit] to [270deg] at (0.25) should be [135deg] +Pass CSS Transitions: property from [inherit] to [270deg] at (0.75) should be [225deg] +Pass CSS Transitions: property from [inherit] to [270deg] at (1) should be [270deg] +Pass CSS Transitions: property from [inherit] to [270deg] at (2) should be [450deg] +Pass CSS Transitions with transition: all: property from [inherit] to [270deg] at (-1) should be [-90deg] +Pass CSS Transitions with transition: all: property from [inherit] to [270deg] at (0) should be [90deg] +Pass CSS Transitions with transition: all: property from [inherit] to [270deg] at (0.25) should be [135deg] +Pass CSS Transitions with transition: all: property from [inherit] to [270deg] at (0.75) should be [225deg] +Pass CSS Transitions with transition: all: property from [inherit] to [270deg] at (1) should be [270deg] +Pass CSS Transitions with transition: all: property from [inherit] to [270deg] at (2) should be [450deg] +Pass CSS Animations: property from [inherit] to [270deg] at (-1) should be [-90deg] +Pass CSS Animations: property from [inherit] to [270deg] at (0) should be [90deg] +Pass CSS Animations: property from [inherit] to [270deg] at (0.25) should be [135deg] +Pass CSS Animations: property from [inherit] to [270deg] at (0.75) should be [225deg] +Pass CSS Animations: property from [inherit] to [270deg] at (1) should be [270deg] +Pass CSS Animations: property from [inherit] to [270deg] at (2) should be [450deg] +Pass Web Animations: property from [inherit] to [270deg] at (-1) should be [-90deg] +Pass Web Animations: property from [inherit] to [270deg] at (0) should be [90deg] +Pass Web Animations: property from [inherit] to [270deg] at (0.25) should be [135deg] +Pass Web Animations: property from [inherit] to [270deg] at (0.75) should be [225deg] +Pass Web Animations: property from [inherit] to [270deg] at (1) should be [270deg] +Pass Web Animations: property from [inherit] to [270deg] at (2) should be [450deg] +Pass CSS Transitions: property from [unset] to [30deg] at (-1) should be [-30deg] +Pass CSS Transitions: property from [unset] to [30deg] at (0) should be [0deg] +Pass CSS Transitions: property from [unset] to [30deg] at (0.25) should be [7.5deg] +Pass CSS Transitions: property from [unset] to [30deg] at (0.75) should be [22.5deg] +Pass CSS Transitions: property from [unset] to [30deg] at (1) should be [30deg] +Pass CSS Transitions: property from [unset] to [30deg] at (2) should be [60deg] +Pass CSS Transitions with transition: all: property from [unset] to [30deg] at (-1) should be [-30deg] +Pass CSS Transitions with transition: all: property from [unset] to [30deg] at (0) should be [0deg] +Pass CSS Transitions with transition: all: property from [unset] to [30deg] at (0.25) should be [7.5deg] +Pass CSS Transitions with transition: all: property from [unset] to [30deg] at (0.75) should be [22.5deg] +Pass CSS Transitions with transition: all: property from [unset] to [30deg] at (1) should be [30deg] +Pass CSS Transitions with transition: all: property from [unset] to [30deg] at (2) should be [60deg] +Pass CSS Animations: property from [unset] to [30deg] at (-1) should be [-30deg] +Pass CSS Animations: property from [unset] to [30deg] at (0) should be [0deg] +Pass CSS Animations: property from [unset] to [30deg] at (0.25) should be [7.5deg] +Pass CSS Animations: property from [unset] to [30deg] at (0.75) should be [22.5deg] +Pass CSS Animations: property from [unset] to [30deg] at (1) should be [30deg] +Pass CSS Animations: property from [unset] to [30deg] at (2) should be [60deg] +Pass Web Animations: property from [unset] to [30deg] at (-1) should be [-30deg] +Pass Web Animations: property from [unset] to [30deg] at (0) should be [0deg] +Pass Web Animations: property from [unset] to [30deg] at (0.25) should be [7.5deg] +Pass Web Animations: property from [unset] to [30deg] at (0.75) should be [22.5deg] +Pass Web Animations: property from [unset] to [30deg] at (1) should be [30deg] +Pass Web Animations: property from [unset] to [30deg] at (2) should be [60deg] +Pass CSS Transitions: property from [100deg] to [-100deg] at (-1) should be [300deg] +Pass CSS Transitions: property from [100deg] to [-100deg] at (0) should be [100deg] +Pass CSS Transitions: property from [100deg] to [-100deg] at (0.25) should be [50deg] +Pass CSS Transitions: property from [100deg] to [-100deg] at (0.75) should be [-50deg] +Pass CSS Transitions: property from [100deg] to [-100deg] at (1) should be [-100deg] +Pass CSS Transitions: property from [100deg] to [-100deg] at (2) should be [-300deg] +Pass CSS Transitions with transition: all: property from [100deg] to [-100deg] at (-1) should be [300deg] +Pass CSS Transitions with transition: all: property from [100deg] to [-100deg] at (0) should be [100deg] +Pass CSS Transitions with transition: all: property from [100deg] to [-100deg] at (0.25) should be [50deg] +Pass CSS Transitions with transition: all: property from [100deg] to [-100deg] at (0.75) should be [-50deg] +Pass CSS Transitions with transition: all: property from [100deg] to [-100deg] at (1) should be [-100deg] +Pass CSS Transitions with transition: all: property from [100deg] to [-100deg] at (2) should be [-300deg] +Pass CSS Animations: property from [100deg] to [-100deg] at (-1) should be [300deg] +Pass CSS Animations: property from [100deg] to [-100deg] at (0) should be [100deg] +Pass CSS Animations: property from [100deg] to [-100deg] at (0.25) should be [50deg] +Pass CSS Animations: property from [100deg] to [-100deg] at (0.75) should be [-50deg] +Pass CSS Animations: property from [100deg] to [-100deg] at (1) should be [-100deg] +Pass CSS Animations: property from [100deg] to [-100deg] at (2) should be [-300deg] +Pass Web Animations: property from [100deg] to [-100deg] at (-1) should be [300deg] +Pass Web Animations: property from [100deg] to [-100deg] at (0) should be [100deg] +Pass Web Animations: property from [100deg] to [-100deg] at (0.25) should be [50deg] +Pass Web Animations: property from [100deg] to [-100deg] at (0.75) should be [-50deg] +Pass Web Animations: property from [100deg] to [-100deg] at (1) should be [-100deg] +Pass Web Animations: property from [100deg] to [-100deg] at (2) should be [-300deg] +Pass CSS Transitions: property from [0 1 0 100deg] to [0 1 0 -100deg] at (-1) should be [0 1 0 300deg] +Pass CSS Transitions: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0) should be [0 1 0 100deg] +Pass CSS Transitions: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.25) should be [0 1 0 50deg] +Fail CSS Transitions: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.75) should be [0 1 0 -50deg] +Fail CSS Transitions: property from [0 1 0 100deg] to [0 1 0 -100deg] at (1) should be [0 1 0 -100deg] +Fail CSS Transitions: property from [0 1 0 100deg] to [0 1 0 -100deg] at (2) should be [0 1 0 -300deg] +Pass CSS Transitions with transition: all: property from [0 1 0 100deg] to [0 1 0 -100deg] at (-1) should be [0 1 0 300deg] +Pass CSS Transitions with transition: all: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0) should be [0 1 0 100deg] +Pass CSS Transitions with transition: all: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.25) should be [0 1 0 50deg] +Fail CSS Transitions with transition: all: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.75) should be [0 1 0 -50deg] +Fail CSS Transitions with transition: all: property from [0 1 0 100deg] to [0 1 0 -100deg] at (1) should be [0 1 0 -100deg] +Fail CSS Transitions with transition: all: property from [0 1 0 100deg] to [0 1 0 -100deg] at (2) should be [0 1 0 -300deg] +Pass CSS Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (-1) should be [0 1 0 300deg] +Pass CSS Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0) should be [0 1 0 100deg] +Pass CSS Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.25) should be [0 1 0 50deg] +Fail CSS Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.75) should be [0 1 0 -50deg] +Fail CSS Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (1) should be [0 1 0 -100deg] +Fail CSS Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (2) should be [0 1 0 -300deg] +Pass Web Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (-1) should be [0 1 0 300deg] +Pass Web Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0) should be [0 1 0 100deg] +Pass Web Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.25) should be [0 1 0 50deg] +Fail Web Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (0.75) should be [0 1 0 -50deg] +Fail Web Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (1) should be [0 1 0 -100deg] +Fail Web Animations: property from [0 1 0 100deg] to [0 1 0 -100deg] at (2) should be [0 1 0 -300deg] +Pass CSS Transitions: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (-1) should be [0.22 -0.55 0.8 300deg] +Pass CSS Transitions: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0) should be [0.22 -0.55 0.8 100deg] +Pass CSS Transitions: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.25) should be [0.22 -0.55 0.8 50deg] +Fail CSS Transitions: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.75) should be [0.22 -0.55 0.8 -50deg] +Fail CSS Transitions: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (1) should be [0.22 -0.55 0.8 -100deg] +Fail CSS Transitions: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (2) should be [0.22 -0.55 0.8 -300deg] +Pass CSS Transitions with transition: all: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (-1) should be [0.22 -0.55 0.8 300deg] +Pass CSS Transitions with transition: all: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0) should be [0.22 -0.55 0.8 100deg] +Pass CSS Transitions with transition: all: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.25) should be [0.22 -0.55 0.8 50deg] +Fail CSS Transitions with transition: all: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.75) should be [0.22 -0.55 0.8 -50deg] +Fail CSS Transitions with transition: all: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (1) should be [0.22 -0.55 0.8 -100deg] +Fail CSS Transitions with transition: all: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (2) should be [0.22 -0.55 0.8 -300deg] +Pass CSS Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (-1) should be [0.22 -0.55 0.8 300deg] +Pass CSS Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0) should be [0.22 -0.55 0.8 100deg] +Pass CSS Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.25) should be [0.22 -0.55 0.8 50deg] +Fail CSS Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.75) should be [0.22 -0.55 0.8 -50deg] +Fail CSS Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (1) should be [0.22 -0.55 0.8 -100deg] +Fail CSS Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (2) should be [0.22 -0.55 0.8 -300deg] +Pass Web Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (-1) should be [0.22 -0.55 0.8 300deg] +Pass Web Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0) should be [0.22 -0.55 0.8 100deg] +Pass Web Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.25) should be [0.22 -0.55 0.8 50deg] +Fail Web Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (0.75) should be [0.22 -0.55 0.8 -50deg] +Fail Web Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (1) should be [0.22 -0.55 0.8 -100deg] +Fail Web Animations: property from [1 -2.5 3.64 100deg] to [1 -2.5 3.64 -100deg] at (2) should be [0.22 -0.55 0.8 -300deg] +Fail CSS Transitions: property from [1 0 0 0deg] to [0 1 0 10deg] at (-1) should be [0 1 0 -10deg] +Fail CSS Transitions: property from [1 0 0 0deg] to [0 1 0 10deg] at (0) should be [0 1 0 0deg] +Pass CSS Transitions: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.25) should be [0 1 0 2.5deg] +Pass CSS Transitions: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.75) should be [0 1 0 7.5deg] +Pass CSS Transitions: property from [1 0 0 0deg] to [0 1 0 10deg] at (1) should be [0 1 0 10deg] +Pass CSS Transitions: property from [1 0 0 0deg] to [0 1 0 10deg] at (2) should be [0 1 0 20deg] +Fail CSS Transitions with transition: all: property from [1 0 0 0deg] to [0 1 0 10deg] at (-1) should be [0 1 0 -10deg] +Fail CSS Transitions with transition: all: property from [1 0 0 0deg] to [0 1 0 10deg] at (0) should be [0 1 0 0deg] +Pass CSS Transitions with transition: all: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.25) should be [0 1 0 2.5deg] +Pass CSS Transitions with transition: all: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.75) should be [0 1 0 7.5deg] +Pass CSS Transitions with transition: all: property from [1 0 0 0deg] to [0 1 0 10deg] at (1) should be [0 1 0 10deg] +Pass CSS Transitions with transition: all: property from [1 0 0 0deg] to [0 1 0 10deg] at (2) should be [0 1 0 20deg] +Fail CSS Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (-1) should be [0 1 0 -10deg] +Fail CSS Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (0) should be [0 1 0 0deg] +Pass CSS Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.25) should be [0 1 0 2.5deg] +Pass CSS Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.75) should be [0 1 0 7.5deg] +Pass CSS Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (1) should be [0 1 0 10deg] +Pass CSS Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (2) should be [0 1 0 20deg] +Fail Web Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (-1) should be [0 1 0 -10deg] +Fail Web Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (0) should be [0 1 0 0deg] +Pass Web Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.25) should be [0 1 0 2.5deg] +Pass Web Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (0.75) should be [0 1 0 7.5deg] +Pass Web Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (1) should be [0 1 0 10deg] +Pass Web Animations: property from [1 0 0 0deg] to [0 1 0 10deg] at (2) should be [0 1 0 20deg] +Fail CSS Transitions: property from [1 1 0 90deg] to [0 1 1 135deg] at (-1) should be [0.67 -0.06 -0.74 124.97deg] +Pass CSS Transitions: property from [1 1 0 90deg] to [0 1 1 135deg] at (0) should be [0.71 0.71 0 90deg] +Pass CSS Transitions: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.25) should be [0.54 0.8 0.26 94.83deg] +Pass CSS Transitions: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.75) should be [0.17 0.78 0.61 118.68deg] +Pass CSS Transitions: property from [1 1 0 90deg] to [0 1 1 135deg] at (1) should be [0 0.71 0.71 135deg] +Pass CSS Transitions: property from [1 1 0 90deg] to [0 1 1 135deg] at (2) should be [-0.52 0.29 0.81 208.96deg] +Fail CSS Transitions with transition: all: property from [1 1 0 90deg] to [0 1 1 135deg] at (-1) should be [0.67 -0.06 -0.74 124.97deg] +Pass CSS Transitions with transition: all: property from [1 1 0 90deg] to [0 1 1 135deg] at (0) should be [0.71 0.71 0 90deg] +Pass CSS Transitions with transition: all: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.25) should be [0.54 0.8 0.26 94.83deg] +Pass CSS Transitions with transition: all: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.75) should be [0.17 0.78 0.61 118.68deg] +Pass CSS Transitions with transition: all: property from [1 1 0 90deg] to [0 1 1 135deg] at (1) should be [0 0.71 0.71 135deg] +Pass CSS Transitions with transition: all: property from [1 1 0 90deg] to [0 1 1 135deg] at (2) should be [-0.52 0.29 0.81 208.96deg] +Fail CSS Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (-1) should be [0.67 -0.06 -0.74 124.97deg] +Pass CSS Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (0) should be [0.71 0.71 0 90deg] +Pass CSS Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.25) should be [0.54 0.8 0.26 94.83deg] +Pass CSS Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.75) should be [0.17 0.78 0.61 118.68deg] +Pass CSS Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (1) should be [0 0.71 0.71 135deg] +Pass CSS Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (2) should be [-0.52 0.29 0.81 208.96deg] +Fail Web Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (-1) should be [0.67 -0.06 -0.74 124.97deg] +Pass Web Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (0) should be [0.71 0.71 0 90deg] +Pass Web Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.25) should be [0.54 0.8 0.26 94.83deg] +Pass Web Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (0.75) should be [0.17 0.78 0.61 118.68deg] +Pass Web Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (1) should be [0 0.71 0.71 135deg] +Pass Web Animations: property from [1 1 0 90deg] to [0 1 1 135deg] at (2) should be [-0.52 0.29 0.81 208.96deg] +Fail CSS Transitions: property from [0 1 0 0deg] to [1 0 0 450deg] at (-1) should be [1 0 0 -450deg] +Fail CSS Transitions: property from [0 1 0 0deg] to [1 0 0 450deg] at (0) should be [1 0 0 0deg] +Fail CSS Transitions: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.25) should be [1 0 0 112.5deg] +Fail CSS Transitions: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.75) should be [1 0 0 337.5deg] +Fail CSS Transitions: property from [0 1 0 0deg] to [1 0 0 450deg] at (1) should be [1 0 0 450deg] +Fail CSS Transitions: property from [0 1 0 0deg] to [1 0 0 450deg] at (2) should be [1 0 0 900deg] +Fail CSS Transitions with transition: all: property from [0 1 0 0deg] to [1 0 0 450deg] at (-1) should be [1 0 0 -450deg] +Fail CSS Transitions with transition: all: property from [0 1 0 0deg] to [1 0 0 450deg] at (0) should be [1 0 0 0deg] +Fail CSS Transitions with transition: all: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.25) should be [1 0 0 112.5deg] +Fail CSS Transitions with transition: all: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.75) should be [1 0 0 337.5deg] +Fail CSS Transitions with transition: all: property from [0 1 0 0deg] to [1 0 0 450deg] at (1) should be [1 0 0 450deg] +Fail CSS Transitions with transition: all: property from [0 1 0 0deg] to [1 0 0 450deg] at (2) should be [1 0 0 900deg] +Fail CSS Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (-1) should be [1 0 0 -450deg] +Fail CSS Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (0) should be [1 0 0 0deg] +Fail CSS Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.25) should be [1 0 0 112.5deg] +Fail CSS Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.75) should be [1 0 0 337.5deg] +Fail CSS Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (1) should be [1 0 0 450deg] +Fail CSS Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (2) should be [1 0 0 900deg] +Fail Web Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (-1) should be [1 0 0 -450deg] +Fail Web Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (0) should be [1 0 0 0deg] +Fail Web Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.25) should be [1 0 0 112.5deg] +Fail Web Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (0.75) should be [1 0 0 337.5deg] +Fail Web Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (1) should be [1 0 0 450deg] +Fail Web Animations: property from [0 1 0 0deg] to [1 0 0 450deg] at (2) should be [1 0 0 900deg] +Fail CSS Transitions: property from [1 0 0 450deg] to [0 1 0 0deg] at (-1) should be [1 0 0 900deg] +Fail CSS Transitions: property from [1 0 0 450deg] to [0 1 0 0deg] at (0) should be [1 0 0 450deg] +Fail CSS Transitions: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.25) should be [1 0 0 337.5deg] +Fail CSS Transitions: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.75) should be [1 0 0 112.5deg] +Fail CSS Transitions: property from [1 0 0 450deg] to [0 1 0 0deg] at (1) should be [1 0 0 0deg] +Fail CSS Transitions: property from [1 0 0 450deg] to [0 1 0 0deg] at (2) should be [1 0 0 -450deg] +Fail CSS Transitions with transition: all: property from [1 0 0 450deg] to [0 1 0 0deg] at (-1) should be [1 0 0 900deg] +Fail CSS Transitions with transition: all: property from [1 0 0 450deg] to [0 1 0 0deg] at (0) should be [1 0 0 450deg] +Fail CSS Transitions with transition: all: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.25) should be [1 0 0 337.5deg] +Fail CSS Transitions with transition: all: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.75) should be [1 0 0 112.5deg] +Fail CSS Transitions with transition: all: property from [1 0 0 450deg] to [0 1 0 0deg] at (1) should be [1 0 0 0deg] +Fail CSS Transitions with transition: all: property from [1 0 0 450deg] to [0 1 0 0deg] at (2) should be [1 0 0 -450deg] +Fail CSS Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (-1) should be [1 0 0 900deg] +Fail CSS Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (0) should be [1 0 0 450deg] +Fail CSS Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.25) should be [1 0 0 337.5deg] +Fail CSS Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.75) should be [1 0 0 112.5deg] +Fail CSS Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (1) should be [1 0 0 0deg] +Fail CSS Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (2) should be [1 0 0 -450deg] +Fail Web Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (-1) should be [1 0 0 900deg] +Fail Web Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (0) should be [1 0 0 450deg] +Fail Web Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.25) should be [1 0 0 337.5deg] +Fail Web Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (0.75) should be [1 0 0 112.5deg] +Fail Web Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (1) should be [1 0 0 0deg] +Fail Web Animations: property from [1 0 0 450deg] to [0 1 0 0deg] at (2) should be [1 0 0 -450deg] \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-interpolation.html b/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-interpolation.html new file mode 100644 index 00000000000..8d1e0db70e4 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-transforms/animation/rotate-interpolation.html @@ -0,0 +1,250 @@ + + + + +rotate interpolation + + + + + + + + + + + + + + + + +