mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +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:
parent
5e9a6302e5
commit
cff44831a8
5 changed files with 3 additions and 19 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue