SuggestionPicker should support rtl
authorkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Sep 2012 08:17:24 +0000 (08:17 +0000)
committerkeishi@webkit.org <keishi@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Sep 2012 08:17:24 +0000 (08:17 +0000)
commit754eaad96e2b940df25cde00ad717627bce17cd6
tree67ab7b8933ed36452c6bd8284d359965d5c7fbc1
parent9c58791a3aee921f93af1786e4fd64d6030c5643
SuggestionPicker should support rtl
https://bugs.webkit.org/show_bug.cgi?id=97555

Reviewed by Kent Tamura.

.:

* ManualTests/forms/calendar-picker.html: Added tests for Arabic with datalist.

Source/WebCore:

Add support for rtl to SuggestionPicker. We add another parameter
because text direction for the calendar picker should depend on the UI
language but the text direction for suggestion picker should depend on
the input element style.

Test: platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl.html

* Resources/pagepopups/calendarPicker.js:
(CalendarPicker.prototype._layout):
* Resources/pagepopups/pickerCommon.css:
(.rtl): Added so we can change styles when in rtl mode.
* Resources/pagepopups/suggestionPicker.css:
(.suggestion-list-entry .label):
(.rtl .suggestion-list-entry .label): Change float direction to left.
* Resources/pagepopups/suggestionPicker.js:
(SuggestionPicker.prototype._layout):
* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::openPopup): Set isAnchorElementRTL to true if the input element is rtl.
* platform/DateTimeChooser.h:
(DateTimeChooserParameters): Added isAnchorElementRTL.

Source/WebKit/chromium:

* src/DateTimeChooserImpl.cpp:
(WebKit::DateTimeChooserImpl::writeDocument):

LayoutTests:

* platform/chromium-mac/platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl-expected.png: Added.
* platform/chromium/TestExpectations:
* platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl-expected.txt: Added.
* platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/platform/chromium-mac/platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/fast/forms/date/date-suggestion-picker-appearance-rtl.html [new file with mode: 0644]
ManualTests/forms/calendar-picker.html
Source/WebCore/ChangeLog
Source/WebCore/Resources/pagepopups/calendarPicker.js
Source/WebCore/Resources/pagepopups/pickerCommon.css
Source/WebCore/Resources/pagepopups/suggestionPicker.css
Source/WebCore/Resources/pagepopups/suggestionPicker.js
Source/WebCore/html/shadow/CalendarPickerElement.cpp
Source/WebCore/platform/DateTimeChooser.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/DateTimeChooserImpl.cpp