[webkit-reviews] review granted: [Bug 192946] Web Inspector: Autoformat doesn't work on icloud.com (javascript-packed.js) : [Attachment 357851] [PATCH] Proposed Fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 20 13:05:09 PST 2018


Devin Rousso <drousso at apple.com> has granted Joseph Pecoraro
<joepeck at webkit.org>'s request for review:
Bug 192946: Web Inspector: Autoformat doesn't work on icloud.com
(javascript-packed.js)
https://bugs.webkit.org/show_bug.cgi?id=192946

Attachment 357851: [PATCH] Proposed Fix

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




--- Comment #3 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 357851
  --> https://bugs.webkit.org/attachment.cgi?id=357851
[PATCH] Proposed Fix

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

rs=me, nice test

> LayoutTests/inspector/formatting/is-text-likely-minified.html:111
> +    let sampleHeader = `

NIT: const.

> LayoutTests/inspector/formatting/is-text-likely-minified.html:127
> +    let longHeaderSource = sampleHeader.repeat(10) +
jQueryMinifiedSourceFragment;

NIT: const.

> LayoutTests/inspector/formatting/is-text-likely-minified.html:129
> +	   name: "JQuerySnippet.Minified",

Use a different name, like "JQuerySnippet.MinifiedWithHeader".

NIT: jQuery is stylized as "jQuery" not "JQuery", so we might want to follow
that.

> Source/WebInspectorUI/UserInterface/Base/Utilities.js:1621
> +    for (let i = start; i < end; i++) {

NIT: ++i

> Source/WebInspectorUI/UserInterface/Base/Utilities.js:1623
>	   if (char === " ")

Should we care about \r as well?


More information about the webkit-reviews mailing list