summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-15 19:41:35 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-15 19:48:19 +0100
commite31fe3eeb82cd08ad67e8135814f44947d33aa4e (patch)
treeb46c344607d6f36e578dad04e5fe8e930fef4f11 /Userland/Services
parent43ef813f3d130ae3fe185405dd517994796c44cb (diff)
downloadserenity-e31fe3eeb82cd08ad67e8135814f44947d33aa4e.zip
LibWeb: Rename Element::specified_css_values() => computed_css_values()
Let's make it very clear that these are *computed* values, and not at all the specified values. The specified values are currently discarded by the CSS cascade algorithm.
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/WebContent/ConnectionFromClient.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp
index b529775f6e..0f4fc133bc 100644
--- a/Userland/Services/WebContent/ConnectionFromClient.cpp
+++ b/Userland/Services/WebContent/ConnectionFromClient.cpp
@@ -268,7 +268,7 @@ Messages::WebContentServer::InspectDomNodeResponse ConnectionFromClient::inspect
if (node->is_element()) {
auto& element = verify_cast<Web::DOM::Element>(*node);
- if (!element.specified_css_values())
+ if (!element.computed_css_values())
return { false, "", "", "", "" };
auto serialize_json = [](Web::CSS::StyleProperties const& properties) -> String {
@@ -345,18 +345,18 @@ Messages::WebContentServer::InspectDomNodeResponse ConnectionFromClient::inspect
// in a format we can use. So, we run the StyleComputer again to get the specified
// values, and have to ignore the computed values and custom properties.
auto pseudo_element_style = page().focused_context().active_document()->style_computer().compute_style(element, pseudo_element);
- String specified_values_json = serialize_json(pseudo_element_style);
- String computed_values_json = "{}";
+ String computed_values = serialize_json(pseudo_element_style);
+ String resolved_values = "{}";
String custom_properties_json = "{}";
String node_box_sizing_json = serialize_node_box_sizing_json(pseudo_element_node.ptr());
- return { true, specified_values_json, computed_values_json, custom_properties_json, node_box_sizing_json };
+ return { true, computed_values, resolved_values, custom_properties_json, node_box_sizing_json };
}
- String specified_values_json = serialize_json(*element.specified_css_values());
+ String computed_values = serialize_json(*element.computed_css_values());
String resolved_values_json = serialize_json(element.resolved_css_values());
String custom_properties_json = serialize_custom_properties_json(element);
String node_box_sizing_json = serialize_node_box_sizing_json(element.layout_node());
- return { true, specified_values_json, resolved_values_json, custom_properties_json, node_box_sizing_json };
+ return { true, computed_values, resolved_values_json, custom_properties_json, node_box_sizing_json };
}
return { false, "", "", "", "" };