diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-01-19 16:40:01 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-20 00:04:10 +0100 |
commit | cff44831a84e2061dab388512ee36efd3b891d10 (patch) | |
tree | 44e5c0884e05bbdb9baec214bb185be7e8c94d90 /Meta | |
parent | 5e9a6302e56201488a04f5251e73baa9e4d6e416 (diff) | |
download | serenity-cff44831a84e2061dab388512ee36efd3b891d10.zip |
LibWeb: Remove Length::Type::Percentage :^)
All `<percentage>`s in the CSS grammar are now represented by the
`Percentage` class, and `<length-percentage>` by `LengthPercentage`.
Diffstat (limited to 'Meta')
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp index e1ac87163f..baedbcbf39 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp @@ -307,13 +307,12 @@ bool property_accepts_value(PropertyID property_id, StyleValue& style_value) )~~~"); } else if (type_name == "length") { property_generator.append(R"~~~( - if ((style_value.has_length() && !style_value.to_length().is_percentage()) || style_value.is_calculated()) + if (style_value.has_length() || style_value.is_calculated()) return true; )~~~"); } else if (type_name == "percentage") { - // FIXME: Detecting lengths here is temporary until Length/Percentage are fully separated. property_generator.append(R"~~~( - if (style_value.is_percentage() || style_value.is_calculated() || (style_value.has_length() && !style_value.to_length().is_percentage())) + if (style_value.is_percentage() || style_value.is_calculated()) return true; )~~~"); } else if (type_name == "number" || type_name == "integer") { |