mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:04:57 +00:00
LibWebView+WebContent: Make the DOM node editing IPCs async
All DOM node mutation IPCs now invoke an async completion IPC after the DOM is mutated. This allows consolidating where the Inspector updates its view and the selected DOM node. This also allows improving the response to removing a DOM node. We would previously just select the <body> tag after removing a DOM node because the Inspector client had no idea what node preceded the removed node. Now the WebContent process can just indicate what that node is. So now after removing a DOM node, we inspect either its previous sibling (if it had one) or its parent.
This commit is contained in:
parent
1eba170d03
commit
3572a047d1
9 changed files with 91 additions and 69 deletions
|
@ -219,6 +219,12 @@ void WebContentClient::did_get_hovered_node_id(i32 node_id)
|
|||
m_view.on_received_hovered_node_id(node_id);
|
||||
}
|
||||
|
||||
void WebContentClient::did_finish_editing_dom_node(Optional<i32> const& node_id)
|
||||
{
|
||||
if (m_view.on_finshed_editing_dom_node)
|
||||
m_view.on_finshed_editing_dom_node(node_id);
|
||||
}
|
||||
|
||||
void WebContentClient::did_output_js_console_message(i32 message_index)
|
||||
{
|
||||
if (m_view.on_received_console_message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue