[webkit-reviews] review denied: [Bug 176822] Web Inspector: Canvas: recording parameters that include colors should show an InlineSwatch (2D canvas) : [Attachment 320605] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 13 15:26:47 PDT 2017


Devin Rousso <webkit at devinrousso.com> has denied Matt Baker
<mattbaker at apple.com>'s request for review:
Bug 176822: Web Inspector: Canvas: recording parameters that include colors
should show an InlineSwatch (2D canvas)
https://bugs.webkit.org/show_bug.cgi?id=176822

Attachment 320605: Patch

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




--- Comment #12 from Devin Rousso <webkit at devinrousso.com> ---
Comment on attachment 320605
  --> https://bugs.webkit.org/attachment.cgi?id=320605
Patch

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

r- for tests of new Color functions

> Source/WebInspectorUI/UserInterface/Models/Color.js:228
> +    static cmyk2rgb(c, m, y, k)

Can you add some tests for this?

> Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js:129
> +	      
WI.RecordingActionTreeElement._insertSwatchForColorParameters(recordingAction,
parametersContainer);

I think it might be clearer (and more flexible for other swatch types, such as
image previews) if you inverted the logic.  Based on the action name, you
create a color swatch.	Otherwise, you do nothing.  It seems odd to me to
always call this function for every action even though most of them don't do
anything.

> Source/WebInspectorUI/UserInterface/Views/RecordingActionTreeElement.js:191
> +	       return null;

NIT: you can just `return;` with no value.


More information about the webkit-reviews mailing list