summaryrefslogtreecommitdiff
path: root/Userland/Services/WebContent
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-02-10 17:04:31 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-10 20:52:11 +0100
commit8d104b7de2634f84c33e890f6be2ab24c0a4065c (patch)
tree6d46caa4d4ef09c4b2d5168b03c41dff807a4e91 /Userland/Services/WebContent
parentb248661f11e86ba3338d65a8fef2b32f87b35660 (diff)
downloadserenity-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.cpp4
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());
}
}