Skip to content
  • tkent@chromium.org's avatar
    <input type=number>: Support auto-repeat by mouse press · d27d20b0
    tkent@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=44476
    
    Reviewed by Shinichiro Hamaji
    
    WebCore:
    
    Like arrow button of scrollbars, spinbuttons of <input
    type=number> should continue to increase/decrease their values
    while the mouse button is pressed.
    
    No new tests because the new behavior strongly depends on a timer.
    
    * rendering/TextControlInnerElements.cpp:
    (WebCore::SpinButtonElement::SpinButtonElement):
     Initializes the timer.
    (WebCore::SpinButtonElement::defaultEventHandler):
     Starts the timer by a mousedown event.
    (WebCore::SpinButtonElement::startRepeatingTimer):
    (WebCore::SpinButtonElement::stopRepeatingTimer):
    (WebCore::SpinButtonElement::repeatingTimerFired):
    * rendering/TextControlInnerElements.h:
    
    LayoutTests:
    
    Update existing tests.
    
    * fast/forms/script-tests/input-spinbutton-capturing.js:
    * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.checksum:
    * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.png:
    * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d27d20b0