mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/CSS: Replace resolve_angle_deprecated() with resolve_angle()
Gets us some WPT passes. 🎉
This commit is contained in:
parent
525b5bf623
commit
375e32c523
|
|
@ -20,7 +20,7 @@ namespace Web::CSS {
|
|||
|
||||
Optional<Angle> AngleOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_angle_deprecated(context);
|
||||
return calculated->resolve_angle(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<StyleValue const> AngleOrCalculated::create_style_value() const
|
||||
|
|
|
|||
|
|
@ -2981,14 +2981,6 @@ Optional<CalculatedStyleValue::ResolvedValue> CalculatedStyleValue::resolve_valu
|
|||
return ResolvedValue { raw_value, value->type() };
|
||||
}
|
||||
|
||||
Optional<Angle> CalculatedStyleValue::resolve_angle_deprecated(CalculationResolutionContext const& context) const
|
||||
{
|
||||
auto result = m_calculation->resolve(context);
|
||||
if (result.type().has_value() && result.type()->matches_angle(m_context.percentages_resolve_as))
|
||||
return Angle::make_degrees(result.value());
|
||||
return {};
|
||||
}
|
||||
|
||||
Optional<Angle> CalculatedStyleValue::resolve_angle(CalculationResolutionContext const& context) const
|
||||
{
|
||||
auto result = resolve_value(context);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ public:
|
|||
|
||||
bool resolves_to_angle() const { return m_resolved_type.matches_angle(m_context.percentages_resolve_as); }
|
||||
bool resolves_to_angle_percentage() const { return m_resolved_type.matches_angle_percentage(m_context.percentages_resolve_as); }
|
||||
Optional<Angle> resolve_angle_deprecated(CalculationResolutionContext const&) const;
|
||||
Optional<Angle> resolve_angle(CalculationResolutionContext const&) const;
|
||||
|
||||
bool resolves_to_flex() const { return m_resolved_type.matches_flex(m_context.percentages_resolve_as); }
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 45 tests
|
||||
|
||||
33 Pass
|
||||
12 Fail
|
||||
37 Pass
|
||||
8 Fail
|
||||
Pass Property width value 'calc(NaN * 1px)'
|
||||
Pass Property width value 'calc(NaN * 1%)'
|
||||
Pass Property width value 'calc(infinity * 1px)'
|
||||
|
|
@ -39,13 +39,13 @@ Pass Property transition-delay value 'calc(max(10000s, 0s) + min(-infinity * 1s,
|
|||
Pass Property transition-delay value 'calc(min(-infinity * 1s, 10s))'
|
||||
Fail Property rotate(calc(infinity * 1deg)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(-infinity * 1deg)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(NaN * 1deg)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Pass Property rotate(calc(NaN * 1deg)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(infinity * 1turn)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(-infinity * 1turn)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(NaN * 1turn)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Pass Property rotate(calc(NaN * 1turn)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(infinity * 1rad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(-infinity * 1rad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(NaN * 1rad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Pass Property rotate(calc(NaN * 1rad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(infinity * 1grad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(-infinity * 1grad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Fail Property rotate(calc(NaN * 1grad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
Pass Property rotate(calc(NaN * 1grad)) value expected same with rotate(0deg) in +/-0.0001
|
||||
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 138 tests
|
||||
|
||||
134 Pass
|
||||
4 Fail
|
||||
136 Pass
|
||||
2 Fail
|
||||
Pass new DOMMatrix()
|
||||
Pass new DOMMatrix(undefined)
|
||||
Pass new DOMMatrix(new DOMMatrix())
|
||||
|
|
@ -53,7 +53,7 @@ Pass new DOMMatrix("rotate(5)")
|
|||
Pass new DOMMatrix("rotate(5, 5, 5)")
|
||||
Pass new DOMMatrix("rotate(5, 5px, 5px)")
|
||||
Pass new DOMMatrix("rotate(5deg, 5px, 5px)")
|
||||
Fail new DOMMatrix("rotate(calc(5deg * sign(1em - 10px)))")
|
||||
Pass new DOMMatrix("rotate(calc(5deg * sign(1em - 10px)))")
|
||||
Pass new DOMMatrix("rotate(calc(5deg * sibling-index()))")
|
||||
Pass new DOMMatrix(" ")
|
||||
Pass new DOMMatrix("/**/")
|
||||
|
|
@ -122,7 +122,7 @@ Pass new DOMMatrixReadOnly("rotate(5)")
|
|||
Pass new DOMMatrixReadOnly("rotate(5, 5, 5)")
|
||||
Pass new DOMMatrixReadOnly("rotate(5, 5px, 5px)")
|
||||
Pass new DOMMatrixReadOnly("rotate(5deg, 5px, 5px)")
|
||||
Fail new DOMMatrixReadOnly("rotate(calc(5deg * sign(1em - 10px)))")
|
||||
Pass new DOMMatrixReadOnly("rotate(calc(5deg * sign(1em - 10px)))")
|
||||
Pass new DOMMatrixReadOnly("rotate(calc(5deg * sibling-index()))")
|
||||
Pass new DOMMatrixReadOnly(" ")
|
||||
Pass new DOMMatrixReadOnly("/**/")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user