mirror of
https://github.com/RGBCube/serenity
synced 2025-07-07 08:37:34 +00:00
Browser+LibWeb: Add an Element size preview widget to inspector
This Adds an element size preview widget to the inspector widget in a new tab. This functions similar to chrome and firefox and shows the margin, border, padding, and content size of the selected element in the inspector. The colors for the size preview widget are taken from the chrome browser.
This commit is contained in:
parent
3b22fd9a9f
commit
39a5076f40
14 changed files with 234 additions and 18 deletions
|
@ -354,10 +354,10 @@ void OutOfProcessWebView::notify_server_did_get_dom_tree(const String& dom_tree)
|
|||
on_get_dom_tree(dom_tree);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_get_dom_node_properties(i32 node_id, String const& specified_style, String const& computed_style, String const& custom_properties)
|
||||
void OutOfProcessWebView::notify_server_did_get_dom_node_properties(i32 node_id, String const& specified_style, String const& computed_style, String const& custom_properties, String const& node_box_sizing)
|
||||
{
|
||||
if (on_get_dom_node_properties)
|
||||
on_get_dom_node_properties(node_id, specified_style, computed_style, custom_properties);
|
||||
on_get_dom_node_properties(node_id, specified_style, computed_style, custom_properties, node_box_sizing);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_output_js_console_message(i32 message_index)
|
||||
|
@ -441,7 +441,8 @@ Optional<OutOfProcessWebView::DOMNodeProperties> OutOfProcessWebView::inspect_do
|
|||
return DOMNodeProperties {
|
||||
.specified_values_json = response.specified_style(),
|
||||
.computed_values_json = response.computed_style(),
|
||||
.custom_properties_json = response.custom_properties()
|
||||
.custom_properties_json = response.custom_properties(),
|
||||
.node_box_sizing_json = response.node_box_sizing()
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue