mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibWeb: Stop treating undefined lengths as valid
When converting this code to use Optional, I accidentally left in the initialization, so it *always* had a value, and always created a Length from it. Oops.
This commit is contained in:
parent
48edaa2085
commit
8e82544dce
1 changed files with 1 additions and 1 deletions
|
@ -2149,7 +2149,7 @@ Optional<Parser::Dimension> Parser::parse_dimension(StyleComponentValueRule cons
|
|||
if (component_value.is(Token::Type::Dimension)) {
|
||||
float numeric_value = component_value.token().dimension_value();
|
||||
auto unit_string = component_value.token().dimension_unit();
|
||||
Optional<Length::Type> length_type = Length::Type::Undefined;
|
||||
Optional<Length::Type> length_type;
|
||||
|
||||
if (unit_string.equals_ignoring_case("px"sv)) {
|
||||
length_type = Length::Type::Px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue