[webkit-reviews] review granted: [Bug 154441] Web Inspector: Implement autocompletion for CSS variables : [Attachment 306936] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 13 20:30:16 PDT 2017


Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<webkit at devinrousso.com>'s request for review:
Bug 154441: Web Inspector: Implement autocompletion for CSS variables
https://bugs.webkit.org/show_bug.cgi?id=154441

Attachment 306936: Patch

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




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

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

r=me

>
Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:392
> +	   let variables = properties.filter((property) =>
/--[\w-]+/.test(property.name) && property.name.startsWith(prefix));

We already have `property.variable` which would let us drop this RegExp match
(which looks unnecessarily complex):

    let variables = properties.filter((property) => property.variable &&
property.name.startsWith(prefix));


More information about the webkit-reviews mailing list