LibDevTools+LibWebView+WebContent: Selectively fetch DOM node properties

When we inspect a DOM node, we currently serialize many properties for
that node, including its layout, computed style, used fonts, etc. Now
that we aren't piggy-backing on the Inspector interface, we can instead
only serialize the specific information required by DevTools.
This commit is contained in:
Timothy Flynn 2025-03-19 15:50:56 -04:00 committed by Jelle Raaijmakers
parent 19529590b9
commit daca9f5995
Notes: github-actions[bot] 2025-03-20 08:02:26 +00:00
18 changed files with 287 additions and 276 deletions

View file

@ -329,14 +329,14 @@ void ViewImplementation::get_hovered_node_id()
client().async_get_hovered_node_id(page_id());
}
void ViewImplementation::inspect_dom_node(Web::UniqueNodeID node_id, Optional<Web::CSS::Selector::PseudoElement::Type> pseudo_element)
void ViewImplementation::inspect_dom_node(Web::UniqueNodeID node_id, DOMNodeProperties::Type property_type, Optional<Web::CSS::Selector::PseudoElement::Type> pseudo_element)
{
client().async_inspect_dom_node(page_id(), node_id, pseudo_element);
client().async_inspect_dom_node(page_id(), property_type, node_id, pseudo_element);
}
void ViewImplementation::clear_inspected_dom_node()
{
inspect_dom_node(0, {});
client().async_clear_inspected_dom_node(page_id());
}
void ViewImplementation::highlight_dom_node(Web::UniqueNodeID node_id, Optional<Web::CSS::Selector::PseudoElement::Type> pseudo_element)