Skip to content

Commit 2d331b9

Browse files
Calme1709AtkinsSJ
authored andcommitted
LibWeb: Don't swap atan2 arguments in with_simplified_children
1 parent 670cbcc commit 2d331b9

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Libraries/LibWeb/CSS/StyleValues/CalculatedStyleValue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ bool Atan2CalculationNode::contains_percentage() const
18141814

18151815
NonnullRefPtr<CalculationNode const> Atan2CalculationNode::with_simplified_children(CalculationContext const& context, CalculationResolutionContext const& resolution_context) const
18161816
{
1817-
return simplify_2_children(*this, m_x, m_y, context, resolution_context);
1817+
return simplify_2_children(*this, m_y, m_x, context, resolution_context);
18181818
}
18191819

18201820
// https://drafts.csswg.org/css-values-4/#funcdef-atan2

Tests/LibWeb/Text/expected/wpt-import/css/css-values/acos-asin-atan-atan2-computed.txt

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

33
Found 45 tests
44

5-
39 Pass
6-
6 Fail
5+
45 Pass
76
Pass acos(1) should be used-value-equivalent to 0deg
87
Pass atan(0) should be used-value-equivalent to 0deg
98
Pass asin(0) should be used-value-equivalent to 0deg
@@ -35,14 +34,14 @@ Pass atan2(1Q, -1Q) should be used-value-equivalent to 135deg
3534
Pass atan2(1in, -1in) should be used-value-equivalent to 135deg
3635
Pass atan2(1pc, -1pc) should be used-value-equivalent to 135deg
3736
Pass atan2(1pt, -1pt) should be used-value-equivalent to 135deg
38-
Fail atan2(1em, -1em) should be used-value-equivalent to 135deg
39-
Fail atan2(1ex, -1ex) should be used-value-equivalent to 135deg
40-
Fail atan2(1ch, -1ch) should be used-value-equivalent to 135deg
41-
Fail atan2(1rem, -1rem) should be used-value-equivalent to 135deg
37+
Pass atan2(1em, -1em) should be used-value-equivalent to 135deg
38+
Pass atan2(1ex, -1ex) should be used-value-equivalent to 135deg
39+
Pass atan2(1ch, -1ch) should be used-value-equivalent to 135deg
40+
Pass atan2(1rem, -1rem) should be used-value-equivalent to 135deg
4241
Pass atan2(1rem + 1px - 1px, -1rem) should be used-value-equivalent to 135deg
43-
Fail atan2(1vh, -1vh) should be used-value-equivalent to 135deg
42+
Pass atan2(1vh, -1vh) should be used-value-equivalent to 135deg
4443
Pass atan2(1vh + 0px, -1vh + 0px) should be used-value-equivalent to 135deg
45-
Fail atan2(1vw, -1vw) should be used-value-equivalent to 135deg
44+
Pass atan2(1vw, -1vw) should be used-value-equivalent to 135deg
4645
Pass atan2(1deg, -1deg) should be used-value-equivalent to 135deg
4746
Pass atan2(1grad, -1grad) should be used-value-equivalent to 135deg
4847
Pass atan2(1turn, -1turn) should be used-value-equivalent to 135deg

0 commit comments

Comments
 (0)