mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibDevTools: Associate node actors with a DOM node identifier
This is a prepatory commit to be able to handle DOM mutations. Once a node actor is created, the DOM node it is created for must continue to be associated with the same actor even after DOM mutations. This change stores an identifier on the node actor, and only creates new actors when an actor for a node does not exist.
This commit is contained in:
parent
ee88edc750
commit
ddea67034f
Notes:
github-actions[bot]
2025-03-08 00:28:03 +00:00
Author: https://github.com/trflynn89
Commit: ddea67034f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3850
6 changed files with 80 additions and 28 deletions
|
@ -102,7 +102,7 @@ void PageStyleActor::inspect_dom_node(StringView node_actor, Callback&& callback
|
|||
auto block_token = block_responses();
|
||||
|
||||
devtools().delegate().inspect_dom_node(
|
||||
dom_node->tab->description(), dom_node->id, dom_node->pseudo_element,
|
||||
dom_node->tab->description(), dom_node->identifier.id, dom_node->identifier.pseudo_element,
|
||||
[weak_self = make_weak_ptr<PageStyleActor>(), block_token = move(block_token), callback = forward<Callback>(callback)](ErrorOr<DOMNodeProperties> properties) mutable {
|
||||
if (properties.is_error()) {
|
||||
dbgln_if(DEVTOOLS_DEBUG, "Unable to inspect DOM node: {}", properties.error());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue