RESOLVED FIXED 179040
Web Inspector: Styles Redesign: Hovering over a selector should highlight matching elements on the page
https://bugs.webkit.org/show_bug.cgi?id=179040
Summary Web Inspector: Styles Redesign: Hovering over a selector should highlight mat...
Nikita Vasilyev
Reported 2017-10-30 17:39:50 PDT
A feature of the old Styles sidebar that hasn't been implemented in the redesigned styles sidebar yet. <rdar://problem/35067795>
Attachments
Patch (2.95 KB, patch)
2017-10-31 16:13 PDT, Nikita Vasilyev
hi: review+
[Animated GIF] With patch applied (308.95 KB, image/gif)
2017-10-31 16:15 PDT, Nikita Vasilyev
no flags
Patch (2.74 KB, patch)
2017-11-01 11:37 PDT, Nikita Vasilyev
no flags
Nikita Vasilyev
Comment 1 2017-10-31 16:13:03 PDT
Nikita Vasilyev
Comment 2 2017-10-31 16:15:25 PDT
Created attachment 325512 [details] [Animated GIF] With patch applied
Nikita Vasilyev
Comment 3 2017-10-31 16:37:57 PDT
Besides mouseover/mouseout, the old styles sidebar has code to highlight selectors when focusing on the selector field. This is nearly useless, since there's no way to Tab or Shift-Tab into a selector field, e.g. selector fields don't have appropriate tabIndex and pressing Tab or Shift-Tab when editing properties doesn't move focus away from CodeMirror instances. In addition to this, highlighting selectors on focus may create a few confusing states: 1. Focus on selector ".foo". 2. Hover over selector ".bar". Should it highlight ".foo" or ".bar"? 3. Move the mouse cursor away from ".bar". Should it highlight ".foo" or nothing? I think we should keep things simple and only highlight selectors when hovering over them.
Devin Rousso
Comment 4 2017-10-31 19:43:54 PDT
Comment on attachment 325511 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=325511&action=review > Source/WebInspectorUI/ChangeLog:13 > + Use mouseenter/mouseleave events instead of mousein/mouseout (as in the old styles sidebar) > + to avoid unnecessary events being fired: > + - mouseenter/mouseleave fires once when the mouse cursor enters/leaves the element. > + - mousein/mouseout fires every time the mouse cursor enters/leaves the element and any of its children. I don't think this explanation is necessary, especially since you aren't modifying the old sidebar. Feel free to keep it if you think it adds something though :)
Nikita Vasilyev
Comment 5 2017-11-01 11:37:38 PDT
WebKit Commit Bot
Comment 6 2017-11-01 12:10:23 PDT
Comment on attachment 325602 [details] Patch Clearing flags on attachment: 325602 Committed r224286: <https://trac.webkit.org/changeset/224286>
WebKit Commit Bot
Comment 7 2017-11-01 12:10:25 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.