From 2d7308cb88a524d87afe2a06b920f55791ad7b25 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 2 Jun 2023 17:14:27 +0100 Subject: [PATCH] LibWeb: Support infinite range for CSS properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes `[-∞,∞]` generate valid code, instead of `return ;` --- .../Tools/CodeGenerators/LibWeb/GenerateCSSPropertyID.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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);