1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibWeb: Support parsing and serializing 3D translate values

This commit is contained in:
Tim Ledbetter 2025-04-30 09:03:18 +01:00 committed by Andreas Kling
parent d804f1311c
commit 27baaa13e9
Notes: github-actions[bot] 2025-04-30 17:37:57 +00:00
5 changed files with 109 additions and 98 deletions

View file

@ -3878,8 +3878,17 @@ RefPtr<CSSStyleValue const> Parser::parse_translate_value(TokenStream<ComponentV
if (!maybe_y)
return nullptr;
if (!tokens.has_next_token()) {
transaction.commit();
return TransformationStyleValue::create(PropertyID::Translate, TransformFunction::Translate, { maybe_x.release_nonnull(), maybe_y.release_nonnull() });
}
auto maybe_z = parse_length_value(tokens);
if (!maybe_z)
return nullptr;
transaction.commit();
return TransformationStyleValue::create(PropertyID::Translate, TransformFunction::Translate, { maybe_x.release_nonnull(), maybe_y.release_nonnull() });
return TransformationStyleValue::create(PropertyID::Translate, TransformFunction::Translate3d, { maybe_x.release_nonnull(), maybe_y.release_nonnull(), maybe_z.release_nonnull() });
}
RefPtr<CSSStyleValue const> Parser::parse_scale_value(TokenStream<ComponentValue>& tokens)

View file

