2011-04-22 Joseph Pecoraro <joepeck@webkit.org>
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2011 21:32:40 +0000 (21:32 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2011 21:32:40 +0000 (21:32 +0000)
commit8c9355a6b4f64a5365a9cd9d8f300d3ab17707e5
treeeec17761415982d8384587bbd9a2eca1214fd430
parent6f3b7f795bf6ce19e8c3a39ef5c2c4148aa12193
2011-04-22  Joseph Pecoraro  <joepeck@webkit.org>

        Reviewed by Kent Tamura.

        Don't rely on hasSpinButton to check if an input type can be stepped
        https://bugs.webkit.org/show_bug.cgi?id=59224

        Add isSteppable to know for certain if an input type can
        be stepped or not. Previously we were checking if the input
        has a spin control or is the range input type. These are UI
        details, but the step functionality does not require there
        to be a UI.

        No change in behavior, covered by existing tests.

        * html/BaseDateAndTimeInputType.cpp:
        (WebCore::BaseDateAndTimeInputType::isSteppable):
        * html/BaseDateAndTimeInputType.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::isSteppable):
        (WebCore::HTMLInputElement::stepUpFromRenderer): remove the
        check for a spinner and range control and instead ASSERT
        that the type is steppable.
        * html/HTMLInputElement.h:
        * html/InputType.cpp:
        (WebCore::InputType::isSteppable):
        * html/InputType.h:
        * html/NumberInputType.cpp:
        (WebCore::NumberInputType::isSteppable):
        * html/NumberInputType.h:
        * html/RangeInputType.cpp:
        (WebCore::RangeInputType::isSteppable):
        * html/RangeInputType.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/BaseDateAndTimeInputType.cpp
Source/WebCore/html/BaseDateAndTimeInputType.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/NumberInputType.cpp
Source/WebCore/html/NumberInputType.h
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/RangeInputType.h