1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:37:35 +00:00

LibWeb: Remove concept of CSS pseudo-properties

We don't need them any more, so they're gone. :^)
This commit is contained in:
Sam Atkins 2021-11-04 17:10:12 +00:00 committed by Andreas Kling
parent 1e53768f1b
commit 901a990b1b
3 changed files with 1 additions and 38 deletions

View file

@ -169,37 +169,6 @@ bool is_inherited_property(PropertyID property_id)
}
}
bool is_pseudo_property(PropertyID property_id)
{
switch (property_id) {
)~~~");
properties.for_each_member([&](auto& name, auto& value) {
VERIFY(value.is_object());
bool pseudo = false;
if (value.as_object().has("pseudo")) {
auto& pseudo_value = value.as_object().get("pseudo");
VERIFY(pseudo_value.is_bool());
pseudo = pseudo_value.as_bool();
}
if (pseudo) {
auto member_generator = generator.fork();
member_generator.set("name:titlecase", title_casify(name));
member_generator.append(R"~~~(
case PropertyID::@name:titlecase@:
return true;
)~~~");
}
});
generator.append(R"~~~(
default:
return false;
}
}
RefPtr<StyleValue> property_initial_value(PropertyID property_id)
{
static HashMap<PropertyID, NonnullRefPtr<StyleValue>> initial_values;

View file

@ -104,7 +104,6 @@ PropertyID property_id_from_camel_case_string(StringView);
PropertyID property_id_from_string(const StringView&);
const char* string_from_property_id(PropertyID);
bool is_inherited_property(PropertyID);
bool is_pseudo_property(PropertyID);
RefPtr<StyleValue> property_initial_value(PropertyID);
bool property_accepts_value(PropertyID, StyleValue&);