@ -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<String> {
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<String> 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();

View file

@ -2,8 +2,8 @@ Harness status: OK
Found 408 tests
58 Pass
350 Fail
122 Pass
286 Fail
Fail CSS Transitions: property <translate> from [-100px] to [100px] at (-1) should be [-300px]
Pass CSS Transitions: property <translate> from [-100px] to [100px] at (0) should be [-100px]
Fail CSS Transitions: property <translate> from [-100px] to [100px] at (0.25) should be [-50px]
@ -77,100 +77,100 @@ Fail Web Animations: property <translate> from [-100px -50px] to [100px 50px] at
Pass Web Animations: property <translate> from [-100px -50px] to [100px 50px] at (1) should be [100px 50px]
Fail Web Animations: property <translate> from [-100px -50px] to [100px 50px] at (2) should be [300px 150px]
Fail CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px]
Fail CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Pass CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Fail CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px]
Fail CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px]
Fail CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Pass CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Fail CSS Transitions: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px]
Fail CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px]
Fail CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Pass CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Fail CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px]
Fail CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px]
Fail CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Pass CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Fail CSS Transitions with transition: all: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px]
Fail CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px]
Fail CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Pass CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Fail CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px]
Fail CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px]
Fail CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Pass CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Fail CSS Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px]
Fail Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (-1) should be [140px 80px 20px]
Fail Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Pass Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0) should be [220px 240px 260px]
Fail Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.125) should be [230px 260px 290px]
Fail Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (0.875) should be [290px 380px 470px]
Fail Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Pass Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (1) should be [300px 400px 500px]
Fail Web Animations: property <translate> from [220px 240px 260px] to [300px 400px 500px] at (2) should be [380px 560px 740px]
Fail CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px]
Fail CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Pass CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Fail CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px]
Fail CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px]
Fail CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Pass CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Fail CSS Transitions: property <translate> from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px]
Fail CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px]
Fail CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Pass CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Fail CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px]
Fail CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px]
Fail CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Pass CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Fail CSS Transitions with transition: all: property <translate> from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px]
Fail CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px]
Fail CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Pass CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Fail CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px]
Fail CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px]
Fail CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Pass CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Fail CSS Animations: property <translate> from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px]
Fail Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (-1) should be [100px 50px -100px]
Fail Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Pass Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (0) should be [0px]
Fail Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (0.25) should be [-25px -12.5px 25px]
Fail Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (0.75) should be [-75px -37.5px 75px]
Fail Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Pass Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (1) should be [-100px -50px 100px]
Fail Web Animations: property <translate> from [0px] to [-100px -50px 100px] at (2) should be [-200px -100px 200px]
Fail CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px]
Fail CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Pass CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Fail CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px]
Fail CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px]
Fail CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Pass CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Fail CSS Transitions: property <translate> from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px]
Fail CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px]
Fail CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Pass CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Fail CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px]
Fail CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px]
Fail CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Pass CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Fail CSS Transitions with transition: all: property <translate> from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px]
Fail CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px]
Fail CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Pass CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Fail CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px]
Fail CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px]
Fail CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Pass CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Fail CSS Animations: property <translate> from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px]
Fail Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (-1) should be [-200px -100px 200px]
Fail Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Pass Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (0) should be [-100px -50px 100px]
Fail Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (0.25) should be [-75px -37.5px 75px]
Fail Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (0.75) should be [-25px -12.5px 25px]
Fail Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Pass Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (1) should be [0px]
Fail Web Animations: property <translate> from [-100px -50px 100px] to [0px] at (2) should be [100px 50px -100px]
Fail CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px]
Fail CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [calc(0% + 480px) calc(0% + 400px) 320px]
Fail CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px]
Fail CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px]
Fail CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Pass CSS Transitions: property <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Fail CSS Transitions: property <translate> 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 <translate> 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 <translate> 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 <translate> 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 <translate> 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 <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Pass CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Fail CSS Transitions with transition: all: property <translate> from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px]
Fail CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px]
Fail CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [calc(0% + 480px) calc(0% + 400px) 320px]
Fail CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px]
Fail CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px]
Fail CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Pass CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Fail CSS Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px]
Fail Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (-1) should be [calc(960px - 240%) calc(800px - 160%) 640px]
Fail Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0) should be [calc(0% + 480px) calc(0% + 400px) 320px]
Fail Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.125) should be [calc(420px + 30%) calc(350px + 20%) 280px]
Fail Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (0.875) should be [calc(210% + 60px) calc(140% + 50px) 40px]
Fail Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Pass Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (1) should be [240% 160%]
Fail Web Animations: property <translate> from [480px 400px 320px] to [240% 160%] at (2) should be [calc(480% - 480px) calc(320% - 400px) -320px]
Pass CSS Transitions: property <translate> from [none] to [none] at (-1) should be [none]
Pass CSS Transitions: property <translate> from [none] to [none] at (0) should be [none]
@ -200,25 +200,25 @@ Fail CSS Transitions: property <translate> from [none] to [8px 80% 800px] at (-1
Fail CSS Transitions: property <translate> from [none] to [8px 80% 800px] at (0) should be [0px 0%]
Fail CSS Transitions: property <translate> from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px]
Fail CSS Transitions: property <translate> from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px]
Fail CSS Transitions: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Pass CSS Transitions: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Fail CSS Transitions: property <translate> from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px]
Fail CSS Transitions with transition: all: property <translate> from [none] to [8px 80% 800px] at (-1) should be [-8px -80% -800px]
Fail CSS Transitions with transition: all: property <translate> from [none] to [8px 80% 800px] at (0) should be [0px 0%]
Fail CSS Transitions with transition: all: property <translate> from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px]
Fail CSS Transitions with transition: all: property <translate> from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px]
Fail CSS Transitions with transition: all: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Pass CSS Transitions with transition: all: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Fail CSS Transitions with transition: all: property <translate> from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px]
Fail CSS Animations: property <translate> from [none] to [8px 80% 800px] at (-1) should be [-8px -80% -800px]
Fail CSS Animations: property <translate> from [none] to [8px 80% 800px] at (0) should be [0px 0%]
Fail CSS Animations: property <translate> from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px]
Fail CSS Animations: property <translate> from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px]
Fail CSS Animations: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Pass CSS Animations: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Fail CSS Animations: property <translate> from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px]
Fail Web Animations: property <translate> from [none] to [8px 80% 800px] at (-1) should be [-8px -80% -800px]
Fail Web Animations: property <translate> from [none] to [8px 80% 800px] at (0) should be [0px 0%]
Fail Web Animations: property <translate> from [none] to [8px 80% 800px] at (0.125) should be [1px 10% 100px]
Fail Web Animations: property <translate> from [none] to [8px 80% 800px] at (0.875) should be [7px 70% 700px]
Fail Web Animations: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Pass Web Animations: property <translate> from [none] to [8px 80% 800px] at (1) should be [8px 80% 800px]
Fail Web Animations: property <translate> from [none] to [8px 80% 800px] at (2) should be [16px 160% 1600px]
Fail CSS Transitions: property <translate> from neutral to [20px] at (-1) should be [0px]
Pass CSS Transitions: property <translate> from neutral to [20px] at (0) should be [10px]
@ -248,46 +248,46 @@ Fail CSS Transitions: property <translate> from [initial] to [200px 100px 200px]
Fail CSS Transitions: property <translate> from [initial] to [200px 100px 200px] at (0) should be [0px]
Fail CSS Transitions: property <translate> from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px]
Fail CSS Transitions: property <translate> from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px]
Fail CSS Transitions: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass CSS Transitions: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail CSS Transitions: property <translate> from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [200px 100px 200px] at (-1) should be [-200px -100px -200px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [200px 100px 200px] at (0) should be [0px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass CSS Transitions with transition: all: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px]
Fail CSS Animations: property <translate> from [initial] to [200px 100px 200px] at (-1) should be [-200px -100px -200px]
Fail CSS Animations: property <translate> from [initial] to [200px 100px 200px] at (0) should be [0px]
Fail CSS Animations: property <translate> from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px]
Fail CSS Animations: property <translate> from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px]
Fail CSS Animations: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass CSS Animations: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail CSS Animations: property <translate> from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px]
Fail Web Animations: property <translate> from [initial] to [200px 100px 200px] at (-1) should be [-200px -100px -200px]
Fail Web Animations: property <translate> from [initial] to [200px 100px 200px] at (0) should be [0px]
Fail Web Animations: property <translate> from [initial] to [200px 100px 200px] at (0.25) should be [50px 25px 50px]
Fail Web Animations: property <translate> from [initial] to [200px 100px 200px] at (0.75) should be [150px 75px 150px]
Fail Web Animations: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass Web Animations: property <translate> from [initial] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail Web Animations: property <translate> from [initial] to [200px 100px 200px] at (2) should be [400px 200px 400px]
Fail CSS Transitions: property <translate> from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px]
Fail CSS Transitions: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Pass CSS Transitions: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Fail CSS Transitions: property <translate> from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px]
Fail CSS Transitions: property <translate> from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px]
Fail CSS Transitions: property <translate> from [200px 100px 400px] to [initial] at (1) should be [0px]
Fail CSS Transitions: property <translate> from [200px 100px 400px] to [initial] at (2) should be [-200px -100px -400px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Pass CSS Transitions with transition: all: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 400px] to [initial] at (1) should be [0px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 400px] to [initial] at (2) should be [-200px -100px -400px]
Fail CSS Animations: property <translate> from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px]
Fail CSS Animations: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Pass CSS Animations: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Fail CSS Animations: property <translate> from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px]
Fail CSS Animations: property <translate> from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px]
Fail CSS Animations: property <translate> from [200px 100px 400px] to [initial] at (1) should be [0px]
Fail CSS Animations: property <translate> from [200px 100px 400px] to [initial] at (2) should be [-200px -100px -400px]
Fail Web Animations: property <translate> from [200px 100px 400px] to [initial] at (-1) should be [400px 200px 800px]
Fail Web Animations: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Pass Web Animations: property <translate> from [200px 100px 400px] to [initial] at (0) should be [200px 100px 400px]
Fail Web Animations: property <translate> from [200px 100px 400px] to [initial] at (0.25) should be [150px 75px 300px]
Fail Web Animations: property <translate> from [200px 100px 400px] to [initial] at (0.75) should be [50px 25px 100px]
Fail Web Animations: property <translate> from [200px 100px 400px] to [initial] at (1) should be [0px]
@ -317,97 +317,97 @@ Fail Web Animations: property <translate> from [unset] to [20px] at (0.75) shoul
Pass Web Animations: property <translate> from [unset] to [20px] at (1) should be [20px]
Fail Web Animations: property <translate> from [unset] to [20px] at (2) should be [40px]
Fail CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px]
Fail CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Pass CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Fail CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px]
Fail CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px]
Fail CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail CSS Transitions: property <translate> from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Pass CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px]
Fail CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px]
Fail CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Pass CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Fail CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px]
Fail CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px]
Fail CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail CSS Animations: property <translate> from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px]
Fail Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (-1) should be [0px 300px 400px]
Fail Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Pass Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (0) should be [100px 200px 300px]
Fail Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (0.25) should be [125px 175px 275px]
Fail Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (0.75) should be [175px 125px 225px]
Fail Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Pass Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (1) should be [200px 100px 200px]
Fail Web Animations: property <translate> from [inherit] to [200px 100px 200px] at (2) should be [300px 0px 100px]
Fail CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px]
Fail CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Pass CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Fail CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px]
Fail CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px]
Fail CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Pass CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Fail CSS Transitions: property <translate> from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Pass CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Pass CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Fail CSS Transitions with transition: all: property <translate> from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px]
Fail CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px]
Fail CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Pass CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Fail CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px]
Fail CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px]
Fail CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Pass CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Fail CSS Animations: property <translate> from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px]
Fail Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (-1) should be [300px 0px 100px]
Fail Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Pass Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (0) should be [200px 100px 200px]
Fail Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (0.25) should be [175px 125px 225px]
Fail Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (0.75) should be [125px 175px 275px]
Fail Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Pass Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (1) should be [100px 200px 300px]
Fail Web Animations: property <translate> from [200px 100px 200px] to [inherit] at (2) should be [0px 300px 400px]
Fail CSS Transitions: property <translate> from [initial] to [inherit] at (-1) should be [-100px -200px -300px]
Fail CSS Transitions: property <translate> from [initial] to [inherit] at (0) should be [0px]
Fail CSS Transitions: property <translate> from [initial] to [inherit] at (0.25) should be [25px 50px 75px]
Fail CSS Transitions: property <translate> from [initial] to [inherit] at (0.75) should be [75px 150px 225px]
Fail CSS Transitions: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Pass CSS Transitions: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Fail CSS Transitions: property <translate> from [initial] to [inherit] at (2) should be [200px 400px 600px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [inherit] at (-1) should be [-100px -200px -300px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [inherit] at (0) should be [0px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [inherit] at (0.25) should be [25px 50px 75px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [inherit] at (0.75) should be [75px 150px 225px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Pass CSS Transitions with transition: all: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Fail CSS Transitions with transition: all: property <translate> from [initial] to [inherit] at (2) should be [200px 400px 600px]
Fail CSS Animations: property <translate> from [initial] to [inherit] at (-1) should be [-100px -200px -300px]
Fail CSS Animations: property <translate> from [initial] to [inherit] at (0) should be [0px]
Fail CSS Animations: property <translate> from [initial] to [inherit] at (0.25) should be [25px 50px 75px]
Fail CSS Animations: property <translate> from [initial] to [inherit] at (0.75) should be [75px 150px 225px]
Fail CSS Animations: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Pass CSS Animations: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Fail CSS Animations: property <translate> from [initial] to [inherit] at (2) should be [200px 400px 600px]
Fail Web Animations: property <translate> from [initial] to [inherit] at (-1) should be [-100px -200px -300px]
Fail Web Animations: property <translate> from [initial] to [inherit] at (0) should be [0px]
Fail Web Animations: property <translate> from [initial] to [inherit] at (0.25) should be [25px 50px 75px]
Fail Web Animations: property <translate> from [initial] to [inherit] at (0.75) should be [75px 150px 225px]
Fail Web Animations: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Pass Web Animations: property <translate> from [initial] to [inherit] at (1) should be [100px 200px 300px]
Fail Web Animations: property <translate> from [initial] to [inherit] at (2) should be [200px 400px 600px]
Fail CSS Transitions: property <translate> from [inherit] to [initial] at (-1) should be [200px 400px 600px]
Fail CSS Transitions: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Pass CSS Transitions: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Fail CSS Transitions: property <translate> from [inherit] to [initial] at (0.25) should be [75px 150px 225px]
Fail CSS Transitions: property <translate> from [inherit] to [initial] at (0.75) should be [25px 50px 75px]
Fail CSS Transitions: property <translate> from [inherit] to [initial] at (1) should be [0px]
Fail CSS Transitions: property <translate> from [inherit] to [initial] at (2) should be [-100px -200px -300px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [initial] at (-1) should be [200px 400px 600px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Pass CSS Transitions with transition: all: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [initial] at (0.25) should be [75px 150px 225px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [initial] at (0.75) should be [25px 50px 75px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [initial] at (1) should be [0px]
Fail CSS Transitions with transition: all: property <translate> from [inherit] to [initial] at (2) should be [-100px -200px -300px]
Fail CSS Animations: property <translate> from [inherit] to [initial] at (-1) should be [200px 400px 600px]
Fail CSS Animations: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Pass CSS Animations: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Fail CSS Animations: property <translate> from [inherit] to [initial] at (0.25) should be [75px 150px 225px]
Fail CSS Animations: property <translate> from [inherit] to [initial] at (0.75) should be [25px 50px 75px]
Fail CSS Animations: property <translate> from [inherit] to [initial] at (1) should be [0px]
Fail CSS Animations: property <translate> from [inherit] to [initial] at (2) should be [-100px -200px -300px]
Fail Web Animations: property <translate> from [inherit] to [initial] at (-1) should be [200px 400px 600px]
Fail Web Animations: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Pass Web Animations: property <translate> from [inherit] to [initial] at (0) should be [100px 200px 300px]
Fail Web Animations: property <translate> from [inherit] to [initial] at (0.25) should be [75px 150px 225px]
Fail Web Animations: property <translate> from [inherit] to [initial] at (0.75) should be [25px 50px 75px]
Fail Web Animations: property <translate> from [inherit] to [initial] at (1) should be [0px]

View file

@ -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'
Pass Property translate value '1px 2px 0'

View file

@ -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
Pass e.style['translate'] = "1px 2px 0" should set the property value