diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-10 17:04:31 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-10 20:52:11 +0100 |
commit | 8d104b7de2634f84c33e890f6be2ab24c0a4065c (patch) | |
tree | 6d46caa4d4ef09c4b2d5168b03c41dff807a4e91 /Userland/Services/WebContent | |
parent | b248661f11e86ba3338d65a8fef2b32f87b35660 (diff) | |
download | serenity-8d104b7de2634f84c33e890f6be2ab24c0a4065c.zip |
LibWeb: Perform CSS custom property cascade once instead of per-property
Previously we would re-run the entire CSS selector machinery for each
property resolved. Instead of doing that, we now resolve a final set of
custom property key/value pairs at the start of the cascade.
Diffstat (limited to 'Userland/Services/WebContent')
-rw-r--r-- | Userland/Services/WebContent/ClientConnection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/WebContent/ClientConnection.cpp b/Userland/Services/WebContent/ClientConnection.cpp index a3789a8d4d..101e0c2ce4 100644 --- a/Userland/Services/WebContent/ClientConnection.cpp +++ b/Userland/Services/WebContent/ClientConnection.cpp @@ -288,9 +288,9 @@ Messages::WebContentServer::InspectDomNodeResponse ClientConnection::inspect_dom auto const* element_to_check = &element; while (element_to_check) { for (auto const& property : element_to_check->custom_properties()) { - if (!seen_properties.contains(property.key) && property.value.style.has_value()) { + if (!seen_properties.contains(property.key)) { seen_properties.set(property.key); - serializer.add(property.key, property.value.style.value().value->to_string()); + serializer.add(property.key, property.value.value->to_string()); } } |