<https://webkit.org/b/195368> provides highlighting, but we should also be able to context menu and "Reveal in DOM tree".
Created attachment 364413 [details] Patch
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?
(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 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 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 on attachment 364413 [details] Patch Clearing flags on attachment: 364413 Committed r242820: <https://trac.webkit.org/changeset/242820>
All reviewed patches have been landed. Closing bug.
<rdar://problem/48819815>