mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWeb: Remove Length::Type::Percentage :^)
All `<percentage>`s in the CSS grammar are now represented by the `Percentage` class, and `<length-percentage>` by `LengthPercentage`.
This commit is contained in:
committed by
Andreas Kling
parent
5e9a6302e5
commit
cff44831a8
@@ -2184,12 +2184,7 @@ Optional<Length> Parser::parse_length(StyleComponentValueRule const& component_v
|
||||
if (dimension->is_length())
|
||||
return dimension->length();
|
||||
|
||||
// FIXME: This is a temporary hack until Length is split up fully.
|
||||
if (dimension->is_percentage()) {
|
||||
auto percentage = dimension->percentage();
|
||||
return Length { (float)percentage.value(), Length::Type::Percentage };
|
||||
}
|
||||
|
||||
// FIXME: auto isn't a length!
|
||||
if (component_value.is(Token::Type::Ident) && component_value.token().ident().equals_ignoring_case("auto"))
|
||||
return Length::make_auto();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user