[webkit-reviews] review denied: [Bug 92109] Implement ColorSuggestionPicker page popup : [Attachment 154041] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 24 07:34:45 PDT 2012


Kent Tamura <tkent at chromium.org> has denied Keishi Hattori
<keishi at webkit.org>'s request for review:
Bug 92109: Implement ColorSuggestionPicker page popup
https://bugs.webkit.org/show_bug.cgi?id=92109

Attachment 154041: Patch
https://bugs.webkit.org/attachment.cgi?id=154041&action=review

------- Additional Comments from Kent Tamura <tkent at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=154041&action=review


> Source/WebCore/Resources/colorSuggestionPicker.js:97
> +"#ffffff", "#980000", "#ff0000", "#ff9900", "#ffff00", "#00ff00", "#00ffff",

> +"#4a86e8", "#0000ff", "#9900ff", "#ff00ff"];

nit: need indentation

> Source/WebCore/Resources/colorSuggestionPicker.js:144
> +    this.element = element;
> +    this.config = config;

private members should be start with _

this.element -> this._element
this.config -> this._config
this.layout() -> this._layout()

> Source/WebCore/Resources/colorSuggestionPicker.js:150
> +var SwatchSize = 24; // keep in sync with CSS

'Size' is unclear.  This should be SwatchBorderBoxWidth or something like that.
 The comment or the name should have its unit.

> Source/WebCore/Resources/colorSuggestionPicker.js:157
> +    for (var i = 0; i  < this.config.values.length; i ++) {

- extra space between i and <.
- i ++ should be ++i

> Source/WebCore/Resources/colorSuggestionPicker.js:159
> +	   swatch.value = this.config.values[i];

Adding an application data to a DOM object isn't a good idea.
We should use data-* attribute like
    swatch.dataset.value = ...


More information about the webkit-reviews mailing list