Bug 195633 - Web Inspector: Elements: provide node context menu items for event listeners sorted by node
Summary: Web Inspector: Elements: provide node context menu items for event listeners ...
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: 195368
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-12 11:08 PDT by Devin Rousso
Modified: 2019-03-12 13:06 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.16 KB, patch)
2019-03-12 11:16 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-03-12 11:08:59 PDT
<https://webkit.org/b/195368> provides highlighting, but we should also be able to context menu and "Reveal in DOM tree".
Comment 1 Devin Rousso 2019-03-12 11:16:58 PDT
Created attachment 364413 [details]
Patch
Comment 2 Matt Baker 2019-03-12 12:08:51 PDT
Comment on attachment 364413 [details]
Patch

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

r=me, but I think the bug title should be changed. Context menu items aren't added anywhere; this looks like refactoring.

> Source/WebInspectorUI/ChangeLog:12
> +        existing DOM without modifying it.

This is confusing: "...so it can be used on existing DOM without modifying it." Aren't we just separating this out so it can be reused?
Comment 3 Matt Baker 2019-03-12 12:10:04 PDT
(In reply to Matt Baker from comment #2)
> Comment on attachment 364413 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364413&action=review
> 
> r=me, but I think the bug title should be changed. Context menu items aren't
> added anywhere; this looks like refactoring.
> 
> > Source/WebInspectorUI/ChangeLog:12
> > +        existing DOM without modifying it.
> 
> This is confusing: "...so it can be used on existing DOM without modifying
> it." Aren't we just separating this out so it can be reused?

Sorry I misread part of the diff. Looks good! I'd clean up the wording in the change log though.
Comment 4 Devin Rousso 2019-03-12 12:39:20 PDT
Comment on attachment 364413 [details]
Patch

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

>>> Source/WebInspectorUI/ChangeLog:12
>>> +        existing DOM without modifying it.
>> 
>> This is confusing: "...so it can be used on existing DOM without modifying it." Aren't we just separating this out so it can be reused?
> 
> Sorry I misread part of the diff. Looks good! I'd clean up the wording in the change log though.

Yes and no.  Part of it is separating out the code, but the primary reason we have to separate out the code is because the existing function modifies the `element` passed in (as an example, it sets a `role` attribute).  This new function allows us to have the same interaction logic without any other changes to the `element`.
Comment 5 Matt Baker 2019-03-12 13:04:28 PDT
Comment on attachment 364413 [details]
Patch

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

>>>> Source/WebInspectorUI/ChangeLog:12
>>>> +        existing DOM without modifying it.
>>> 
>>> This is confusing: "...so it can be used on existing DOM without modifying it." Aren't we just separating this out so it can be reused?
>> 
>> Sorry I misread part of the diff. Looks good! I'd clean up the wording in the change log though.
> 
> Yes and no.  Part of it is separating out the code, but the primary reason we have to separate out the code is because the existing function modifies the `element` passed in (as an example, it sets a `role` attribute).  This new function allows us to have the same interaction logic without any other changes to the `element`.

Ah okay! It wasn't obvious that this was because `WI.linkifyNodeReferenceElement` does more to the element than hooking up event listeners.
Comment 6 WebKit Commit Bot 2019-03-12 13:05:58 PDT
Comment on attachment 364413 [details]
Patch

Clearing flags on attachment: 364413

Committed r242820: <https://trac.webkit.org/changeset/242820>
Comment 7 WebKit Commit Bot 2019-03-12 13:05:59 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-03-12 13:06:22 PDT
<rdar://problem/48819815>