mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb/CSS: Remove "strip-whitespace" flag from Properties.json
Now that it's not on any properties, remove support for it entirely.
This commit is contained in:
Notes:
github-actions[bot]
2025-11-03 11:25:20 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/1b1bb3b8977 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6646 Reviewed-by: https://github.com/tcl3
@@ -290,9 +290,6 @@ bool property_affects_layout(PropertyID);
|
||||
bool property_affects_stacking_context(PropertyID);
|
||||
bool property_needs_layout_for_getcomputedstyle(PropertyID);
|
||||
|
||||
// FIXME: Temporary until all property parsing handles whitespace correctly.
|
||||
bool property_requires_whitespace_stripped_before_parsing(PropertyID);
|
||||
|
||||
constexpr PropertyID first_property_id = PropertyID::@first_property_id@;
|
||||
constexpr PropertyID last_property_id = PropertyID::@last_property_id@;
|
||||
constexpr PropertyID first_inherited_shorthand_property_id = PropertyID::@first_inherited_shorthand_property_id@;
|
||||
@@ -723,30 +720,6 @@ bool property_needs_layout_for_getcomputedstyle(PropertyID property_id)
|
||||
}
|
||||
}
|
||||
|
||||
bool property_requires_whitespace_stripped_before_parsing(PropertyID property_id)
|
||||
{
|
||||
switch (property_id) {
|
||||
)~~~");
|
||||
|
||||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
auto property = value.as_object();
|
||||
if (is_legacy_alias(property))
|
||||
return;
|
||||
|
||||
if (property.get_bool("strip-whitespace"sv) == true) {
|
||||
auto member_generator = generator.fork();
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
member_generator.appendln(" case PropertyID::@name:titlecase@:"sv);
|
||||
}
|
||||
});
|
||||
|
||||
generator.append(R"~~~(
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
NonnullRefPtr<StyleValue const> property_initial_value(PropertyID property_id)
|
||||
{
|
||||
static Array<RefPtr<StyleValue const>, to_underlying(last_property_id) + 1> initial_values;
|
||||
|
||||
Reference in New Issue
Block a user