mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
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:
parent
19529590b9
commit
daca9f5995
Notes:
github-actions[bot]
2025-03-20 08:02:26 +00:00
Author: https://github.com/trflynn89
Commit: daca9f5995
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4006
Reviewed-by: https://github.com/gmta ✅
18 changed files with 287 additions and 276 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <LibWeb/CSS/Selector.h>
|
||||
#include <LibWeb/CSS/StyleSheetIdentifier.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWebView/DOMNodeProperties.h>
|
||||
#include <LibWebView/Forward.h>
|
||||
|
||||
namespace DevTools {
|
||||
|
@ -31,8 +32,10 @@ public:
|
|||
using OnTabInspectionComplete = Function<void(ErrorOr<JsonValue>)>;
|
||||
virtual void inspect_tab(TabDescription const&, OnTabInspectionComplete) const { }
|
||||
|
||||
using OnDOMNodeInspectionComplete = Function<void(ErrorOr<DOMNodeProperties>)>;
|
||||
virtual void inspect_dom_node(TabDescription const&, Web::UniqueNodeID, Optional<Web::CSS::Selector::PseudoElement::Type>, OnDOMNodeInspectionComplete) const { }
|
||||
using OnDOMNodePropertiesReceived = Function<void(WebView::DOMNodeProperties)>;
|
||||
virtual void listen_for_dom_properties(TabDescription const&, OnDOMNodePropertiesReceived) const { }
|
||||
virtual void stop_listening_for_dom_properties(TabDescription const&) const { }
|
||||
virtual void inspect_dom_node(TabDescription const&, WebView::DOMNodeProperties::Type, Web::UniqueNodeID, Optional<Web::CSS::Selector::PseudoElement::Type>) const { }
|
||||
virtual void clear_inspected_dom_node(TabDescription const&) const { }
|
||||
|
||||
virtual void highlight_dom_node(TabDescription const&, Web::UniqueNodeID, Optional<Web::CSS::Selector::PseudoElement::Type>) const { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue