Add suggestionPicker to CalendarPicker
authorkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 04:39:09 +0000 (04:39 +0000)
committerkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Sep 2012 04:39:09 +0000 (04:39 +0000)
commit5328cc27debc3f8e0fc742c69e7cc8a10d7b12e1
tree61abf7293f7c903489c3d020d5edc50d844e29a7
parent1424c5b0de832acb23fe6a240644417a4cd8f5a1
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
ChangeLog
ManualTests/forms/calendar-picker.html
Source/WebCore/ChangeLog
Source/WebCore/Resources/pagepopups/calendarPicker.js
Source/WebCore/Resources/pagepopups/pickerCommon.js
Source/WebCore/Resources/pagepopups/suggestionPicker.css [new file with mode: 0644]
Source/WebCore/Resources/pagepopups/suggestionPicker.js [new file with mode: 0644]
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/DateTimeChooserImpl.cpp