Bug 203155 - Web Inspector: Elements: $0 is shown for the wrong node when selecting elements in a user agent shadow tree
Summary: Web Inspector: Elements: $0 is shown for the wrong node when selecting elemen...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
Keywords: InRadar
Depends on:
Reported: 2019-10-18 09:58 PDT by Devin Rousso
Modified: 2019-10-18 15:29 PDT (History)
5 users (show)

See Also:

Patch (8.04 KB, patch)
2019-10-18 10:01 PDT, Devin Rousso
mattbaker: review+
Details | Formatted Diff | Diff
Patch (8.05 KB, patch)
2019-10-18 14:17 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 2019-10-18 09:58:18 PDT
1. inspect any page with a UserAgent shadow tree (e.g. an `<input>`)
2. in the Elements Tab, select a node inside the UserAgent shadow tree
 => $0 appears next to the newly selected node
3. evaluate `$0` in the Console
 => the previously selected node (NOT the node inside the UserAgent shadow tree) is logged
Comment 1 Devin Rousso 2019-10-18 10:01:08 PDT
Created attachment 381311 [details]
Comment 2 Matt Baker 2019-10-18 13:57:53 PDT
Comment on attachment 381311 [details]

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


> Source/WebInspectorUI/ChangeLog:8
> +        Rather than "blindly" using the last selected node (from `WI.TreeOutline`), we should wait

Switch to a more descriptive term like 'naively', so you can eliminate the double-quotes.

> Source/WebInspectorUI/ChangeLog:9
> +        to see if the inspected page actually "accepts" the selected node as being inspectable and

Let's not use quotation marks around words like this. AMA style says that other than quoting material directly from a source, quotation marks are used "to introduce a word or phrase used as an ironic comment, as slang, or as an invented or coined expression". Pick words that are more technical/descriptive if necessary, or just remove the quotes.
Comment 3 Devin Rousso 2019-10-18 14:17:56 PDT
Created attachment 381326 [details]
Comment 4 WebKit Commit Bot 2019-10-18 15:28:05 PDT
Comment on attachment 381326 [details]

Clearing flags on attachment: 381326

Committed r251302: <https://trac.webkit.org/changeset/251302>
Comment 5 WebKit Commit Bot 2019-10-18 15:28:06 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-10-18 15:29:19 PDT