diff --git a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp index 1e689ef0a4b..e358b5aa178 100644 --- a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp +++ b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp @@ -3878,8 +3878,17 @@ RefPtr Parser::parse_translate_value(TokenStream Parser::parse_scale_value(TokenStream& tokens) diff --git a/Libraries/LibWeb/CSS/StyleValues/TransformationStyleValue.cpp b/Libraries/LibWeb/CSS/StyleValues/TransformationStyleValue.cpp index 56a0c946275..f9857633d6c 100644 --- a/Libraries/LibWeb/CSS/StyleValues/TransformationStyleValue.cpp +++ b/Libraries/LibWeb/CSS/StyleValues/TransformationStyleValue.cpp @@ -148,11 +148,7 @@ String TransformationStyleValue::to_string(SerializationMode mode) const if (m_properties.property == PropertyID::Translate) { auto resolve_to_string = [mode](CSSStyleValue const& value) -> Optional { if (value.is_length()) { - if (value.as_length().length().raw_value() == 0) - return {}; - } - if (value.is_percentage()) { - if (value.as_percentage().percentage().value() == 0) + if (value.as_length().length().raw_value() == 0 && value.as_length().length().type() == Length::Type::Px) return {}; } return value.to_string(mode); @@ -160,13 +156,19 @@ String TransformationStyleValue::to_string(SerializationMode mode) const auto x_value = resolve_to_string(m_properties.values[0]); auto y_value = resolve_to_string(m_properties.values[1]); - // FIXME: 3D translation + Optional z_value; + if (m_properties.values.size() == 3 && (!m_properties.values[2]->is_length() || m_properties.values[2]->as_length().length() != Length::make_px(0))) + z_value = resolve_to_string(m_properties.values[2]); StringBuilder builder; builder.append(x_value.value_or("0px"_string)); - if (y_value.has_value()) { + if (y_value.has_value() || z_value.has_value()) { builder.append(" "sv); - builder.append(y_value.value()); + builder.append(y_value.value_or("0px"_string)); + } + if (z_value.has_value()) { + builder.append(" "sv); + builder.append(z_value.value()); } return builder.to_string_without_validation(); diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/translate-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/translate-interpolation.txt index 3358493f828..f4c5b27dfd9 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/translate-interpolation.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/translate-interpolation.txt @@ -2,8 +2,8 @@ Harness status: OK Found 408 tests -58 Pass -350 Fail +122 Pass +286 Fail Fail CSS Transitions: property from [-100px] to [100px] at (-1) should be [-300px] Pass CSS Transitions: property from [-100px] to [100px] at (0) should be [-100px] Fail CSS Transitions: property from [-100px] to [100px] at (0.25) should be [-50px] @@ -77,100 +77,100 @@ Fail Web Animations: property from [-100px -50px] to [100px 50px] at Pass Web Animations: property from [-100px -50px] to [100px 50px] at (1) should be [100px 50px] Fail Web Animations: property from [-100px -50px] to [100px 50px] at (2) should be [300px 150px] Fail CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px] -Fail CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] +Pass CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] Fail CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px] Fail CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px] -Fail CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] +Pass CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] Fail CSS Transitions: property from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px] Fail CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px] -Fail CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] +Pass CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] Fail CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px] Fail CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px] -Fail CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] +Pass CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] Fail CSS Transitions with transition: all: property from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px] Fail CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px] -Fail CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] +Pass CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] Fail CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px] Fail CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px] -Fail CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] +Pass CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] Fail CSS Animations: property from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px] Fail Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px] -Fail Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] +Pass Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px] Fail Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px] Fail Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px] -Fail Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] +Pass Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px] Fail Web Animations: property from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px] Fail CSS Transitions: property from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px] -Fail CSS Transitions: property from [0px] to [-100px -50px 100px] at (0) should be [0px] +Pass CSS Transitions: property from [0px] to [-100px -50px 100px] at (0) should be [0px] Fail CSS Transitions: property from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px] Fail CSS Transitions: property from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px] -Fail CSS Transitions: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] +Pass CSS Transitions: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] Fail CSS Transitions: property from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px] Fail CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px] -Fail CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (0) should be [0px] +Pass CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (0) should be [0px] Fail CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px] Fail CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px] -Fail CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] +Pass CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] Fail CSS Transitions with transition: all: property from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px] Fail CSS Animations: property from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px] -Fail CSS Animations: property from [0px] to [-100px -50px 100px] at (0) should be [0px] +Pass CSS Animations: property from [0px] to [-100px -50px 100px] at (0) should be [0px] Fail CSS Animations: property from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px] Fail CSS Animations: property from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px] -Fail CSS Animations: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] +Pass CSS Animations: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] Fail CSS Animations: property from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px] Fail Web Animations: property from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px] -Fail Web Animations: property from [0px] to [-100px -50px 100px] at (0) should be [0px] +Pass Web Animations: property from [0px] to [-100px -50px 100px] at (0) should be [0px] Fail Web Animations: property from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px] Fail Web Animations: property from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px] -Fail Web Animations: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] +Pass Web Animations: property from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px] Fail Web Animations: property from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px] Fail CSS Transitions: property from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px] -Fail CSS Transitions: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] +Pass CSS Transitions: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] Fail CSS Transitions: property from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px] Fail CSS Transitions: property from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px] -Fail CSS Transitions: property from [-100px -50px 100px] to [0px] at (1) should be [0px] +Pass CSS Transitions: property from [-100px -50px 100px] to [0px] at (1) should be [0px] Fail CSS Transitions: property from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px] Fail CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px] -Fail CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] +Pass CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] Fail CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px] Fail CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px] -Fail CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (1) should be [0px] +Pass CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (1) should be [0px] Fail CSS Transitions with transition: all: property from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px] Fail CSS Animations: property from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px] -Fail CSS Animations: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] +Pass CSS Animations: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] Fail CSS Animations: property from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px] Fail CSS Animations: property from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px] -Fail CSS Animations: property from [-100px -50px 100px] to [0px] at (1) should be [0px] +Pass CSS Animations: property from [-100px -50px 100px] to [0px] at (1) should be [0px] Fail CSS Animations: property from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px] Fail Web Animations: property from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px] -Fail Web Animations: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] +Pass Web Animations: property from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px] Fail Web Animations: property from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px] Fail Web Animations: property from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px] -Fail Web Animations: property from [-100px -50px 100px] to [0px] at (1) should be [0px] +Pass Web Animations: property from [-100px -50px 100px] to [0px] at (1) should be [0px] Fail Web Animations: property from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px] Fail CSS Transitions: property from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] Fail CSS Transitions: property from [480px 400px 320px] to [240% 160%] at (0) should be [calc(0% + 480px) calc(0% + 400px) 320px] Fail CSS Transitions: property from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] Fail CSS Transitions: property from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] -Fail CSS Transitions: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] +Pass CSS Transitions: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] Fail CSS Transitions: property from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px] Fail CSS Transitions with transition: all: property from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] Fail CSS Transitions with transition: all: property from [480px 400px 320px] to [240% 160%] at (0) should be [calc(0% + 480px) calc(0% + 400px) 320px] Fail CSS Transitions with transition: all: property from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] Fail CSS Transitions with transition: all: property from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] -Fail CSS Transitions with transition: all: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] +Pass CSS Transitions with transition: all: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] Fail CSS Transitions with transition: all: property from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px] Fail CSS Animations: property from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] Fail CSS Animations: property from [480px 400px 320px] to [240% 160%] at (0) should be [calc(0% + 480px) calc(0% + 400px) 320px] Fail CSS Animations: property from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] Fail CSS Animations: property from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] -Fail CSS Animations: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] +Pass CSS Animations: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] Fail CSS Animations: property from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px] Fail Web Animations: property from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px] Fail Web Animations: property from [480px 400px 320px] to [240% 160%] at (0) should be [calc(0% + 480px) calc(0% + 400px) 320px] Fail Web Animations: property from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px] Fail Web Animations: property from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px] -Fail Web Animations: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] +Pass Web Animations: property from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%] Fail Web Animations: property from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px] 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] @@ -200,25 +200,25 @@ Fail CSS Transitions: property from [none] to [8px 80% 800px] at (-1 Fail CSS Transitions: property from [none] to [8px 80% 800px] at (0) should be [0px 0%] Fail CSS Transitions: property from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px] Fail CSS Transitions: property from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px] -Fail CSS Transitions: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] +Pass CSS Transitions: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] Fail CSS Transitions: property from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px] Fail CSS Transitions with transition: all: property from [none] to [8px 80% 800px] at (-1) should be [-8px -80% -800px] Fail CSS Transitions with transition: all: property from [none] to [8px 80% 800px] at (0) should be [0px 0%] Fail CSS Transitions with transition: all: property from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px] Fail CSS Transitions with transition: all: property from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px] -Fail CSS Transitions with transition: all: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] +Pass CSS Transitions with transition: all: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] Fail CSS Transitions with transition: all: property from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px] Fail CSS Animations: property from [none] to [8px 80% 800px] at (-1) should be [-8px -80% -800px] Fail CSS Animations: property from [none] to [8px 80% 800px] at (0) should be [0px 0%] Fail CSS Animations: property from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px] Fail CSS Animations: property from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px] -Fail CSS Animations: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] +Pass CSS Animations: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] Fail CSS Animations: property from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px] Fail Web Animations: property from [none] to [8px 80% 800px] at (-1) should be [-8px -80% -800px] Fail Web Animations: property from [none] to [8px 80% 800px] at (0) should be [0px 0%] Fail Web Animations: property from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px] Fail Web Animations: property from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px] -Fail Web Animations: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] +Pass Web Animations: property from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px] Fail Web Animations: property from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px] Fail CSS Transitions: property from neutral to [20px] at (-1) should be [0px] Pass CSS Transitions: property from neutral to [20px] at (0) should be [10px] @@ -248,46 +248,46 @@ Fail CSS Transitions: property from [initial] to [200px 100px 200px] Fail CSS Transitions: property from [initial] to [200px 100px 200px] at (0) should be [0px] Fail CSS Transitions: property from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px] Fail CSS Transitions: property from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px] -Fail CSS Transitions: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass CSS Transitions: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail CSS Transitions: property from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px] Fail CSS Transitions with transition: all: property from [initial] to [200px 100px 200px] at (-1) should be [-200px -100px -200px] Fail CSS Transitions with transition: all: property from [initial] to [200px 100px 200px] at (0) should be [0px] Fail CSS Transitions with transition: all: property from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px] Fail CSS Transitions with transition: all: property from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px] -Fail CSS Transitions with transition: all: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass CSS Transitions with transition: all: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail CSS Transitions with transition: all: property from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px] Fail CSS Animations: property from [initial] to [200px 100px 200px] at (-1) should be [-200px -100px -200px] Fail CSS Animations: property from [initial] to [200px 100px 200px] at (0) should be [0px] Fail CSS Animations: property from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px] Fail CSS Animations: property from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px] -Fail CSS Animations: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass CSS Animations: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail CSS Animations: property from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px] Fail Web Animations: property from [initial] to [200px 100px 200px] at (-1) should be [-200px -100px -200px] Fail Web Animations: property from [initial] to [200px 100px 200px] at (0) should be [0px] Fail Web Animations: property from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px] Fail Web Animations: property from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px] -Fail Web Animations: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass Web Animations: property from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail Web Animations: property from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px] Fail CSS Transitions: property from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px] -Fail CSS Transitions: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] +Pass CSS Transitions: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] Fail CSS Transitions: property from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px] Fail CSS Transitions: property from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px] Fail CSS Transitions: property from [200px 100px 400px] to [initial] at (1) should be [0px] Fail CSS Transitions: property from [200px 100px 400px] to [initial] at (2) should be [-200px -100px -400px] Fail CSS Transitions with transition: all: property from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px] -Fail CSS Transitions with transition: all: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] +Pass CSS Transitions with transition: all: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] Fail CSS Transitions with transition: all: property from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px] Fail CSS Transitions with transition: all: property from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px] Fail CSS Transitions with transition: all: property from [200px 100px 400px] to [initial] at (1) should be [0px] Fail CSS Transitions with transition: all: property from [200px 100px 400px] to [initial] at (2) should be [-200px -100px -400px] Fail CSS Animations: property from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px] -Fail CSS Animations: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] +Pass CSS Animations: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] Fail CSS Animations: property from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px] Fail CSS Animations: property from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px] Fail CSS Animations: property from [200px 100px 400px] to [initial] at (1) should be [0px] Fail CSS Animations: property from [200px 100px 400px] to [initial] at (2) should be [-200px -100px -400px] Fail Web Animations: property from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px] -Fail Web Animations: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] +Pass Web Animations: property from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px] Fail Web Animations: property from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px] Fail Web Animations: property from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px] Fail Web Animations: property from [200px 100px 400px] to [initial] at (1) should be [0px] @@ -317,97 +317,97 @@ Fail Web Animations: property from [unset] to [20px] at (0.75) shoul Pass Web Animations: property from [unset] to [20px] at (1) should be [20px] Fail Web Animations: property from [unset] to [20px] at (2) should be [40px] Fail CSS Transitions: property from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px] -Fail CSS Transitions: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] +Pass CSS Transitions: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] Fail CSS Transitions: property from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px] Fail CSS Transitions: property from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px] -Fail CSS Transitions: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass CSS Transitions: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail CSS Transitions: property from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px] Fail CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px] -Fail CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] +Pass CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] Fail CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px] Fail CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px] -Fail CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail CSS Transitions with transition: all: property from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px] Fail CSS Animations: property from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px] -Fail CSS Animations: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] +Pass CSS Animations: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] Fail CSS Animations: property from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px] Fail CSS Animations: property from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px] -Fail CSS Animations: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass CSS Animations: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail CSS Animations: property from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px] Fail Web Animations: property from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px] -Fail Web Animations: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] +Pass Web Animations: property from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px] Fail Web Animations: property from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px] Fail Web Animations: property from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px] -Fail Web Animations: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] +Pass Web Animations: property from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px] Fail Web Animations: property from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px] Fail CSS Transitions: property from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px] -Fail CSS Transitions: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] +Pass CSS Transitions: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] Fail CSS Transitions: property from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px] Fail CSS Transitions: property from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px] -Fail CSS Transitions: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] +Pass CSS Transitions: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] Fail CSS Transitions: property from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px] Fail CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px] -Fail CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] +Pass CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] Fail CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px] Fail CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px] -Fail CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] +Pass CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] Fail CSS Transitions with transition: all: property from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px] Fail CSS Animations: property from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px] -Fail CSS Animations: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] +Pass CSS Animations: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] Fail CSS Animations: property from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px] Fail CSS Animations: property from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px] -Fail CSS Animations: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] +Pass CSS Animations: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] Fail CSS Animations: property from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px] Fail Web Animations: property from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px] -Fail Web Animations: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] +Pass Web Animations: property from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px] Fail Web Animations: property from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px] Fail Web Animations: property from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px] -Fail Web Animations: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] +Pass Web Animations: property from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px] Fail Web Animations: property from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px] Fail CSS Transitions: property from [initial] to [inherit] at (-1) should be [-100px -200px -300px] Fail CSS Transitions: property from [initial] to [inherit] at (0) should be [0px] Fail CSS Transitions: property from [initial] to [inherit] at (0.25) should be [25px 50px 75px] Fail CSS Transitions: property from [initial] to [inherit] at (0.75) should be [75px 150px 225px] -Fail CSS Transitions: property from [initial] to [inherit] at (1) should be [100px 200px 300px] +Pass CSS Transitions: property from [initial] to [inherit] at (1) should be [100px 200px 300px] Fail CSS Transitions: property from [initial] to [inherit] at (2) should be [200px 400px 600px] Fail CSS Transitions with transition: all: property from [initial] to [inherit] at (-1) should be [-100px -200px -300px] Fail CSS Transitions with transition: all: property from [initial] to [inherit] at (0) should be [0px] Fail CSS Transitions with transition: all: property from [initial] to [inherit] at (0.25) should be [25px 50px 75px] Fail CSS Transitions with transition: all: property from [initial] to [inherit] at (0.75) should be [75px 150px 225px] -Fail CSS Transitions with transition: all: property from [initial] to [inherit] at (1) should be [100px 200px 300px] +Pass CSS Transitions with transition: all: property from [initial] to [inherit] at (1) should be [100px 200px 300px] Fail CSS Transitions with transition: all: property from [initial] to [inherit] at (2) should be [200px 400px 600px] Fail CSS Animations: property from [initial] to [inherit] at (-1) should be [-100px -200px -300px] Fail CSS Animations: property from [initial] to [inherit] at (0) should be [0px] Fail CSS Animations: property from [initial] to [inherit] at (0.25) should be [25px 50px 75px] Fail CSS Animations: property from [initial] to [inherit] at (0.75) should be [75px 150px 225px] -Fail CSS Animations: property from [initial] to [inherit] at (1) should be [100px 200px 300px] +Pass CSS Animations: property from [initial] to [inherit] at (1) should be [100px 200px 300px] Fail CSS Animations: property from [initial] to [inherit] at (2) should be [200px 400px 600px] Fail Web Animations: property from [initial] to [inherit] at (-1) should be [-100px -200px -300px] Fail Web Animations: property from [initial] to [inherit] at (0) should be [0px] Fail Web Animations: property from [initial] to [inherit] at (0.25) should be [25px 50px 75px] Fail Web Animations: property from [initial] to [inherit] at (0.75) should be [75px 150px 225px] -Fail Web Animations: property from [initial] to [inherit] at (1) should be [100px 200px 300px] +Pass Web Animations: property from [initial] to [inherit] at (1) should be [100px 200px 300px] Fail Web Animations: property from [initial] to [inherit] at (2) should be [200px 400px 600px] Fail CSS Transitions: property from [inherit] to [initial] at (-1) should be [200px 400px 600px] -Fail CSS Transitions: property from [inherit] to [initial] at (0) should be [100px 200px 300px] +Pass CSS Transitions: property from [inherit] to [initial] at (0) should be [100px 200px 300px] Fail CSS Transitions: property from [inherit] to [initial] at (0.25) should be [75px 150px 225px] Fail CSS Transitions: property from [inherit] to [initial] at (0.75) should be [25px 50px 75px] Fail CSS Transitions: property from [inherit] to [initial] at (1) should be [0px] Fail CSS Transitions: property from [inherit] to [initial] at (2) should be [-100px -200px -300px] Fail CSS Transitions with transition: all: property from [inherit] to [initial] at (-1) should be [200px 400px 600px] -Fail CSS Transitions with transition: all: property from [inherit] to [initial] at (0) should be [100px 200px 300px] +Pass CSS Transitions with transition: all: property from [inherit] to [initial] at (0) should be [100px 200px 300px] Fail CSS Transitions with transition: all: property from [inherit] to [initial] at (0.25) should be [75px 150px 225px] Fail CSS Transitions with transition: all: property from [inherit] to [initial] at (0.75) should be [25px 50px 75px] Fail CSS Transitions with transition: all: property from [inherit] to [initial] at (1) should be [0px] Fail CSS Transitions with transition: all: property from [inherit] to [initial] at (2) should be [-100px -200px -300px] Fail CSS Animations: property from [inherit] to [initial] at (-1) should be [200px 400px 600px] -Fail CSS Animations: property from [inherit] to [initial] at (0) should be [100px 200px 300px] +Pass CSS Animations: property from [inherit] to [initial] at (0) should be [100px 200px 300px] Fail CSS Animations: property from [inherit] to [initial] at (0.25) should be [75px 150px 225px] Fail CSS Animations: property from [inherit] to [initial] at (0.75) should be [25px 50px 75px] Fail CSS Animations: property from [inherit] to [initial] at (1) should be [0px] Fail CSS Animations: property from [inherit] to [initial] at (2) should be [-100px -200px -300px] Fail Web Animations: property from [inherit] to [initial] at (-1) should be [200px 400px 600px] -Fail Web Animations: property from [inherit] to [initial] at (0) should be [100px 200px 300px] +Pass Web Animations: property from [inherit] to [initial] at (0) should be [100px 200px 300px] Fail Web Animations: property from [inherit] to [initial] at (0.25) should be [75px 150px 225px] Fail Web Animations: property from [inherit] to [initial] at (0.75) should be [25px 50px 75px] Fail Web Animations: property from [inherit] to [initial] at (1) should be [0px] diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-computed.txt index ec6daa767f3..ca26495c2ac 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-computed.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-computed.txt @@ -2,24 +2,24 @@ Harness status: OK Found 19 tests -8 Pass -11 Fail +17 Pass +2 Fail Pass Property translate value 'none' Pass Property translate value '0px' Pass Property translate value '100%' Pass Property translate value '100px 0px' Pass Property translate value '100px 0.1px' -Fail Property translate value '100px 0%' +Pass Property translate value '100px 0%' Fail Property translate value '100px calc(10px - 10%)' Pass Property translate value '100px 200%' Pass Property translate value '100% 200px' -Fail Property translate value '100px 200px 0px' -Fail Property translate value '100px 0px 300px' -Fail Property translate value '100px 0px 0px' -Fail Property translate value '100px 200px 300px' -Fail Property translate value '100% 200% 300px' -Fail Property translate value '100% 0% 200px' -Fail Property translate value '0% 0% 100px' +Pass Property translate value '100px 200px 0px' +Pass Property translate value '100px 0px 300px' +Pass Property translate value '100px 0px 0px' +Pass Property translate value '100px 200px 300px' +Pass Property translate value '100% 200% 300px' +Pass Property translate value '100% 0% 200px' +Pass Property translate value '0% 0% 100px' Fail Property translate value '0em 0em 100px' Pass Property translate value '0' -Fail Property translate value '1px 2px 0' \ No newline at end of file +Pass Property translate value '1px 2px 0' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-valid.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-valid.txt index 13877376460..5c69f17dcdd 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-valid.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/parsing/translate-parsing-valid.txt @@ -2,25 +2,25 @@ Harness status: OK Found 20 tests -8 Pass -12 Fail +18 Pass +2 Fail Pass e.style['translate'] = "none" should set the property value Pass e.style['translate'] = "0px" should set the property value Pass e.style['translate'] = "100%" should set the property value Pass e.style['translate'] = "100px 0px" should set the property value Pass e.style['translate'] = "100px 0.1px" should set the property value -Fail e.style['translate'] = "100px 0%" should set the property value +Pass e.style['translate'] = "100px 0%" should set the property value Fail e.style['translate'] = "100px calc(10px - 10%)" should set the property value Pass e.style['translate'] = "100px 200%" should set the property value Pass e.style['translate'] = "100% 200px" should set the property value -Fail e.style['translate'] = "100px 200px 0px" should set the property value -Fail e.style['translate'] = "100px 0px 300px" should set the property value -Fail e.style['translate'] = "100px 0px 0px" should set the property value -Fail e.style['translate'] = "100px 200px 300px" should set the property value -Fail e.style['translate'] = "100% 200% 300px" should set the property value -Fail e.style['translate'] = "100% 0% 200px" should set the property value -Fail e.style['translate'] = "0% 0% 100px" should set the property value -Fail e.style['translate'] = "0em 0em 100px" should set the property value +Pass e.style['translate'] = "100px 200px 0px" should set the property value +Pass e.style['translate'] = "100px 0px 300px" should set the property value +Pass e.style['translate'] = "100px 0px 0px" should set the property value +Pass e.style['translate'] = "100px 200px 300px" should set the property value +Pass e.style['translate'] = "100% 200% 300px" should set the property value +Pass e.style['translate'] = "100% 0% 200px" should set the property value +Pass e.style['translate'] = "0% 0% 100px" should set the property value +Pass e.style['translate'] = "0em 0em 100px" should set the property value Fail e.style['translate'] = "calc(10% + 10px) calc(20% + 20px) calc(30em + 30px)" should set the property value Pass e.style['translate'] = "0" should set the property value -Fail e.style['translate'] = "1px 2px 0" should set the property value \ No newline at end of file +Pass e.style['translate'] = "1px 2px 0" should set the property value \ No newline at end of file