[webkit-reviews] review granted: [Bug 203436] Web Inspector: Display color picker for p3 colors : [Attachment 382758] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 4 15:16:56 PST 2019

Brian Burg <bburg at apple.com> has granted Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 203436: Web Inspector: Display color picker for p3 colors

Attachment 382758: Patch


--- Comment #4 from Brian Burg <bburg at apple.com> ---
Comment on attachment 382758
  --> https://bugs.webkit.org/attachment.cgi?id=382758

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

r=me with a suggestion

> Source/WebInspectorUI/UserInterface/Models/Color.js:35
> +	   this.gamut = gamut || WI.Color.Gamut.srgb;

We generally do not name enum values in lowercase-only. It would work out
better I think, to have the enum value be the same, but change the name to

> Source/WebInspectorUI/UserInterface/Models/Color.js:181
> +	       if (!WI.Color.Gamut.hasOwnProperty(gamut))

...then this line can be more robust:

 if (!WI.Color.Gamut.fromString(gamut))

More information about the webkit-reviews mailing list