[Forms] Use enum instead of bool for HTMLInputElement::setValue
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 11:01:16 +0000 (11:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 11:01:16 +0000 (11:01 +0000)
commit37540617f7980226281b54cf2c128b5034009cc4
tree623ad4db763bb6ddea0acf1bdfbc7af8de9f204e
parent57571066f04d5b41df833f497173cd21d6055abc
[Forms] Use enum instead of bool for HTMLInputElement::setValue
https://bugs.webkit.org/show_bug.cgi?id=75217

Patch by Yosifumi Inoue <yosin@chromium.org> on 2012-02-13
Reviewed by Kent Tamura.

Source/WebCore:

Use TextFieldEventBehavior enum instead of sendChangeEvent bool
parameter for HTMLInputElement::setValue method. This new enum
parameter will be extended to dispatch input and change events
when user agent populates input field as specified in
"Common events behavior" of HTML5 standard.

This patch is required for fixing bug 75067 "[Forms] Spin buttons
of number input type should fire both input and change event."

No new tests. Existing tests cover this patch.

* html/BaseButtonInputType.cpp:
(WebCore::BaseButtonInputType::setValue):
* html/BaseButtonInputType.h:
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::setValue):
* html/BaseCheckableInputType.h:
* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::setValueAsNumber):
* html/BaseDateAndTimeInputType.h:
* html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::willDispatchClick):
* html/ColorInputType.cpp:
(WebCore::ColorInputType::setValue):
* html/ColorInputType.h:
* html/FileInputType.cpp:
(WebCore::FileInputType::setValue):
* html/FileInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::applyStep):
(WebCore::HTMLInputElement::stepUp):
(WebCore::HTMLInputElement::stepDown):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::setValueForUser):
(WebCore::HTMLInputElement::setValue):
(WebCore::HTMLInputElement::setValueInternal):
(WebCore::HTMLInputElement::setValueAsNumber):
(WebCore::HTMLInputElement::stepUpFromRenderer):
* html/HTMLInputElement.h:
* html/HTMLTextFormControlElement.h:
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::setValue):
* html/HiddenInputType.h:
* html/InputType.cpp:
(WebCore::InputType::setValueAsNumber):
(WebCore::InputType::setValue):
* html/InputType.h:
* html/NumberInputType.cpp:
(WebCore::NumberInputType::setValueAsNumber):
* html/NumberInputType.h:
* html/RadioInputType.cpp:
(WebCore::RadioInputType::willDispatchClick):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::setValueAsNumber):
(WebCore::RangeInputType::handleKeydownEvent):
(WebCore::RangeInputType::setValue):
* html/RangeInputType.h:
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::setValue):
* html/TextFieldInputType.h:

Source/WebKit/chromium:

* src/WebInputElement.cpp:
(WebKit::WebInputElement::setValue): Use enum for HTMLInputElement::setValue

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/BaseButtonInputType.cpp
Source/WebCore/html/BaseButtonInputType.h
Source/WebCore/html/BaseCheckableInputType.cpp
Source/WebCore/html/BaseCheckableInputType.h
Source/WebCore/html/BaseDateAndTimeInputType.cpp
Source/WebCore/html/BaseDateAndTimeInputType.h
Source/WebCore/html/CheckboxInputType.cpp
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/ColorInputType.h
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/FileInputType.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/html/HiddenInputType.cpp
Source/WebCore/html/HiddenInputType.h
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/NumberInputType.cpp
Source/WebCore/html/NumberInputType.h
Source/WebCore/html/RadioInputType.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/RangeInputType.h
Source/WebCore/html/TextFieldInputType.cpp
Source/WebCore/html/TextFieldInputType.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebInputElement.cpp