Add suggestionPicker to CalendarPicker
https://bugs.webkit.org/show_bug.cgi?id=97201
Reviewed by Kent Tamura.
.:
* ManualTests/forms/calendar-picker.html: Added tests for SuggestionPicker.
Source/WebCore:
This adds the suggestionPicker to CalendarPicker. It is not available yet as a datalist UI but it can be used inside ManualTests/forms/calendar-picker.html.
No new tests. Suggestion Picker can be tested in ManualTests/forms/calendar-picker.html.
* Resources/pagepopups/calendarPicker.js:
(initialize):
(openSuggestionPicker):
* Resources/pagepopups/pickerCommon.js:
(enclosingNodeOrSelfWithClass):
* Resources/pagepopups/suggestionPicker.css: Added.
(.suggestion-list):
(.suggestion-list-entry):
(.suggestion-list-entry:focus):
(.suggestion-list-entry:focus .label):
(.suggestion-list-entry .content):
(.suggestion-list-entry .title):
(.suggestion-list-entry .label):
(.measuring-width .suggestion-list-entry .label):
(.suggestion-list .separator):
* Resources/pagepopups/suggestionPicker.js: Added.
(SuggestionPicker):
(SuggestionPicker.validateConfig):
(SuggestionPicker.prototype.cleanup):
(SuggestionPicker.prototype._setColors): Creates css rules that sets highlight colors.
(SuggestionPicker.prototype._createSuggestionEntryElement): Creates an entry that when selected submits the value.
(SuggestionPicker.prototype._createActionEntryElement): Creates an entry that causes an action. (e.x. "Other...")
(SuggestionPicker.prototype._measureMaxContentWidth): Temporarily left align everything to measure the width.
(SuggestionPicker.prototype._fixWindowSize):
(SuggestionPicker.prototype._layout):
(SuggestionPicker.prototype.selectEntry):
(SuggestionPicker.prototype._handleEntryClick):
(SuggestionPicker.prototype._findFirstVisibleEntry):
(SuggestionPicker.prototype._findLastVisibleEntry):
(SuggestionPicker.prototype._handleBodyKeyDown):
(SuggestionPicker.prototype._handleEntryMouseOver):
(SuggestionPicker.prototype._handleMouseOut):
* WebCore.gyp/WebCore.gyp:
Source/WebKit/chromium:
* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::writeDocument): Add js/css for SuggestionPicker to page picker. Add highlight color to args.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129326
268f45cc-cd09-0410-ab3c-
d52691b4dbfc