1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

LibHTML: Fix incorrect CSS object model

A StyleRule has a StyleDeclaration which has many StyleProperty. :^)
This commit is contained in:
Andreas Kling 2019-09-30 20:06:17 +02:00
parent ac20919b13
commit 8d797fc62e
7 changed files with 26 additions and 31 deletions

View file

@ -70,8 +70,8 @@ StyleProperties StyleResolver::resolve_style(const Element& element, const Style
auto matching_rules = collect_matching_rules(element);
for (auto& rule : matching_rules) {
for (auto& declaration : rule.declarations()) {
style_properties.set_property(declaration.property_name(), declaration.value());
for (auto& property : rule.declaration().properties()) {
style_properties.set_property(property.name, property.value);
}
}
return style_properties;