Skip to content

Commit 61f9b32

Browse files
gmtaAtkinsSJ
authored andcommitted
LibWeb: Always serialize CSSScale with at least two values
1 parent 3083b19 commit 61f9b32

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

Libraries/LibWeb/CSS/CSSScale.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,8 @@ WebIDL::ExceptionOr<Utf16String> CSSScale::to_string() const
119119
builder.append(TRY(m_x->to_string()));
120120

121121
// 3. If this’s x and y internal slots are equal numeric values, append ")" to s and return s.
122-
if (m_x->is_equal_numeric_value(m_y)) {
123-
builder.append(")"sv);
124-
return builder.to_utf16_string();
125-
}
122+
// AD-HOC: Don't do this - neither Chrome nor Safari show this behavior.
123+
// Upstream issue: https://github.com/w3c/css-houdini-drafts/issues/1161
126124

127125
// 4. Otherwise, append ", " to s.
128126
builder.append(", "sv);

Tests/LibWeb/Text/expected/wpt-import/css/css-transforms/animation/transform-interpolation-computed-value.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Harness status: OK
22

33
Found 82 tests
44

5-
64 Pass
6-
18 Fail
5+
68 Pass
6+
14 Fail
77
Pass Interpolation between translateX(0px) and translateX(50px) gives the correct computed value halfway according to computedStyleMap.
88
Pass Interpolation between translateX(0px) and translateX(50px) gives the correct computed value halfway according to computedStyleMap with zoom active.
99
Pass Interpolation between translateX(0%) and translateX(50%) gives the correct computed value halfway according to computedStyleMap.
@@ -40,8 +40,8 @@ Fail Interpolation between rotateX(0deg) and rotateX(90deg) gives the correct co
4040
Fail Interpolation between rotateX(0deg) and rotateX(90deg) gives the correct computed value halfway according to computedStyleMap with zoom active.
4141
Fail Interpolation between rotate(0deg) and rotateX(90deg) gives the correct computed value halfway according to computedStyleMap.
4242
Fail Interpolation between rotate(0deg) and rotateX(90deg) gives the correct computed value halfway according to computedStyleMap with zoom active.
43-
Fail Interpolation between scale(1) and scale(2) gives the correct computed value halfway according to computedStyleMap.
44-
Fail Interpolation between scale(1) and scale(2) gives the correct computed value halfway according to computedStyleMap with zoom active.
43+
Pass Interpolation between scale(1) and scale(2) gives the correct computed value halfway according to computedStyleMap.
44+
Pass Interpolation between scale(1) and scale(2) gives the correct computed value halfway according to computedStyleMap with zoom active.
4545
Pass Interpolation between scale(1, 3) and scale(2) gives the correct computed value halfway according to computedStyleMap.
4646
Pass Interpolation between scale(1, 3) and scale(2) gives the correct computed value halfway according to computedStyleMap with zoom active.
4747
Pass Interpolation between scaleX(1) and scaleX(2) gives the correct computed value halfway according to computedStyleMap.
@@ -50,8 +50,8 @@ Pass Interpolation between scaleY(1) and scaleY(2) gives the correct computed va
5050
Pass Interpolation between scaleY(1) and scaleY(2) gives the correct computed value halfway according to computedStyleMap with zoom active.
5151
Pass Interpolation between scaleZ(1) and scaleZ(2) gives the correct computed value halfway according to computedStyleMap.
5252
Pass Interpolation between scaleZ(1) and scaleZ(2) gives the correct computed value halfway according to computedStyleMap with zoom active.
53-
Fail Interpolation between scaleX(2) and scaleY(2) gives the correct computed value halfway according to computedStyleMap.
54-
Fail Interpolation between scaleX(2) and scaleY(2) gives the correct computed value halfway according to computedStyleMap with zoom active.
53+
Pass Interpolation between scaleX(2) and scaleY(2) gives the correct computed value halfway according to computedStyleMap.
54+
Pass Interpolation between scaleX(2) and scaleY(2) gives the correct computed value halfway according to computedStyleMap with zoom active.
5555
Pass Interpolation between scaleX(2) and scaleY(3) gives the correct computed value halfway according to computedStyleMap.
5656
Pass Interpolation between scaleX(2) and scaleY(3) gives the correct computed value halfway according to computedStyleMap with zoom active.
5757
Pass Interpolation between scaleZ(1) and scale(2) gives the correct computed value halfway according to computedStyleMap.

0 commit comments

Comments
 (0)