<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>238947</bug_id>
          
          <creation_ts>2022-04-07 10:50:24 -0700</creation_ts>
          <short_desc>Web Inspector: Don&apos;t send node payloads to the frontend for already-bound nodes</short_desc>
          <delta_ts>2022-04-07 10:50:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>189687</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Angle">pangle</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>inspector-bugzilla-changes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1859323</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Angle">pangle</who>
    <bug_when>2022-04-07 10:50:24 -0700</bug_when>
    <thetext>`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&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1859324</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-04-07 10:50:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/91431852&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>