diff --git a/Libraries/LibWeb/CSS/StyleComputer.cpp b/Libraries/LibWeb/CSS/StyleComputer.cpp index e4d82320703..4de30458f05 100644 --- a/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -1240,6 +1240,13 @@ static void compute_transitioned_properties(ComputedProperties const& style, DOM auto property_value = transition_properties[i]; Vector properties_for_this_transition; + auto const append_property_mapping_logical_aliases = [&](PropertyID property_id) { + if (property_is_logical_alias(property_id)) + properties_for_this_transition.append(map_logical_alias_to_physical_property(property_id, LogicalAliasMappingContext { style.writing_mode(), style.direction() })); + else + properties_for_this_transition.append(property_id); + }; + if (property_value->is_keyword()) { auto keyword = property_value->as_keyword().keyword(); if (keyword == Keyword::None) @@ -1254,9 +1261,9 @@ static void compute_transitioned_properties(ComputedProperties const& style, DOM auto transition_property = maybe_property.release_value(); if (property_is_shorthand(transition_property)) { for (auto const& prop : expanded_longhands_for_shorthand(transition_property)) - properties_for_this_transition.append(prop); + append_property_mapping_logical_aliases(prop); } else { - properties_for_this_transition.append(transition_property); + append_property_mapping_logical_aliases(transition_property); } } diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-block-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-block-interpolation.txt index 48839924306..db2771d20b4 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-block-interpolation.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-block-interpolation.txt @@ -2,14 +2,13 @@ Harness status: OK Found 24 tests -19 Pass -5 Fail -Fail CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] -Fail CSS Transitions: property from [10px] to [20px] at (0) should be [10px] -Fail CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] -Fail CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] +24 Pass +Pass CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] +Pass CSS Transitions: property from [10px] to [20px] at (0) should be [10px] +Pass CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] +Pass CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] Pass CSS Transitions: property from [10px] to [20px] at (1) should be [20px] -Fail CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] +Pass CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (-0.3) should be [7px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0) should be [10px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0.3) should be [13px] diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-inline-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-inline-interpolation.txt index b3c3c48a6ca..622afe58728 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-inline-interpolation.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/margin-inline-interpolation.txt @@ -2,14 +2,13 @@ Harness status: OK Found 24 tests -19 Pass -5 Fail -Fail CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] -Fail CSS Transitions: property from [10px] to [20px] at (0) should be [10px] -Fail CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] -Fail CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] +24 Pass +Pass CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] +Pass CSS Transitions: property from [10px] to [20px] at (0) should be [10px] +Pass CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] +Pass CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] Pass CSS Transitions: property from [10px] to [20px] at (1) should be [20px] -Fail CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] +Pass CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (-0.3) should be [7px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0) should be [10px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0.3) should be [13px] diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-block-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-block-interpolation.txt index ff80a75bf08..389e01b4a2b 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-block-interpolation.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-block-interpolation.txt @@ -2,14 +2,13 @@ Harness status: OK Found 24 tests -19 Pass -5 Fail -Fail CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] -Fail CSS Transitions: property from [10px] to [20px] at (0) should be [10px] -Fail CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] -Fail CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] +24 Pass +Pass CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] +Pass CSS Transitions: property from [10px] to [20px] at (0) should be [10px] +Pass CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] +Pass CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] Pass CSS Transitions: property from [10px] to [20px] at (1) should be [20px] -Fail CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] +Pass CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (-0.3) should be [7px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0) should be [10px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0.3) should be [13px] diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-inline-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-inline-interpolation.txt index c60a2f7a71b..47f9de473cb 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-inline-interpolation.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/animations/padding-inline-interpolation.txt @@ -2,14 +2,13 @@ Harness status: OK Found 24 tests -19 Pass -5 Fail -Fail CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] -Fail CSS Transitions: property from [10px] to [20px] at (0) should be [10px] -Fail CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] -Fail CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] +24 Pass +Pass CSS Transitions: property from [10px] to [20px] at (-0.3) should be [7px] +Pass CSS Transitions: property from [10px] to [20px] at (0) should be [10px] +Pass CSS Transitions: property from [10px] to [20px] at (0.3) should be [13px] +Pass CSS Transitions: property from [10px] to [20px] at (0.6) should be [16px] Pass CSS Transitions: property from [10px] to [20px] at (1) should be [20px] -Fail CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] +Pass CSS Transitions: property from [10px] to [20px] at (1.5) should be [25px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (-0.3) should be [7px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0) should be [10px] Pass CSS Transitions with transition: all: property from [10px] to [20px] at (0.3) should be [13px]