diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-06-02 17:14:27 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-06-02 20:04:23 +0200 |
commit | 2d7308cb88a524d87afe2a06b920f55791ad7b25 (patch) | |
tree | 5e75aba3dc0656a31fc11439efd082cb8a569e80 | |
parent | 7115446995deeecfe0179cb4f5aefb0d0a24d3dd (diff) | |
download | serenity-2d7308cb88a524d87afe2a06b920f55791ad7b25.zip |
LibWeb: Support infinite range for CSS properties
This makes `[-∞,∞]` generate valid code, instead of `return ;`
-rw-r--r-- | Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp index ffd100a250..9f609e347a 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp @@ -259,6 +259,11 @@ bool property_accepts_@css_type_name@(PropertyID property_id, [[maybe_unused]] @ if (max_value_string == "∞") max_value_string = {}; + if (min_value_string.is_empty() && max_value_string.is_empty()) { + property_generator.appendln("true;"); + break; + } + auto output_check = [&](auto& value_string, StringView comparator) { if (value_getter.has_value()) { property_generator.set("value_number", value_string); |