Skip to content
  • tkent@chromium.org's avatar
    Calendar Picker: Open a calendar picker by keyboard operation · e3bf720b
    tkent@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=84680
    
    Reviewed by Kentaro Hara.
    
    Source/WebCore:
    
    - Open a calendar picker by the down arrow key.
    - Remove stepping down/up by keyboard and wheel operations.
      This behavior was for text fields with spin buttons. Because the date
    type doesn't have spin buttons, we should remove this behavior.
    
    No new tests for opening a calendar picker. This behavior is not
    testable by DRT yet. For removal of stepping up/down,
    fast/forms/date/date-stepup-stepdown-from-renderer.html is updated.
    
    * html/BaseDateAndTimeInputType.cpp:
    (WebCore::BaseDateAndTimeInputType::handleKeydownEvent):
    Check shouldHaveSpinButton() before spin button key operations.
    (WebCore::BaseDateAndTimeInputType::handleWheelEvent):
    Check shouldHaveSpinButton() before spin button wheel operations.
    * html/BaseDateAndTimeInputType.h:
    (BaseDateAndTimeInputType):
    Make handleKeydownEvent() protected because a subclass overrides it.
    * html/DateInputType.cpp:
    (WebCore::DateInputType::handleKeydownEvent):
    Open a calendar picker by the down arrow key.
    * html/DateInputType.h:
    (DateInputType): Add handleKeydownEvent() declaration.
    * html/shadow/CalendarPickerElement.h:
    (CalendarPickerElement): Make openPopup() public because DateInputType calls it.
    
    LayoutTests:
    
    * fast/forms/date/date-stepup-stepdown-from-renderer-expected.txt:
    * fast/forms/date/date-stepup-stepdown-from-renderer.html:
    Stepping up/down by kerboard was removed. Update the test to confirm it doesn't work.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115155 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    e3bf720b