Commit 17a43873 authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

2011-01-19 Dai Mikurube <dmikurube@google.com>

        Reviewed by Kent Tamura.

        Implement onformchange and onforminput event handlers
        https://bugs.webkit.org/show_bug.cgi?id=26141

        * fast/dom/Window/window-properties-expected.txt: Added form events.
        * fast/dom/Window/window-property-descriptors-expected.txt: Added form events.
        * fast/forms/formchange-event-expected.txt: Added.
        * fast/forms/formchange-event.html: Added to test formchange events.
        * fast/forms/forminput-event-expected.txt: Added.
        * fast/forms/forminput-event.html: Added to test forminput events.
        * fast/forms/script-tests/formchange-event.js: Added.
        (sendKey):
        (sendText):
        * fast/forms/script-tests/forminput-event.js: Added.
        (sendKey):
        (sendText):
2011-01-19  Dai Mikurube  <dmikurube@google.com>

        Reviewed by Kent Tamura.

        Implement onformchange and onforminput event handlers
        https://bugs.webkit.org/show_bug.cgi?id=26141

        Tests: fast/forms/formchange-event.html
               fast/forms/forminput-event.html

        * bindings/scripts/CodeGeneratorGObject.pm: Added event names.
        * dom/Document.h: Added event definitions.
        * dom/Document.idl: Added event definitions.
        * dom/Element.h: Added event definitions.
        * dom/Element.idl: Added event definitions.
        * dom/Event.cpp:
        (WebCore::Event::fromUserGesture): Added a condition for a formchange event in handling user gestures.
        * dom/EventNames.h: Added event definitions.
        * dom/InputElement.cpp:
        (WebCore::InputElement::setValueFromRenderer): Replaced a direct dispatchEvent() call into dispatchInputEvents(), a virtual function which broadcasts forminput events for HTML elements.
        * dom/Node.cpp:
        (WebCore::Node::dispatchInputEvents): Defined basic dispatchInputEvents() described above.
        (WebCore::Node::dispatchChangeEvents): Defined basic dispatchChangeEvents() described above.
        (WebCore::Node::defaultEventHandler): Replaced a direct dispatchEvent() call into dispatchInputEvents().
        * dom/Node.h:
        * html/FormAssociatedElement.h: Added isResettable() to check the element is resettable or not.
        * html/HTMLAttributeNames.in: Added event names.
        * html/HTMLElement.cpp:
        (WebCore::HTMLElement::parseMappedAttribute): Added event handling.
        (WebCore::HTMLElement::shadowAncestorOwnerForm): Added to get an ancestor <form> element from a shadow element.
        (WebCore::HTMLElement::dispatchChangeEvents): Defined dispatchChangeEvents() for HTML elements described above.
        (WebCore::HTMLElement::dispatchInputEvents): Defined dispatchInputEvents() for HTML elements described above.
        * html/HTMLElement.h:
        * html/HTMLFormControlElement.cpp:
        (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent): Added calling dispatchFormChange() to broadcast formchange events.
        (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent): Defined newly to dispatch an input event with broadcasting forminput events.
        * html/HTMLFormControlElement.h: Added isResettable().
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::broadcastFormEvent): Added to broadcast forminput or formchange events.
        (WebCore::HTMLFormElement::dispatchFormInput): Defined newly to broadcast forminput events.
        (WebCore::HTMLFormElement::dispatchFormChange): Defined newly to broadcast formchange events.
        * html/HTMLFormElement.h:
        * html/HTMLFormElement.idl: Added dispatchFormInput() and dispatchFormChange() DOM API definitions.
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::stepUpFromRenderer): Replaced a direct dispatchEvent() call into dispatchInputEvents().
        * html/HTMLInputElement.h: Added isResettable().
        * html/HTMLKeygenElement.h: Added isResettable().
        * html/HTMLObjectElement.h: Added isResettable().
        * html/HTMLOutputElement.h: Added isResettable().
        * html/HTMLSelectElement.h: Added isResettable().
        * html/HTMLTextAreaElement.h: Added isResettable().
        * page/DOMWindow.h: Added event definitions.
        * page/DOMWindow.idl: Added event definitions.
        * rendering/TextControlInnerElements.cpp:
        (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Replaced a direct dispatchEvent() call into dispatchInputEvents().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 89065aef
2011-01-19 Dai Mikurube <dmikurube@google.com>
Reviewed by Kent Tamura.
Implement onformchange and onforminput event handlers
https://bugs.webkit.org/show_bug.cgi?id=26141
* fast/dom/Window/window-properties-expected.txt: Added form events.
* fast/dom/Window/window-property-descriptors-expected.txt: Added form events.
* fast/forms/formchange-event-expected.txt: Added.
* fast/forms/formchange-event.html: Added to test formchange events.
* fast/forms/forminput-event-expected.txt: Added.
* fast/forms/forminput-event.html: Added to test forminput events.
* fast/forms/script-tests/formchange-event.js: Added.
(sendKey):
(sendText):
* fast/forms/script-tests/forminput-event.js: Added.
(sendKey):
(sendText):
2011-01-18 Mikhail Naganov <mnaganov@chromium.org>
 
Reviewed by Yury Semikhatsky.
......
......@@ -2311,6 +2311,8 @@ window.onemptied [null]
window.onended [null]
window.onerror [null]
window.onfocus [null]
window.onformchange [null]
window.onforminput [null]
window.onhashchange [null]
window.oninput [null]
window.oninvalid [null]
......
......@@ -393,6 +393,8 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'onemptied') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'onended') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'onerror') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'onfocus') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'onformchange') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'onforminput') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'onhashchange') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'oninput') is 'object'
PASS typeof Object.getOwnPropertyDescriptor(window, 'oninvalid') is 'object'
......
Test for formchange events.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Change for input (type=text)
PASS result is "Fired"
Change for input (type=number)
PASS result is "Fired"
Change for input (type=radio)
PASS result is "Fired"
Change for input (type=checkbox)
PASS result is "Fired"
Change for textarea
PASS result is "Fired"
Change for select
PASS result is "Fired"
form.dispatchFormChange()
PASS result is "Fired"
Is formchange delivered for?
PASS resultInputText is "Delivered"
PASS resultInputNumber is "Delivered"
PASS resultInputRadio is "Delivered"
PASS resultInputCheckbox is "Delivered"
PASS resultTextarea is "Delivered"
PASS resultKeygen is "Delivered"
PASS resultObject is "Not delivered"
PASS resultOutput is "Delivered"
PASS resultSelect is "Delivered"
PASS resultP is "Not delivered"
PASS resultRemovingInput is "Delivered"
PASS resultRemovingForm is "Delivered"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/formchange-event.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
Test for forminput events.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Change for input (type=text)
PASS result is "Fired"
Change for input (type=number)
PASS result is "Fired"
Change for input (type=radio)
PASS result is "Not fired"
Change for input (type=checkbox)
PASS result is "Not fired"
Change for textarea
PASS result is "Fired"
Change for select
PASS result is "Not fired"
form.dispatchFormInput()
PASS result is "Fired"
Is forminput delivered for?
PASS resultInputText is "Delivered"
PASS resultInputNumber is "Delivered"
PASS resultInputRadio is "Delivered"
PASS resultInputCheckbox is "Delivered"
PASS resultTextarea is "Delivered"
PASS resultKeygen is "Delivered"
PASS resultObject is "Not delivered"
PASS resultOutput is "Delivered"
PASS resultSelect is "Delivered"
PASS resultP is "Not delivered"
PASS resultRemovingInput is "Delivered"
PASS resultRemovingForm is "Delivered"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="script-tests/forminput-event.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
description('Test for formchange events.');
function sendKey(element, keyName) {
var event = document.createEvent('KeyboardEvent');
event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName);
element.dispatchEvent(event);
}
function sendText(element, text) {
var event = document.createEvent('TextEvent');
event.initTextEvent('textInput', true, true, document.defaultView, text);
element.dispatchEvent(event);
}
function sendMouseClick(element) {
var x = element.clientLeft + 10;
var y = element.clientTop + 10;
var event = document.createEvent("MouseEvent");
event.initMouseEvent("mousedown", true, true, document.defaultView, 1, x, y, x, y, false, false, false, false, 0, document);
element.dispatchEvent(event);
var event = document.createEvent("MouseEvent");
event.initMouseEvent("mouseup", true, true, document.defaultView, 1, x, y, x, y, false, false, false, false, 0, document);
element.dispatchEvent(event);
}
function $(id) {
return document.getElementById(id);
}
var form = document.createElement('form');
form.setAttribute('id', 'form');
form.innerHTML =
'<input type="text" id="default-input" value="Input here." />' +
'<input type="text" id="input-text" value="Input here." />' +
'<input type="number" id="input-number" value="24" />' +
'<input type="radio" name="input-radio" id="input-radio1" value="1" checked/>' +
'<input type="radio" name="input-radio" id="input-radio2" value="2" />' +
'<input type="checkbox" name="input-check" id="input-check1" value="1" checked/>' +
'<input type="checkbox" name="input-check" id="input-check2" value="2" />' +
'<textarea id="input-textarea">Input here.</textarea>' +
'<select id="input-select" multiple>' +
'<option id="input-option1" value="option1">option1</option>' +
'<option id="input-option2" value="option2">option2</option>' +
'</select>' +
'<input type="text" id="default-handler" onformchange="result = \'Fired\'" />' +
'<input type="text" id="handler-text" onformchange="resultInputText = \'Delivered\'" />' +
'<input type="number" id="handler-number" onformchange="resultInputNumber = \'Delivered\'" />' +
'<input type="radio" name="handler-radio" id="handler-radio" onformchange="resultInputRadio = \'Delivered\'" />' +
'<input type="checkbox" name="handler-check" id="handler-check" onformchange="resultInputCheckbox = \'Delivered\'" />' +
'<textarea id="handler-textarea" onformchange="resultTextarea = \'Delivered\'"></textarea>' +
'<keygen id="handler-keygen" onformchange="resultKeygen = \'Delivered\'" />' +
'<object id="handler-object" onformchange="resultObject = \'Delivered\'" />' +
'<output id="handler-output" onformchange="resultOutput = \'Delivered\'" />' +
'<select id="handler-select" onformchange="resultSelect = \'Delivered\'" />' +
'<p id="handler-p" onformchange="resultP = \'Delivered\'">Hi!</p>';
document.body.appendChild(form);
function onformchangeRemovingInput() {
$('form-removing-input').removeChild($('handler-removing-input'));
resultRemovingInput = 'Delivered';
}
var form_removing_input = document.createElement('form');
form_removing_input.setAttribute('id', 'form-removing-input');
form_removing_input.innerHTML =
'<input type="text" id="input-removing-input" value="Input here." />' +
'<input type="text" id="handler-removing-input" onformchange="onformchangeRemovingInput()" />';
document.body.appendChild(form_removing_input);
function onformchangeRemovingForm() {
document.body.removeChild($('form-removing-form'));
resultRemovingForm = 'Delivered';
}
var form_removing_form = document.createElement('form');
form_removing_form.setAttribute('id', 'form-removing-form');
form_removing_form.innerHTML =
'<input type="text" id="input-removing-form" value="Input here." />' +
'<input type="text" id="handler-removing-form" onformchange="onformchangeRemovingForm()" />';
document.body.appendChild(form_removing_form);
var result;
debug('Change for input (type=text)');
result = "Not fired";
$('input-text').focus();
sendText($('input-text'), 'New text.');
$('default-input').focus();
shouldBeEqualToString("result", "Fired");
debug('Change for input (type=number)');
result = "Not fired";
$('input-number').focus();
sendKey($('input-number'), 'Up');
$('default-input').focus();
shouldBeEqualToString("result", "Fired");
debug('Change for input (type=radio)');
result = "Not fired";
$('input-radio2').click();
shouldBeEqualToString("result", "Fired");
debug('Change for input (type=checkbox)');
result = "Not fired";
$('input-check2').click();
shouldBeEqualToString("result", "Fired");
debug('Change for textarea');
result = "Not fired";
$('input-textarea').focus();
sendText($('input-textarea'), 'New text.');
$('default-input').focus();
shouldBeEqualToString("result", "Fired");
debug('Change for select');
result = "Not fired";
sendMouseClick($('input-select'));
shouldBeEqualToString("result", "Fired");
debug('form.dispatchFormChange()');
result = "Not fired";
form.dispatchFormChange();
shouldBeEqualToString("result", "Fired");
debug('');
debug('Is formchange delivered for?');
var resultInputText = "Not delivered";
var resultInputNumber = "Not delivered";
var resultInputRadio = "Not delivered";
var resultInputCheckbox = "Not delivered";
var resultTextarea = "Not delivered";
var resultKeygen = "Not delivered";
var resultObject = "Not delivered";
var resultOutput = "Not delivered";
var resultSelect = "Not delivered";
var resultP = "Not delivered";
$('default-input').focus();
sendText($('default-input'), 'New text.');
$('default-handler').focus();
shouldBeEqualToString("resultInputText", "Delivered");
shouldBeEqualToString("resultInputNumber", "Delivered");
shouldBeEqualToString("resultInputRadio", "Delivered");
shouldBeEqualToString("resultInputCheckbox", "Delivered");
shouldBeEqualToString("resultTextarea", "Delivered");
shouldBeEqualToString("resultKeygen", "Delivered");
shouldBeEqualToString("resultObject", "Not delivered");
shouldBeEqualToString("resultOutput", "Delivered");
shouldBeEqualToString("resultSelect", "Delivered");
shouldBeEqualToString("resultP", "Not delivered");
var resultRemovingInput = "Not delivered";
$('input-removing-input').focus();
sendText($('input-removing-input'), 'New text.');
$('default-handler').focus();
shouldBeEqualToString("resultRemovingInput", "Delivered");
var resultRemovingForm = "Not delivered";
$('input-removing-form').focus();
sendText($('input-removing-form'), 'New text.');
$('default-handler').focus();
shouldBeEqualToString("resultRemovingForm", "Delivered");
document.body.removeChild(form);
debug('');
var successfullyParsed = true;
description('Test for forminput events.');
function sendKey(element, keyName) {
var event = document.createEvent('KeyboardEvent');
event.initKeyboardEvent('keydown', true, true, document.defaultView, keyName);
element.dispatchEvent(event);
}
function sendText(element, text) {
var event = document.createEvent('TextEvent');
event.initTextEvent('textInput', true, true, document.defaultView, text);
element.dispatchEvent(event);
}
function sendMouseClick(element) {
var x = element.clientLeft + 10;
var y = element.clientTop + 10;
var event = document.createEvent("MouseEvent");
event.initMouseEvent("mousedown", true, true, document.defaultView, 1, x, y, x, y, false, false, false, false, 0, document);
element.dispatchEvent(event);
var event = document.createEvent("MouseEvent");
event.initMouseEvent("mouseup", true, true, document.defaultView, 1, x, y, x, y, false, false, false, false, 0, document);
element.dispatchEvent(event);
}
function $(id) {
return document.getElementById(id);
}
var form = document.createElement('form');
form.setAttribute('id', 'form');
form.innerHTML =
'<input type="text" id="default-input" value="Input here." />' +
'<input type="text" id="input-text" value="Input here." />' +
'<input type="number" id="input-number" value="24" />' +
'<input type="radio" name="input-radio" id="input-radio1" value="1" checked/>' +
'<input type="radio" name="input-radio" id="input-radio2" value="2" />' +
'<input type="checkbox" name="input-check" id="input-check1" value="1" checked/>' +
'<input type="checkbox" name="input-check" id="input-check2" value="2" />' +
'<textarea id="input-textarea">Input here.</textarea>' +
'<select id="input-select" multiple>' +
'<option id="input-option1" value="option1">option1</option>' +
'<option id="input-option2" value="option2">option2</option>' +
'</select>' +
'<input type="text" id="default-handler" onforminput="result = \'Fired\'" />' +
'<input type="text" id="handler-text" onforminput="resultInputText = \'Delivered\'" />' +
'<input type="number" id="handler-number" onforminput="resultInputNumber = \'Delivered\'" />' +
'<input type="radio" name="handler-radio" id="handler-radio" onforminput="resultInputRadio = \'Delivered\'" />' +
'<input type="checkbox" name="handler-check" id="handler-check" onforminput="resultInputCheckbox = \'Delivered\'" />' +
'<textarea id="handler-textarea" onforminput="resultTextarea = \'Delivered\'"></textarea>' +
'<keygen id="handler-keygen" onforminput="resultKeygen = \'Delivered\'" />' +
'<object id="handler-object" onforminput="resultObject = \'Delivered\'" />' +
'<output id="handler-output" onforminput="resultOutput = \'Delivered\'" />' +
'<select id="handler-select" onforminput="resultSelect = \'Delivered\'" />' +
'<p id="handler-p" onforminput="resultP = \'Delivered\'">Hi!</p>';
document.body.appendChild(form);
function onforminputRemovingInput() {
$('form-removing-input').removeChild($('handler-removing-input'));
resultRemovingInput = 'Delivered';
}
var formRemovingInput = document.createElement('form');
formRemovingInput.setAttribute('id', 'form-removing-input');
formRemovingInput.innerHTML =
'<input type="text" id="input-removing-input" value="Input here." />' +
'<input type="text" id="handler-removing-input" onforminput="onforminputRemovingInput()" />';
document.body.appendChild(formRemovingInput);
function onforminputRemovingForm() {
document.body.removeChild($('form-removing-form'));
resultRemovingForm = 'Delivered';
}
var formRemovingForm = document.createElement('form');
formRemovingForm.setAttribute('id', 'form-removing-form');
formRemovingForm.innerHTML =
'<input type="text" id="input-removing-form" value="Input here." />' +
'<input type="text" id="handler-removing-form" onforminput="onforminputRemovingForm()" />';
document.body.appendChild(formRemovingForm);
var result;
debug('Change for input (type=text)');
result = "Not fired";
$('input-text').focus();
sendText($('input-text'), 'New text.');
$('default-input').focus();
shouldBeEqualToString("result", "Fired");
debug('Change for input (type=number)');
result = "Not fired";
$('input-number').focus();
sendKey($('input-number'), 'Up');
$('default-input').focus();
shouldBeEqualToString("result", "Fired");
debug('Change for input (type=radio)');
result = "Not fired";
$('input-radio2').click();
shouldBeEqualToString("result", "Not fired");
debug('Change for input (type=checkbox)');
result = "Not fired";
$('input-check2').click();
shouldBeEqualToString("result", "Not fired");
debug('Change for textarea');
result = "Not fired";
$('input-textarea').focus();
sendText($('input-textarea'), 'New text.');
$('default-input').focus();
shouldBeEqualToString("result", "Fired");
debug('Change for select');
result = "Not fired";
sendMouseClick($('input-select'));
shouldBeEqualToString("result", "Not fired");
debug('form.dispatchFormInput()');
result = "Not fired";
form.dispatchFormInput();
shouldBeEqualToString("result", "Fired");
debug('');
debug('Is forminput delivered for?');
var resultInputText = "Not delivered";
var resultInputNumber = "Not delivered";
var resultInputRadio = "Not delivered";
var resultInputCheckbox = "Not delivered";
var resultTextarea = "Not delivered";
var resultKeygen = "Not delivered";
var resultObject = "Not delivered";
var resultOutput = "Not delivered";
var resultSelect = "Not delivered";
var resultP = "Not delivered";
$('default-input').focus();
sendText($('default-input'), 'New text.');
$('default-handler').focus();
shouldBeEqualToString("resultInputText", "Delivered");
shouldBeEqualToString("resultInputNumber", "Delivered");
shouldBeEqualToString("resultInputRadio", "Delivered");
shouldBeEqualToString("resultInputCheckbox", "Delivered");
shouldBeEqualToString("resultTextarea", "Delivered");
shouldBeEqualToString("resultKeygen", "Delivered");
shouldBeEqualToString("resultObject", "Not delivered");
shouldBeEqualToString("resultOutput", "Delivered");
shouldBeEqualToString("resultSelect", "Delivered");
shouldBeEqualToString("resultP", "Not delivered");
var resultRemovingInput = "Not delivered";
$('input-removing-input').focus();
sendText($('input-removing-input'), 'New text.');
$('default-handler').focus();
shouldBeEqualToString("resultRemovingInput", "Delivered");
var resultRemovingForm = "Not delivered";
$('input-removing-form').focus();
sendText($('input-removing-form'), 'New text.');
$('default-handler').focus();
shouldBeEqualToString("resultRemovingForm", "Delivered");
document.body.removeChild(form);
debug('');
var successfullyParsed = true;
2011-01-19 Dai Mikurube <dmikurube@google.com>
Reviewed by Kent Tamura.
Implement onformchange and onforminput event handlers
https://bugs.webkit.org/show_bug.cgi?id=26141
Tests: fast/forms/formchange-event.html
fast/forms/forminput-event.html
* bindings/scripts/CodeGeneratorGObject.pm: Added event names.
* dom/Document.h: Added event definitions.
* dom/Document.idl: Added event definitions.
* dom/Element.h: Added event definitions.
* dom/Element.idl: Added event definitions.
* dom/Event.cpp:
(WebCore::Event::fromUserGesture): Added a condition for a formchange event in handling user gestures.
* dom/EventNames.h: Added event definitions.
* dom/InputElement.cpp:
(WebCore::InputElement::setValueFromRenderer): Replaced a direct dispatchEvent() call into dispatchInputEvents(), a virtual function which broadcasts forminput events for HTML elements.
* dom/Node.cpp:
(WebCore::Node::dispatchInputEvents): Defined basic dispatchInputEvents() described above.
(WebCore::Node::dispatchChangeEvents): Defined basic dispatchChangeEvents() described above.
(WebCore::Node::defaultEventHandler): Replaced a direct dispatchEvent() call into dispatchInputEvents().
* dom/Node.h:
* html/FormAssociatedElement.h: Added isResettable() to check the element is resettable or not.
* html/HTMLAttributeNames.in: Added event names.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute): Added event handling.
(WebCore::HTMLElement::shadowAncestorOwnerForm): Added to get an ancestor <form> element from a shadow element.
(WebCore::HTMLElement::dispatchChangeEvents): Defined dispatchChangeEvents() for HTML elements described above.
(WebCore::HTMLElement::dispatchInputEvents): Defined dispatchInputEvents() for HTML elements described above.
* html/HTMLElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent): Added calling dispatchFormChange() to broadcast formchange events.
(WebCore::HTMLFormControlElement::dispatchFormControlInputEvent): Defined newly to dispatch an input event with broadcasting forminput events.
* html/HTMLFormControlElement.h: Added isResettable().
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::broadcastFormEvent): Added to broadcast forminput or formchange events.
(WebCore::HTMLFormElement::dispatchFormInput): Defined newly to broadcast forminput events.
(WebCore::HTMLFormElement::dispatchFormChange): Defined newly to broadcast formchange events.
* html/HTMLFormElement.h:
* html/HTMLFormElement.idl: Added dispatchFormInput() and dispatchFormChange() DOM API definitions.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::stepUpFromRenderer): Replaced a direct dispatchEvent() call into dispatchInputEvents().
* html/HTMLInputElement.h: Added isResettable().
* html/HTMLKeygenElement.h: Added isResettable().
* html/HTMLObjectElement.h: Added isResettable().
* html/HTMLOutputElement.h: Added isResettable().
* html/HTMLSelectElement.h: Added isResettable().
* html/HTMLTextAreaElement.h: Added isResettable().
* page/DOMWindow.h: Added event definitions.
* page/DOMWindow.idl: Added event definitions.
* rendering/TextControlInnerElements.cpp:
(WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Replaced a direct dispatchEvent() call into dispatchInputEvents().
2011-01-19 Andrey Kosyakov <caseq@chromium.org>
 
Reviewed by Pavel Feldman.
......@@ -518,7 +518,7 @@ my @eventSignalNames = (
# User Interface Event types
"focus", "blur",
# Basic Event types
"load", "unload", "abort", "error", "select", "change", "submit", "reset",
"load", "unload", "abort", "error", "select", "change", "formchange", "submit", "reset",
"resize", "scroll",
# Mouse Event types
"click", "dblclick", "mousedown", "mouseup",
......@@ -540,7 +540,7 @@ my @eventSignalNames = (
# Animations
"webkitanimationend", "webkitanimationstart", "webkitanimationiteration",