summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
Diffstat (limited to 'Meta')
-rw-r--r--Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp3
1 files changed, 2 insertions, 1 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 12b0a84e38..e1ac87163f 100644
--- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp
+++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp
@@ -311,8 +311,9 @@ bool property_accepts_value(PropertyID property_id, StyleValue& style_value)
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.has_length() && style_value.to_length().is_percentage()) || style_value.is_calculated())
+ if (style_value.is_percentage() || style_value.is_calculated() || (style_value.has_length() && !style_value.to_length().is_percentage()))
return true;
)~~~");
} else if (type_name == "number" || type_name == "integer") {