[webkit-reviews] review granted: [Bug 178498] Web Inspector: Styles Redesign: Typing semicolon at the end of value should move to the next property : [Attachment 329677] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 19 13:24:33 PST 2017


Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<webkit at devinrousso.com>'s request for review:
Bug 178498: Web Inspector: Styles Redesign: Typing semicolon at the end of
value should move to the next property
https://bugs.webkit.org/show_bug.cgi?id=178498

Attachment 329677: Patch

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




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

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

r=me

> Source/WebInspectorUI/ChangeLog:13
> +	   semicolon after `url("foo` or `url(bar` would not move to the next
property.

I don't see how it would make `url(bar;` not move to the next property.

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:528
> +	   if (!quoteRegex.test(text) || text.substring(start,
end).hasMatchingEscapedQuotes()) {

No need to run the regex again, just check if we found a match:

    if (start === -1 || ...)

Better yet make this an early return:

    if (start !== -1 && !text.substring(start, end).hasMatchingEscapedQuotes())
	return;


More information about the webkit-reviews mailing list