Bug 238947 - Web Inspector: Don't send node payloads to the frontend for already-bound nodes
Summary: Web Inspector: Don't send node payloads to the frontend for already-bound nodes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 189687
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-07 10:50 PDT by Patrick Angle
Modified: 2022-04-07 10:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Angle 2022-04-07 10:50:24 PDT
`DOM.setChildNodes`, `DOM.childNodeInserted`, `DOM.shadowRootPushed`, and `DOM.pseudoElementAdded` should all be able to provide a DOM.NodeId instead of a DOM.Node to the frontend in order to be less wasteful over the protocol. This will probably require adding a new protocol command to do the initial push of a node to the frontend, followed by one of the existing protocol commands to place the node in the DOM Tree in the correct place. As of bug 189687 we will actually go ahead an check if the node payload's ID matches an already-known node to prevent ourselves from creating a new identical frontend `WI.DOMNode` to replace the existing frontend `WI.DOMNode` if it already exists.

It's also worth noting that `DOM.childNodeInserted`, `DOM.shadowRootPushed`, and `DOM.pseudoElementAdded` could all be unified into a single event because the node itself should contain enough information to know if it is a shadow root, a pseudo-element, or an otherwise normal node.
Comment 1 Radar WebKit Bug Importer 2022-04-07 10:50:34 PDT
<rdar://problem/91431852>