Bug 176827 - Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
Summary: Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-09-13 01:34 PDT by Devin Rousso
Modified: 2022-09-07 08:27 PDT (History)
10 users (show)

See Also:


Attachments
Patch (44.50 KB, patch)
2017-09-18 11:34 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (44.17 KB, patch)
2017-09-25 17:15 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2017-09-13 01:34:00 PDT
This would allow us to tighten when we send specific information about nodes to the frontend to only for the selected node.
Comment 1 Devin Rousso 2017-09-18 11:34:01 PDT
Created attachment 321116 [details]
Patch
Comment 2 Build Bot 2017-09-18 11:36:56 PDT
Attachment 321116 [details] did not pass style-queue:


ERROR: Source/WebCore/inspector/InspectorDOMAgent.cpp:207:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 1 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Joseph Pecoraro 2017-09-25 11:46:03 PDT
Comment on attachment 321116 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=321116&action=review

r=me, very nice!

> Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js:61
> +    get inspectedNode() { return this._inspectedNode; }

Is this actually used? inspectedNode/_inspectedNode other than an early return in `setInspectedNode()`?

Given that `setInspectedNode` doesn't populate it until a callback, I'd expect clients to have a hard time using this, since it would be wrong immediately after someone sets the value. I think we should drop this.

> Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js:537
> +        // COMPATIBILITY (iOS 11): DOM.setInspectedNode did not exist.
> +        if (!DOMAgent.setInspectedNode) {

Well done!
Comment 4 Devin Rousso 2017-09-25 17:15:26 PDT
Created attachment 321777 [details]
Patch
Comment 5 WebKit Commit Bot 2017-09-25 18:40:34 PDT
Comment on attachment 321777 [details]
Patch

Clearing flags on attachment: 321777

Committed r222486: <http://trac.webkit.org/changeset/222486>
Comment 6 WebKit Commit Bot 2017-09-25 18:40:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-09-27 12:28:58 PDT
<rdar://problem/34693354>