mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 13:09:41 +00:00
LibWeb/CSS: Use generated FooUnit types instead of Foo::Type
I've also renamed the `m_type` and `type()` members to be `m_unit` and `unit()` instead, to match what they actually are.
This commit is contained in:
parent
bda4f8cbe8
commit
b3e32445d3
Notes:
github-actions[bot]
2025-09-11 16:08:15 +00:00
Author: https://github.com/AtkinsSJ
Commit: b3e32445d3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6071
29 changed files with 232 additions and 669 deletions
|
@ -131,12 +131,12 @@ static Vector<ComponentValue> replace_an_attr_function(DOM::AbstractElement& ele
|
|||
first_argument_tokens.discard_a_token(); // raw-string
|
||||
syntax = RawString {};
|
||||
} else if (syntax_ident == "%"sv
|
||||
|| Angle::unit_from_name(syntax_ident).has_value()
|
||||
|| Flex::unit_from_name(syntax_ident).has_value()
|
||||
|| Frequency::unit_from_name(syntax_ident).has_value()
|
||||
|| Length::unit_from_name(syntax_ident).has_value()
|
||||
|| Resolution::unit_from_name(syntax_ident).has_value()
|
||||
|| Time::unit_from_name(syntax_ident).has_value()) {
|
||||
|| string_to_angle_unit(syntax_ident).has_value()
|
||||
|| string_to_flex_unit(syntax_ident).has_value()
|
||||
|| string_to_frequency_unit(syntax_ident).has_value()
|
||||
|| string_to_length_unit(syntax_ident).has_value()
|
||||
|| string_to_resolution_unit(syntax_ident).has_value()
|
||||
|| string_to_time_unit(syntax_ident).has_value()) {
|
||||
syntax = TypeSyntaxNode::create("number"_fly_string).release_nonnull<SyntaxNode>();
|
||||
unit_name = first_argument_tokens.consume_a_token().token().ident();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue