diff options
author | Andreas Kling <kling@serenityos.org> | 2022-03-15 19:32:17 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-15 19:48:19 +0100 |
commit | 43ef813f3d130ae3fe185405dd517994796c44cb (patch) | |
tree | 84cde494622cc85cb926bd68214e2dc69eee71c6 | |
parent | 8aa24c45dd3ebc7c53670268cfb27a0fdb949faf (diff) | |
download | serenity-43ef813f3d130ae3fe185405dd517994796c44cb.zip |
LibWeb: Rename Element::computed_style() to resolved_css_values()
This more accurately reflects what's actually being returned.
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Element.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Element.h | 2 | ||||
-rw-r--r-- | Userland/Services/WebContent/ConnectionFromClient.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index e85341ffdc..3f24b83c86 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -281,7 +281,7 @@ void Element::recompute_style() document().invalidate_layout(); } -NonnullRefPtr<CSS::StyleProperties> Element::computed_style() +NonnullRefPtr<CSS::StyleProperties> Element::resolved_css_values() { auto element_computed_style = CSS::ResolvedCSSStyleDeclaration::create(*this); auto properties = CSS::StyleProperties::create(); diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h index 7c0914aeff..eefb781eb7 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.h +++ b/Userland/Libraries/LibWeb/DOM/Element.h @@ -96,7 +96,7 @@ public: CSS::StyleProperties const* specified_css_values() const { return m_specified_css_values.ptr(); } void set_specified_css_values(RefPtr<CSS::StyleProperties> style) { m_specified_css_values = move(style); } - NonnullRefPtr<CSS::StyleProperties> computed_style(); + NonnullRefPtr<CSS::StyleProperties> resolved_css_values(); const CSS::CSSStyleDeclaration* inline_style() const { return m_inline_style; } diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index 943e212ca5..b529775f6e 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -353,10 +353,10 @@ Messages::WebContentServer::InspectDomNodeResponse ConnectionFromClient::inspect } String specified_values_json = serialize_json(*element.specified_css_values()); - String computed_values_json = serialize_json(element.computed_style()); + 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, computed_values_json, custom_properties_json, node_box_sizing_json }; + return { true, specified_values_json, resolved_values_json, custom_properties_json, node_box_sizing_json }; } return { false, "", "", "", "" }; |