Summary: | Web Inspector: Show additional pause reason details for DOM "subtree modified" breakpoint | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matt Baker <mattbaker> | ||||||||||
Component: | Web Inspector | Assignee: | Matt Baker <mattbaker> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, inspector-bugzilla-changes, joepeck, timothy | ||||||||||
Priority: | P2 | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
So when we pause for exceptions we expose a `$exception` value in the console. Something similar might be neat here as well, but I don't think any name will be obvious. We could show it in the sidebar kind of like your image. I agree the targetNode should probably always be the node being inserted/removed. We should already know the node owning the breakpoint. (In reply to comment #0) > Created attachment 304061 [details] > [Image] pause reason UI > > Summary: > Show additional pause reason details for DOM "subtree modified" breakpoint. > Make use of the `insertion` and `targetNode` info sent from the backend. > > insertion (boolean) > - disambiguates a subtree modification (node inserted or removed) > > taretNode (object) > - if insertion = true, remote object payload for the DOM node owning the > breakpoint (how is this helpful?) I spoke too soon. The comment on InspectorDOMDebuggerAgent.cpp:307 explains: "For inheritable breakpoint types, target node isn't always the same as the node that owns a breakpoint." The following scenario would be an example: <body> <-- set a 'Subtree Modified' breakpoint here <div> <p>...</p> <--- Insert a new <p> here </div> </body> target node: "<div>" owner node: "<body>" For the following DOM tree with a 'Subtree Modified' breakpoint set on body:
> <body>
<div>
<p>...</p>
</div>
</body>
Removing the paragraph should break and show:
[P] Triggered DOM Breakpoint
Subtree Modified
Remove descendant <p>
Inserting a new paragraph at the same spot should break and show:
[P] Triggered DOM Breakpoint
Subtree Modified
Append child to <div>
Created attachment 304849 [details]
[Image] pause reason v1
Created attachment 304850 [details]
[Image] pause reason v2
Created attachment 304866 [details]
Patch
Comment on attachment 304866 [details] Patch Clearing flags on attachment: 304866 Committed r214861: <http://trac.webkit.org/changeset/214861> All reviewed patches have been landed. Closing bug. |
Created attachment 304061 [details] [Image] pause reason UI Summary: Show additional pause reason details for DOM "subtree modified" breakpoint. Make use of the `insertion` and `targetNode` info sent from the backend. insertion (boolean) - disambiguates a subtree modification (node inserted or removed) taretNode (object) - if insertion = true, remote object payload for the DOM node owning the breakpoint (how is this helpful?) - if insertion = false, remote object payload for the DOM node being removed Notes: Attached is a WIP UI for the insertion = false case.