Changeset 63926 in webkit


Ignore:
Timestamp:
Jul 22, 2010 5:32:24 PM (14 years ago)
Author:
tkent@chromium.org
Message:

2010-07-22 Kent Tamura <tkent@chromium.org>

Reviewed by Ojan Vafai.

<input type=number> stepper buttons should dispatch input/change events
https://bugs.webkit.org/show_bug.cgi?id=42440

  • fast/forms/input-number-events-expected.txt: Added.
  • fast/forms/input-number-events.html: Added.
  • fast/forms/script-tests/input-number-events.js: Added.
  • platform/chromium/test_expectations.txt:
  • platform/gtk/Skipped:
  • platform/qt/Skipped:
  • platform/win/Skipped:

2010-07-22 Kent Tamura <tkent@chromium.org>

Reviewed by Ojan Vafai.

<input type=number> stepper buttons should dispatch input/change events
https://bugs.webkit.org/show_bug.cgi?id=42440

Test: fast/forms/input-number-events.html

  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::stepUpFromRenderer): Sets a flag to dispatch 'change' event and dispatches 'input' event if the value is changed.
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r63925 r63926  
     12010-07-22  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        <input type=number> stepper buttons should dispatch input/change events
     6        https://bugs.webkit.org/show_bug.cgi?id=42440
     7
     8        * fast/forms/input-number-events-expected.txt: Added.
     9        * fast/forms/input-number-events.html: Added.
     10        * fast/forms/script-tests/input-number-events.js: Added.
     11        * platform/chromium/test_expectations.txt:
     12        * platform/gtk/Skipped:
     13        * platform/qt/Skipped:
     14        * platform/win/Skipped:
     15
    1162010-07-22  Justin Schuh  <jschuh@chromium.org>
    217
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r63921 r63926  
    717717
    718718// Need to implement inner-spin-button or outer-spin-button
    719 BUGWK38570 DEFER SKIP : fast/forms/input-appearance-spinbutton-disabled-readonly.html = FAIL
     719BUGWK38570 : fast/forms/input-appearance-spinbutton-disabled-readonly.html = FAIL
     720BUGWK38570 : fast/forms/input-number-events.html = FAIL
    720721
    721722// Add support for inspector layout tests.
  • trunk/LayoutTests/platform/gtk/Skipped

    r63860 r63926  
    57545754# Need to implement inner-spin-button or outer-spin-button
    57555755fast/forms/input-appearance-spinbutton-disabled-readonly.html
     5756fast/forms/input-number-events.html
    57565757
    57575758# https://bugs.webkit.org/show_bug.cgi?id=35350
  • trunk/LayoutTests/platform/qt/Skipped

    r63890 r63926  
    54135413# Need to implement inner-spin-button or outer-spin-button
    54145414fast/forms/input-appearance-spinbutton-disabled-readonly.html
     5415fast/forms/input-number-events.html
    54155416
    54165417# Speech input is not yet enabled.
  • trunk/LayoutTests/platform/win/Skipped

    r63710 r63926  
    922922# https://bugs.webkit.org/show_bug.cgi?id=38381
    923923fast/forms/input-appearance-spinbutton-disabled-readonly.html
     924fast/forms/input-number-events.html
    924925
    925926# Speech input is not yet enabled.
  • trunk/WebCore/ChangeLog

    r63925 r63926  
     12010-07-22  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        <input type=number> stepper buttons should dispatch input/change events
     6        https://bugs.webkit.org/show_bug.cgi?id=42440
     7
     8        Test: fast/forms/input-number-events.html
     9
     10        * html/HTMLInputElement.cpp:
     11        (WebCore::HTMLInputElement::stepUpFromRenderer):
     12         Sets a flag to dispatch 'change' event and dispatches 'input' event
     13         if the value is changed.
     14
    1152010-07-22  Justin Schuh  <jschuh@chromium.org>
    216
  • trunk/WebCore/html/HTMLInputElement.cpp

    r63915 r63926  
    28352835
    28362836    const double nan = numeric_limits<double>::quiet_NaN();
    2837     double current = parseToDouble(value(), nan);
    2838     if (!isfinite(current)) {
     2837    String currentStringValue = value();
     2838    double current = parseToDouble(currentStringValue, nan);
     2839    if (!isfinite(current))
    28392840        setValue(serialize(n > 0 ? minimum() : maximum()));
    2840         return;
    2841     }
    2842     ExceptionCode ec;
    2843     stepUp(n, ec);
     2841    else {
     2842        ExceptionCode ec;
     2843        stepUp(n, ec);
     2844    }
     2845
     2846    if (currentStringValue != value()) {
     2847        if (renderer() && renderer()->isTextField())
     2848            toRenderTextControl(renderer())->setChangedSinceLastChangeEvent(true);
     2849        dispatchEvent(Event::create(eventNames().inputEvent, true, false));
     2850    }
    28442851}
    28452852
Note: See TracChangeset for help on using the changeset viewer.