mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
Browser+WebContent: Fixup some DOM inspector weirdness
This fixes a few things I noticed whilst working on the inspector for Ladybird. 1. The computed and resolved values were being passed swapped around from the inspect_dom_node() IPC call. I.e. computed values were passed as resolved values and vice versa. This was then fixed by swapping them again in the InspectorWidget (two errors canceled out). 2. Resolved values were called "specified values" seemingly only in the inspect_dom_node() IPC calls. This was a little confusing so I've renamed them to back to "resolved values" for consistency. 3. The inspector took and stored the DOM JSON strings unnecessarily, all the models immediately parse the JSON and don't need the strings to hang around.
This commit is contained in:
parent
e3ad5731f7
commit
3de5dcf383
9 changed files with 39 additions and 58 deletions
|
@ -44,8 +44,8 @@ public:
|
|||
|
||||
void inspect_dom_tree();
|
||||
struct DOMNodeProperties {
|
||||
DeprecatedString specified_values_json;
|
||||
DeprecatedString computed_values_json;
|
||||
DeprecatedString resolved_values_json;
|
||||
DeprecatedString custom_properties_json;
|
||||
DeprecatedString node_box_sizing_json;
|
||||
};
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
Function<void(Web::DOM::Document*)> on_set_document;
|
||||
Function<void(const AK::URL&, DeprecatedString const&)> on_get_source;
|
||||
Function<void(DeprecatedString const&)> on_get_dom_tree;
|
||||
Function<void(i32 node_id, DeprecatedString const& specified_style, DeprecatedString const& computed_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing)> on_get_dom_node_properties;
|
||||
Function<void(i32 node_id, DeprecatedString const& computed_style, DeprecatedString const& resolved_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing)> on_get_dom_node_properties;
|
||||
Function<void(i32 message_id)> on_js_console_new_message;
|
||||
Function<void(i32 start_index, Vector<DeprecatedString> const& message_types, Vector<DeprecatedString> const& messages)> on_get_js_console_messages;
|
||||
Function<Vector<Web::Cookie::Cookie>(AK::URL const& url)> on_get_all_cookies;
|
||||
|
@ -169,7 +169,7 @@ private:
|
|||
virtual void notify_server_did_request_dismiss_dialog(Badge<WebContentClient>) override;
|
||||
virtual void notify_server_did_get_source(const AK::URL& url, DeprecatedString const& source) override;
|
||||
virtual void notify_server_did_get_dom_tree(DeprecatedString const& dom_tree) override;
|
||||
virtual void notify_server_did_get_dom_node_properties(i32 node_id, DeprecatedString const& specified_style, DeprecatedString const& computed_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing) override;
|
||||
virtual void notify_server_did_get_dom_node_properties(i32 node_id, DeprecatedString const& computed_style, DeprecatedString const& resolved_style, DeprecatedString const& custom_properties, DeprecatedString const& node_box_sizing) override;
|
||||
virtual void notify_server_did_output_js_console_message(i32 message_index) override;
|
||||
virtual void notify_server_did_get_js_console_messages(i32 start_index, Vector<DeprecatedString> const& message_types, Vector<DeprecatedString> const& messages) override;
|
||||
virtual void notify_server_did_change_favicon(Gfx::Bitmap const& favicon) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue