Bug 238947

Summary: Web Inspector: Don't send node payloads to the frontend for already-bound nodes
Product: WebKit Reporter: Patrick Angle <pangle>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 189687    
Bug Blocks:    

Patrick Angle
Reported 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.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-04-07 10:50:34 PDT
Note You need to log in before you can comment on or make changes to this bug.