[Forms] Left/Right keys in multiple fields time input UI should move focus physical...
authoryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2012 07:09:11 +0000 (07:09 +0000)
committeryosin@chromium.org <yosin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2012 07:09:11 +0000 (07:09 +0000)
commitcc901a9ef0084fcd3d1624ad8297a6baa308729b
tree827db34b34be5b79aff74b21f8ed54bcebc72e7c
parente903bdcfe08b00c8d7386c093b190b27e3ca6af3
[Forms] Left/Right keys in multiple fields time input UI should move focus physical left/right instead of logical left/right regardless text direction.
https://bugs.webkit.org/show_bug.cgi?id=95434

Reviewed by Kent Tamura.

Source/WebCore:

This patch also changes handling of Left/Right keys to aware text
direction ("dir" attribute"). Left/Right keys should move focus
physical right/left instead of logical right/left.

This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.

No new tests. This patch adds a test case into fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html

* html/shadow/DateTimeFieldElement.cpp:
(WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Changed to check isRTL() for Left/Right keys then we call
appropriate focus motion function.
(WebCore::DateTimeFieldElement::isRTL): Added for checking text direction is right-to-left or not.
* html/shadow/DateTimeFieldElement.h:
(DateTimeFieldElement): Added declaration of isRTL().

LayoutTests:

This patch adds a new test case of Left/Right keys navigation on
right-to-left text direction for multiple field time input UI.

This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.

* fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html: Changed to have Left/Right keys navigation in
right-to-left text direction.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events-expected.txt
LayoutTests/fast/forms/time-multiple-fields/time-multiple-fields-keyboard-events.html
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/DateTimeFieldElement.cpp
Source/WebCore/html/shadow/DateTimeFieldElement.h