[webkit-reviews] review requested: [Bug 179291] Web Inspector: Styles Redesign: flashing when switching between nodes : [Attachment 336414] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 23 13:08:55 PDT 2018


Nikita Vasilyev <nvasilyev at apple.com> has asked  for review:
Bug 179291: Web Inspector: Styles Redesign: flashing when switching between
nodes
https://bugs.webkit.org/show_bug.cgi?id=179291

Attachment 336414: Patch

https://bugs.webkit.org/attachment.cgi?id=336414&action=review




--- Comment #12 from Nikita Vasilyev <nvasilyev at apple.com> ---
Created attachment 336414

  --> https://bugs.webkit.org/attachment.cgi?id=336414&action=review

Patch

(In reply to Matt Baker from comment #11)
> Based our offline discussion, I think this can be greatly simplified by:
> 
> 1) Removing StyleDetailsPanel.prototype.refresh and
> StyleDetailsPanel.Event.Refreshed. Only GeneralStyleDetailsSidebarPanel
> listeners for this event, and it's event handler is redundant:
>    - GeneralStyleDetailsSidebarPanel._filterDidChange calls filterDidChange
> on the panel, which isn't needed. The panel has already updated it's filter
> bar when it refreshed itself!
>    - It isn't necessary to toggle "filter-in-progress" on the ContentView
> every time a child panel is refreshed. A refresh (layout) can happen for
> reasons other than the filter changing. Furthermore, the ContentView
> classList should already be in the correct state (either it's the first
> refresh and the filter doesn't exist yet, or the filter changed after the
> panel did its initialLayout, and StyleDetailsPanel was notified via
> FilterBar.Event.FilterDidChange).
> 
> 2) Refactoring panels to use initialLayout/layout (they are already Views!).
> The `significantChange` flag can be eliminated by having subclasses perform
> a layout (or not) based on the value of the flag.

This was a lot of changes and it didn't stop there.

I have a small patch for now that does not remove refresh method on all panels.


More information about the webkit-reviews mailing list