2011-04-22 Joseph Pecoraro <joepeck@webkit.org>
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2011 22:44:45 +0000 (22:44 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2011 22:44:45 +0000 (22:44 +0000)
commit7e4215d4d073ce04b48b3d512c49072145917716
treee2d7c9cdff93d0aa4ebe8dd4363617a6d3f93be0
parent6a581e03254c3d62befb8bcd1c25f71b467e5b8c
2011-04-22  Joseph Pecoraro  <joepeck@webkit.org>

        Reviewed by Kent Tamura.

        Let the RenderTheme decide if an input type should have a spinner
        https://bugs.webkit.org/show_bug.cgi?id=59246

        Whether an input should have a spinner or not should
        be a UI decision made by the RenderTheme. Remove
        WebCore's default hasSpinButton values and defer
        to the RenderTheme.

        No change in functionality, covered by existing tests.

        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::isRangeControl): expose isRangeControl
        for possible RenderTheme queries.
        * html/HTMLInputElement.h:

        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
        (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
        For both of these ask the render theme if the input should
        have a spinner.

        * rendering/RenderTheme.cpp:
        (WebCore::RenderTheme::shouldHaveSpinButtonForInputElement):
        Steppable inputs (number, date, and range) but not range
        should have spinners. This does not change existing behavior.
        * rendering/RenderTheme.h:

        * dom/InputElement.h:
        * html/BaseDateAndTimeInputType.cpp: remove hasSpinButton.
        * html/BaseDateAndTimeInputType.h: remove hasSpinButton.
        * html/InputType.cpp: remove hasSpinButton.
        * html/InputType.h: remove hasSpinButton.
        * html/NumberInputType.cpp: remove hasSpinButton.
        * html/NumberInputType.h: remove hasSpinButton.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/InputElement.h
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/rendering/RenderTextControlSingleLine.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderTheme.h