[Forms] Spin button sometimes ignores Indeterminate of m_upDownState
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Feb 2012 06:17:09 +0000 (06:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Feb 2012 06:17:09 +0000 (06:17 +0000)
commit55c22d8a080ad36155a01a8a013b5dd8a3227cc8
treefee94ad52b1ece748313d1eba4c8f042849c5cbf
parent586f777399eadd3f1ac4bd05de366b1adaed42e9
[Forms] Spin button sometimes ignores Indeterminate of m_upDownState
https://bugs.webkit.org/show_bug.cgi?id=79754

Patch by Yoshifumi Inoue <yosin@chromium.org> on 2012-02-28
Reviewed by Kent Tamura.

Source/WebCore:

This patch checks enum value Indeterminate before using m_upDownState. This make
sure Indeterminate state doesn't act like Down state.

m_upDownState can be Indeterminate at mousedown event if mouse pointer is on
spin button when it is displayed.

Test: fast/forms/number/spin-button-state.html

* html/shadow/TextControlInnerElements.cpp:
(WebCore::SpinButtonElement::defaultEventHandler):
(WebCore::SpinButtonElement::repeatingTimerFired):

LayoutTests:

* fast/forms/number/spin-button-state.html: Added.
* fast/forms/number/spin-button-state-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/number/spin-button-state-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/number/spin-button-state.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/TextControlInnerElements.cpp