[webkit-reviews] review granted: [Bug 233054] Web Inspector: Add a swatch for align-items and align-self : [Attachment 446786] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 10 12:56:55 PST 2021


Devin Rousso <drousso at apple.com> has granted Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 233054: Web Inspector: Add a swatch for align-items and align-self
https://bugs.webkit.org/show_bug.cgi?id=233054

Attachment 446786: Patch

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




--- Comment #32 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 446786
  --> https://bugs.webkit.org/attachment.cgi?id=446786
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Models/AlignmentData.js:62
> +    get text() { return this._text; }
> +    set text(text) { this._text = text; }

Aside: we should probably turn this into a similar enum to
`WI.AlignmentData.Type`, but we can do that as a followup

> Source/WebInspectorUI/UserInterface/Views/InlineSwatch.js:206
>	   case WI.InlineSwatch.Type.Alignment:

I just realized, this needs `{` `}` around the body (i.e. after the `:` and on
the line after the `break;`) in order to use `let`
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/s
witch#block-scope_variables_within_switch_statements>.

Alternatively, you could just inline `glyphPath` and remove the `let` entirely.


More information about the webkit-reviews mailing list