mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
LibWeb: Make CSS/Properties.json "logical-aliases-for" an array
This allows us to specify all aliases properties instead of just one.
This commit is contained in:
parent
970a3ef4d8
commit
941092e3ad
2 changed files with 14 additions and 7 deletions
|
@ -56,9 +56,12 @@ ErrorOr<void> replace_logical_aliases(JsonObject& properties)
|
|||
properties.for_each_member([&](auto& name, auto& value) {
|
||||
VERIFY(value.is_object());
|
||||
const auto& value_as_object = value.as_object();
|
||||
const auto logical_alias_for = value_as_object.get_deprecated_string("logical-alias-for"sv);
|
||||
const auto logical_alias_for = value_as_object.get_array("logical-alias-for"sv);
|
||||
if (logical_alias_for.has_value()) {
|
||||
logical_aliases.set(name, logical_alias_for.value());
|
||||
auto const& aliased_properties = logical_alias_for.value();
|
||||
for (auto const& aliased_property : aliased_properties.values()) {
|
||||
logical_aliases.set(name, aliased_property.to_deprecated_string());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue