Implement ColorSuggestionPicker page popup
authorkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 03:21:46 +0000 (03:21 +0000)
committerkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 03:21:46 +0000 (03:21 +0000)
commit6bed3535fb474c7cf0f3c4429e290af1b387c493
tree8184141df1bc05dc91e027576d83a46a243487f0
parentf7015a5e8bf8a9f15d638e653dcd5581c2ac7b6a
Implement ColorSuggestionPicker page popup
https://bugs.webkit.org/show_bug.cgi?id=92109

Reviewed by Kent Tamura.

.:

* ManualTests/forms/color-suggestion-picker.html: Added. Tests colorSuggestionPicker.{js,css}

Source/WebCore:

Implements ColorSuggestionPicker page popup. This will be used in
certain ports as the datalist UI for <input type=color>.

No new tests because there is no way to open the popup yet.

* Resources/colorSuggestionPicker.css: Added.
(body):
(#main):
(.color-swatch):
(.color-swatch:hover):
(.color-swatch-container):
(.other-color):
* Resources/colorSuggestionPicker.js: Added.
(getScrollbarWidth):When there are more than 20 colors we need to
increase the window width to accommodate the scroll bar.
(createElement):
(handleMessage):
(initialize):
(handleArgumentsTimeout):
(validateArguments):
(submitValue): Calls setValueAndClosePopup with a numValue of 0.
(handleCancel): Calls setValueAndClosePopup with a numValue of -1.
(chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
(ColorPicker):
(ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
grid.
(ColorPicker.prototype._handleSwatchClick):
* WebCore.gyp/WebCore.gyp: Added ColorSuggestionPicker action.
* make-file-arrays.py:
(main): Windows gets confused when "&&" is in the command, so we will replace " AND " with " && " internally.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
ManualTests/forms/color-suggestion-picker.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Resources/colorSuggestionPicker.css [new file with mode: 0644]
Source/WebCore/Resources/colorSuggestionPicker.js [new file with mode: 0644]
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/make-file-arrays.py