[webkit-reviews] review granted: [Bug 199950] Web Inspector: Elements: Styles: move psuedo-selector rules before inherited rules : [Attachment 374487] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 2 20:44:00 PDT 2019


Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 199950: Web Inspector: Elements: Styles: move psuedo-selector rules before
inherited rules
https://bugs.webkit.org/show_bug.cgi?id=199950

Attachment 374487: Patch

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




--- Comment #4 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 374487
  --> https://bugs.webkit.org/attachment.cgi?id=374487
Patch

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

r=me!

>
Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
306
> +		   beforePseudoId =
InspectorBackend.domains.CSS.PseudoId.Before;

You probably already know but this conflicts with your other change, so be
careful when landing both.

>
Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
331
> +	       if (style.inherited && (!previousStyle ||
!previousStyle.inherited))
> +		   addPseudoStyles();

Can this be simplified to just:

    if (style.inherited)
	addPsuedoStyles();

It seems like the `(!previousStyle || !previousStyle.inherited)` part is just
to avoid calling the function again but the function already gracefully handles
multiple times, so it will already do the work for us.


More information about the webkit-reviews mailing list