[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 15:29:45 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e4ef6e2161018c26e25b6badd1929f6694a3cdb9
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 5 00:57:50 2010 +0000

    2010-11-04  Kenichi Ishibashi  <bashi at google.com>
    
            Reviewed by Kent Tamura.
    
            [HTML5][Forms] Support for <output> element
            https://bugs.webkit.org/show_bug.cgi?id=29363
    
            Adds tests for the DOMSettableTokenList and the output element.
    
            * fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt: Added.
            * fast/dom/HTMLOutputElement/dom-settable-token-list.html: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement-expected.txt: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement-reset-event-expected.txt: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement-validity-expected.txt: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement-validity.html: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement-value-expected.txt: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement-value.html: Added.
            * fast/dom/HTMLOutputElement/htmloutputelement.html: Added.
            * fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js: Added.
            (createElement):
            * fast/dom/HTMLOutputElement/script-tests/htmloutputelement-reset-event.js: Added.
            * fast/dom/HTMLOutputElement/script-tests/htmloutputelement-validity.js: Added.
            * fast/dom/HTMLOutputElement/script-tests/htmloutputelement-value.js: Added.
            * fast/dom/Window/window-properties-expected.txt: Updated expectation.
            * fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
            * fast/dom/prototype-inheritance-2-expected.txt: Updated expectation.
            * fast/dom/prototype-inheritance-expected.txt: Updated expectation.
            * fast/js/global-constructors-expected.txt: Updated expectation.
            * platform/chromium/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
            * platform/gtk/fast/dom/Window/window-properties-expected.txt: Updated expectation.
            * platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
            * platform/gtk/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
            * platform/gtk/fast/js/global-constructors-expected.txt: Updated expectation.
            * platform/qt/fast/dom/Window/window-properties-expected.txt: Updated expectation.
            * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
            * platform/qt/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
            * platform/qt/fast/js/global-constructors-expected.txt: Updated expectation.
            * platform/win/fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
            * platform/win/fast/dom/prototype-inheritance-2-expected.txt: Updated expectation.
            * platform/win/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
            * platform/win/fast/js/global-constructors-expected.txt: Updated expectation.
    2010-11-04  Kenichi Ishibashi  <bashi at google.com>
    
            Reviewed by Kent Tamura.
    
            [HTML5][Forms] Support for <output> element
            https://bugs.webkit.org/show_bug.cgi?id=29363
    
            Support for <output> element.
    
            Tests: fast/dom/HTMLOutputElement/dom-settable-token-list.html
                   fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
                   fast/dom/HTMLOutputElement/htmloutputelement-validity.html
                   fast/dom/HTMLOutputElement/htmloutputelement-value.html
                   fast/dom/HTMLOutputElement/htmloutputelement.html
    
            * Android.derived.jscbindings.mk: Added JSHTMLOutputElement.h.
            * Android.derived.v8bindings.mk: Added V8HTMLOutputElement.h.
            * Android.jscbindings.mk: Added JSHTMLOutputElementCustom.cpp.
            * Android.mk: Added HTMLOutputElement.cpp.
            * Android.v8bindings.mk: Added V8HTMLOutputElementCustom.cpp.
            * CMakeLists.txt: Added HTMLOutputElement.{idl,cpp} and JSHTMLOutputElementCustom.cpp.
            * DerivedSources.cpp: Added JSHTMLOutputElement.cpp.
            * DerivedSources.make: Added HTMLOutputElement entry.
            * GNUmakefile.am: Added JSHTMLOutputElement.{cpp,h}
            * WebCore.gypi: Added HTMLOutputElement.{idl,cpp,h}, JSHTMLOutputElementCustom.cpp and V8HTMLOutputElementCustom.cpp
            * WebCore.pri: Added HTMLOutputElement.idl.
            * WebCore.pro: Added V8HTMLOutputElementCustom.cpp, JSHTMLOutputElementCustom.cpp and HTMLOutputElement.cpp.
            * WebCore.vcproj/WebCore.vcproj: Added entries for JSHTMLOutputElement.{cpp,h} and JSHTMLOutputElementCustom.cpp.
            * WebCore.xcodeproj/project.pbxproj: Added entries for JSHTMLOutputElementCustom.cpp, HTMLOutputElement.{cpp,h,idl}, JSHTMLOutputElement.{cpp,h}
            * bindings/js/JSBindingsAllInOne.cpp: Added JSHTMLOutputElementCustom.cpp.
            * bindings/js/JSHTMLOutputElementCustom.cpp: Added.
            (WebCore::JSHTMLOutputElement::htmlFor):
            (WebCore::JSHTMLOutputElement::setHtmlFor):
            * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Modified.
            (WebCore::V8DOMSettableTokenList::indexedPropertyGetter): Returns null if the index is out of range.
            * bindings/v8/custom/V8HTMLOutputElementCustom.cpp: Added.
            (WebCore::V8HTMLOutputElement::htmlForAccessorGetter):
            (WebCore::V8HTMLOutputElement::htmlForAccessorSetter):
            * css/html.css: Added a default style of output element.
            (output):
            * html/DOMSettableTokenList.cpp: Fix bugs.
            (WebCore::DOMSettableTokenList::item): Returns null string if the index is out of range.
            (WebCore::DOMSettableTokenList::addInternal): Added check m_tokens.isNull().
            (WebCore::DOMSettableTokenList::setValue): Set the value case sensitive.
            * html/HTMLOutputElement.cpp: Added.
            (WebCore::HTMLOutputElement::HTMLOutputElement):
            (WebCore::HTMLOutputElement::create):
            (WebCore::HTMLOutputElement::formControlType):
            (WebCore::HTMLOutputElement::parseMappedAttribute):
            (WebCore::HTMLOutputElement::htmlFor):
            (WebCore::HTMLOutputElement::setFor):
            (WebCore::HTMLOutputElement::setForm):
            (WebCore::HTMLOutputElement::childrenChanged):
            (WebCore::HTMLOutputElement::reset):
            (WebCore::HTMLOutputElement::value):
            (WebCore::HTMLOutputElement::setValue):
            (WebCore::HTMLOutputElement::defaultValue):
            (WebCore::HTMLOutputElement::setDefaultValue):
            (WebCore::HTMLOutputElement::setTextContentInternal):
            * html/HTMLOutputElement.h: Added.
            (WebCore::HTMLOutputElement::isEnumeratable):
            (WebCore::HTMLOutputElement::willValidate):
            * html/HTMLOutputElement.idl: Added.
            * html/HTMLTagNames.in: Added "output".
            * page/DOMWindow.idl: Added an attribute for HTMLOutputElement.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71373 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5f88637..c3b1ebc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,46 @@
+2010-11-04  Kenichi Ishibashi  <bashi at google.com>
+
+        Reviewed by Kent Tamura.
+
+        [HTML5][Forms] Support for <output> element
+        https://bugs.webkit.org/show_bug.cgi?id=29363
+
+        Adds tests for the DOMSettableTokenList and the output element.
+
+        * fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt: Added.
+        * fast/dom/HTMLOutputElement/dom-settable-token-list.html: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement-expected.txt: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement-reset-event-expected.txt: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement-validity-expected.txt: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement-validity.html: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement-value-expected.txt: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement-value.html: Added.
+        * fast/dom/HTMLOutputElement/htmloutputelement.html: Added.
+        * fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js: Added.
+        (createElement):
+        * fast/dom/HTMLOutputElement/script-tests/htmloutputelement-reset-event.js: Added.
+        * fast/dom/HTMLOutputElement/script-tests/htmloutputelement-validity.js: Added.
+        * fast/dom/HTMLOutputElement/script-tests/htmloutputelement-value.js: Added.
+        * fast/dom/Window/window-properties-expected.txt: Updated expectation.
+        * fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
+        * fast/dom/prototype-inheritance-2-expected.txt: Updated expectation.
+        * fast/dom/prototype-inheritance-expected.txt: Updated expectation.
+        * fast/js/global-constructors-expected.txt: Updated expectation.
+        * platform/chromium/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
+        * platform/gtk/fast/dom/Window/window-properties-expected.txt: Updated expectation.
+        * platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
+        * platform/gtk/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
+        * platform/gtk/fast/js/global-constructors-expected.txt: Updated expectation.
+        * platform/qt/fast/dom/Window/window-properties-expected.txt: Updated expectation.
+        * platform/qt/fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
+        * platform/qt/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
+        * platform/qt/fast/js/global-constructors-expected.txt: Updated expectation.
+        * platform/win/fast/dom/Window/window-property-descriptors-expected.txt: Updated expectation.
+        * platform/win/fast/dom/prototype-inheritance-2-expected.txt: Updated expectation.
+        * platform/win/fast/dom/prototype-inheritance-expected.txt: Updated expectation.
+        * platform/win/fast/js/global-constructors-expected.txt: Updated expectation.
+
 2010-11-04  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt b/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt
new file mode 100644
index 0000000..6dac7fd
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list-expected.txt
@@ -0,0 +1,75 @@
+Tests the htmlFor attribute and its properties.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+- Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/
+PASS String(element.htmlFor) is "y"
+PASS element.htmlFor.length is 0
+PASS element.htmlFor.length is 1
+PASS element.htmlFor.length is 2
+PASS element.htmlFor.length is 2
+PASS element.htmlFor.toString() is "x"
+PASS element.htmlFor.toString() is "x"
+PASS element.htmlFor.toString() is "x  x"
+PASS element.htmlFor.toString() is "y x"
+PASS element.htmlFor.toString() is ""
+PASS element.htmlFor.toString() is ""
+PASS element.htmlFor.toString() is " y y "
+PASS element.htmlFor.toString() is "y"
+- Ensure that we can handle empty form attribute correctly
+PASS list.value is "x"
+PASS list.value is ""
+PASS element.htmlFor.contains('x') is false
+PASS element.htmlFor[1] is null
+PASS element.htmlFor.contains('x') is true
+PASS element.htmlFor[1] is null
+- Testing add in presence of trailing white spaces.
+PASS element.htmlFor.toString() is "x y"
+PASS element.htmlFor.toString() is "x	 y"
+PASS element.htmlFor.toString() is " y"
+- Test invalid tokens
+PASS element.htmlFor.contains('') threw expected DOMException with code 12
+PASS element.htmlFor.contains('x y') threw expected DOMException with code 5
+PASS element.htmlFor.add('') threw expected DOMException with code 12
+PASS element.htmlFor.add('x y') threw expected DOMException with code 5
+PASS element.htmlFor.remove('') threw expected DOMException with code 12
+PASS element.htmlFor.remove('x y') threw expected DOMException with code 5
+PASS element.htmlFor.toggle('') threw expected DOMException with code 12
+PASS element.htmlFor.toggle('x y') threw expected DOMException with code 5
+- Indexing
+PASS element.htmlFor[0] is "x"
+PASS element.htmlFor.item(0) is "x"
+PASS element.htmlFor[1] is "x"
+PASS element.htmlFor.item(1) is "x"
+PASS element.htmlFor[1] is "y"
+PASS element.htmlFor.item(1) is "y"
+PASS element.htmlFor[0] is null
+PASS element.htmlFor.item(0) is null
+PASS element.htmlFor[4] is null
+PASS element.htmlFor.item(4) is null
+PASS element.htmlFor[-1] is undefined.
+PASS element.htmlFor.item(-1) is null
+- Test case since DOMTokenList is case sensitive
+PASS element.htmlFor.contains('x') is true
+PASS element.htmlFor.contains('X') is false
+PASS element.htmlFor[0] is "x"
+PASS element.htmlFor.contains('X') is true
+PASS element.htmlFor.contains('x') is false
+PASS element.htmlFor[0] is "X"
+- Testing whitespace
+PASS element.htmlFor.length is 2
+PASS element.htmlFor.length is 2
+PASS element.htmlFor.length is 2
+PASS element.htmlFor.length is 2
+PASS element.htmlFor.length is 2
+- DOMSettableTokenList presence and type
+PASS 'undefined' != typeof DOMSettableTokenList is true
+PASS typeof DOMSettableTokenList.prototype is "object"
+PASS typeof element.htmlFor is "object"
+PASS element.htmlFor.constructor is DOMSettableTokenList
+PASS element.htmlFor === element.htmlFor is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list.html b/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list.html
new file mode 100644
index 0000000..5f25407
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/dom-settable-token-list.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/dom-settable-token-list.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-expected.txt b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-expected.txt
new file mode 100644
index 0000000..48b85dc
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-expected.txt
@@ -0,0 +1,19 @@
+Tests for content attributes of the output element.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS output1.type is "output"
+PASS output1.name is "output1"
+PASS output1.value is "A value"
+PASS output2.htmlFor.length is 1
+PASS output2.htmlFor[0] is "for-target1"
+PASS output2.htmlFor.value is "for-target1"
+PASS output3.htmlFor.length is 2
+PASS output3.htmlFor[0] is "for-target1"
+PASS output3.htmlFor[1] is "for-target2"
+PASS output3.htmlFor.value is " for-target1 for-target2 "
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ A value  
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event-expected.txt b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event-expected.txt
new file mode 100644
index 0000000..f79e999
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event-expected.txt
@@ -0,0 +1,24 @@
+A Test for sending a reset event to output elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+- Sets the value attribute of the output element.
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "aValue"
+PASS output.innerText is "aValue"
+PASS output.innerHTML is "aValue"
+- Sends a reset event to reset the value to the default value.
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "defaultValue"
+PASS output.innerText is "defaultValue"
+PASS output.innerHTML is "defaultValue"
+- Ensures that the value mode flags is in mode "default".
+PASS output.defaultValue is "another defaultValue"
+PASS output.value is "another defaultValue"
+PASS output.innerText is "another defaultValue"
+PASS output.innerHTML is "another defaultValue"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
new file mode 100644
index 0000000..2313f06
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/htmloutputelement-reset-event.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity-expected.txt b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity-expected.txt
new file mode 100644
index 0000000..22b1958
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity-expected.txt
@@ -0,0 +1,18 @@
+Tests for the validation APIs of output elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+- Ensures whether the willValidate is defined and it always returns false.
+PASS typeof output.willValidate is "boolean"
+PASS output.willValidate is false
+PASS output.willValidate is false
+- Ensures validity is always "valid" and validationMessage() always returns an empty string.
+PASS output.validationMessage is ""
+PASS output.checkValidity() is true
+PASS output.validationMessage is ""
+PASS output.checkValidity() is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+aValue
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html
new file mode 100644
index 0000000..6e142fc
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-validity.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/htmloutputelement-validity.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value-expected.txt b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value-expected.txt
new file mode 100644
index 0000000..74623e4
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value-expected.txt
@@ -0,0 +1,80 @@
+Tests for assigning the value attribute to output elements.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+- Sets the defaultValue attribute with the value mode flag is in mode "defalut".
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "defaultValue"
+PASS output.innerText is "defaultValue"
+PASS output.innerHTML is "defaultValue"
+- Sets the value attribute. This will change the value mode flag from "default" to "value".
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "aValue"
+PASS output.innerText is "aValue"
+PASS output.innerHTML is "aValue"
+- Sets the defaultValue attribute with the value mode flag is in mode "value".
+PASS output.defaultValue is "another defaultValue"
+PASS output.value is "aValue"
+PASS output.innerText is "aValue"
+PASS output.innerHTML is "aValue"
+- Ensures that setting text to the value attribute works as setTextContent().
+PASS output.value is '<strong>A <span style="color: red;">strong</span> text</strong>'
+PASS output.innerText is '<strong>A <span style="color: red;">strong</span> text</strong>'
+PASS output.innerHTML is '&lt;strong&gt;A &lt;span style="color: red;"&gt;strong&lt;/span&gt; text&lt;/strong&gt;'
+- Sets the innerText attribute with the value mode flag is in mode "default".
+PASS output.defaultValue is "text"
+PASS output.value is "text"
+PASS output.innerText is "text"
+PASS output.innerHTML is "text"
+PASS output.defaultValue is "<strong>strong</strong> text"
+PASS output.value is "<strong>strong</strong> text"
+PASS output.innerText is "<strong>strong</strong> text"
+PASS output.innerHTML is "&lt;strong&gt;strong&lt;/strong&gt; text"
+- Sets the innerText attribute with the value mode flag is in mode "value".
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "text"
+PASS output.innerText is "text"
+PASS output.innerHTML is "text"
+- Sets the innerHTML attribute with the value mode flag is in mode "default".
+PASS output.defaultValue is "text"
+PASS output.value is "text"
+PASS output.innerText is "text"
+PASS output.innerHTML is "text"
+PASS output.defaultValue is "strong text"
+PASS output.value is "strong text"
+PASS output.innerText is "strong text"
+PASS output.innerHTML is "<strong>strong</strong> text"
+- Sets the innerHTML attribute with the value mode flag is in mode "value".
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "text"
+PASS output.innerText is "text"
+PASS output.innerHTML is "text"
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "strong text"
+PASS output.innerText is "strong text"
+PASS output.innerHTML is "<strong>strong</strong> text"
+- Appends a child node to the output element with the value mode flag is in mode "default".
+PASS output.defaultValue is "childText"
+PASS output.value is "childText"
+PASS output.innerText is "childText"
+PASS output.innerHTML is "<span>childText</span>"
+- Then removes the child node from the output element with the value mode flag is in mode "default".
+PASS output.defaultValue is ""
+PASS output.value is ""
+PASS output.innerText is ""
+PASS output.innerHTML is ""
+- Appends a child node to the output element with the value mode flag is in mode "value".
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "aValue and childText"
+PASS output.innerText is "aValue and childText"
+PASS output.innerHTML is "aValue<span> and childText</span>"
+- Then removes the child node from the output element with the value mode flag is in mode "default".
+PASS output.defaultValue is "defaultValue"
+PASS output.value is "aValue"
+PASS output.innerText is "aValue"
+PASS output.innerHTML is "aValue"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value.html b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value.html
new file mode 100644
index 0000000..0944bc1
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement-value.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/htmloutputelement-value.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement.html b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement.html
new file mode 100644
index 0000000..25825a0
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/htmloutputelement.html
@@ -0,0 +1,40 @@
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<span id="for-target1"></span>
+<span id="for-target2"></span>
+<output id="output1" name="output1">A value</output>
+<output id="output2" for="for-target1"></output>
+<output id="output3" for=" for-target1 for-target2 "></output>
+
+<script>
+description('Tests for content attributes of the output element.');
+
+var output1 = document.getElementById('output1');
+var output2 = document.getElementById('output2');
+var output3 = document.getElementById('output3');
+
+shouldBeEqualToString('output1.type', 'output');
+shouldBeEqualToString('output1.name', 'output1');
+shouldBeEqualToString('output1.value', 'A value');
+
+shouldEvaluateTo('output2.htmlFor.length', 1);
+shouldBeEqualToString('output2.htmlFor[0]', 'for-target1');
+shouldBeEqualToString('output2.htmlFor.value', 'for-target1');
+
+shouldEvaluateTo('output3.htmlFor.length', 2);
+shouldBeEqualToString('output3.htmlFor[0]', 'for-target1');
+shouldBeEqualToString('output3.htmlFor[1]', 'for-target2');
+shouldBeEqualToString('output3.htmlFor.value', ' for-target1 for-target2 ');
+
+var successfullyParsed = true;
+</script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js
new file mode 100644
index 0000000..bbce089
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/dom-settable-token-list.js
@@ -0,0 +1,254 @@
+// This test mostly comes from fast/dom/HTMLElement/script-tests/class-list.js
+description('Tests the htmlFor attribute and its properties.');
+
+var container = document.createElement('div');
+document.body.appendChild(container);
+
+var element;
+
+function createElement(tokenList)
+{
+    container.innerHTML = '<output for="' + tokenList + '"></output>';
+    element = container.lastChild;
+}
+
+debug('- Tests from http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/');
+
+// Setting a value to a DOMSettableTokenList should be forwared to the 'value' attribute.
+createElement('x');
+element.htmlFor = 'y';
+shouldBeEqualToString('String(element.htmlFor)', 'y');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/001.htm
+createElement('');
+shouldEvaluateTo('element.htmlFor.length', 0);
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/002.htm
+createElement('x');
+shouldEvaluateTo('element.htmlFor.length', 1);
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/003.htm
+createElement('x x');
+shouldEvaluateTo('element.htmlFor.length', 2);
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/004.htm
+createElement('x y');
+shouldEvaluateTo('element.htmlFor.length', 2);
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/005.htm
+createElement('');
+element.htmlFor.add('x');
+shouldBeEqualToString('element.htmlFor.toString()', 'x');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/006.htm
+createElement('x');
+element.htmlFor.add('x');
+shouldBeEqualToString('element.htmlFor.toString()', 'x');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/007.htm
+createElement('x  x');
+element.htmlFor.add('x');
+shouldBeEqualToString('element.htmlFor.toString()', 'x  x');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/008.htm
+createElement('y');
+element.htmlFor.add('x');
+shouldBeEqualToString('element.htmlFor.toString()', 'y x');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/009.htm
+createElement('');
+element.htmlFor.remove('x');
+shouldBeEqualToString('element.htmlFor.toString()', '');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/010.htm
+createElement('x');
+element.htmlFor.remove('x');
+shouldBeEqualToString('element.htmlFor.toString()', '');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/011.htm
+createElement(' y x  y ');
+element.htmlFor.remove('x');
+shouldBeEqualToString('element.htmlFor.toString()', ' y y ');
+
+// http://simon.html5.org/test/html/dom/reflecting/DOMTokenList/getting/012.htm
+createElement(' x y  x ');
+element.htmlFor.remove('x');
+shouldBeEqualToString('element.htmlFor.toString()', 'y');
+
+
+debug('- Ensure that we can handle empty form attribute correctly');
+element = document.createElement('output');
+var list = element.htmlFor;
+list.toggle('x');
+shouldBeEqualToString('list.value', 'x');
+
+list.toggle('x');
+shouldBeEqualToString('list.value', '');
+
+element = document.createElement('output');
+shouldBeFalse('element.htmlFor.contains(\'x\')');
+shouldBeNull('element.htmlFor[1]');
+element.htmlFor.remove('x');
+element.htmlFor.add('x')
+shouldBeTrue('element.htmlFor.contains(\'x\')');
+shouldBeNull('element.htmlFor[1]');
+
+debug('- Testing add in presence of trailing white spaces.');
+
+createElement('x ');
+element.htmlFor.add('y');
+shouldBeEqualToString('element.htmlFor.toString()', 'x y');
+
+createElement('x\t');
+element.htmlFor.add('y');
+shouldBeEqualToString('element.htmlFor.toString()', 'x\t y');
+
+createElement(' ');
+element.htmlFor.add('y');
+shouldBeEqualToString('element.htmlFor.toString()', ' y');
+
+
+debug('- Test invalid tokens');
+
+// Testing exception due to invalid token
+
+// shouldThrow from js-test-pre.js is not sufficient.
+function shouldThrowDOMException(f, ec)
+{
+    try {
+        f();
+        testFailed('Expected an exception');
+    } catch (ex) {
+        if (!(ex instanceof DOMException)) {
+            testFailed('Exception is not an instance of DOMException, found: ' +
+                       Object.toString.call(ex));
+            return;
+        }
+        if (ec !== ex.code) {
+            testFailed('Wrong exception code: ' + ex.code);
+            return;
+        }
+    }
+    var formattedFunction = String(f).replace(/^function.+\{\s*/m, '').
+        replace(/;?\s+\}/m, '');
+    testPassed(formattedFunction + ' threw expected DOMException with code ' + ec);
+}
+
+createElement('x');
+shouldThrowDOMException(function() {
+    element.htmlFor.contains('');
+}, DOMException.SYNTAX_ERR);
+
+createElement('x y');
+shouldThrowDOMException(function() {
+    element.htmlFor.contains('x y');
+}, DOMException.INVALID_CHARACTER_ERR);
+
+createElement('');
+shouldThrowDOMException(function() {
+    element.htmlFor.add('');
+}, DOMException.SYNTAX_ERR);
+
+createElement('');
+shouldThrowDOMException(function() {
+    element.htmlFor.add('x y');
+}, DOMException.INVALID_CHARACTER_ERR);
+
+createElement('');
+shouldThrowDOMException(function() {
+    element.htmlFor.remove('');
+}, DOMException.SYNTAX_ERR);
+
+createElement('');
+shouldThrowDOMException(function() {
+    element.htmlFor.remove('x y');
+}, DOMException.INVALID_CHARACTER_ERR);
+
+createElement('');
+shouldThrowDOMException(function() {
+    element.htmlFor.toggle('');
+}, DOMException.SYNTAX_ERR);
+
+createElement('x y');
+shouldThrowDOMException(function() {
+    element.htmlFor.toggle('x y');
+}, DOMException.INVALID_CHARACTER_ERR);
+
+
+debug('- Indexing');
+
+createElement('x');
+shouldBeEqualToString('element.htmlFor[0]', 'x');
+shouldBeEqualToString('element.htmlFor.item(0)', 'x');
+
+createElement('x x');
+shouldBeEqualToString('element.htmlFor[1]', 'x');
+shouldBeEqualToString('element.htmlFor.item(1)', 'x');
+
+createElement('x y');
+shouldBeEqualToString('element.htmlFor[1]', 'y');
+shouldBeEqualToString('element.htmlFor.item(1)', 'y');
+
+createElement('');
+shouldBeNull('element.htmlFor[0]');
+shouldBeNull('element.htmlFor.item(0)');
+
+createElement('x y z');
+shouldBeNull('element.htmlFor[4]');
+shouldBeNull('element.htmlFor.item(4)');
+shouldBeUndefined('element.htmlFor[-1]');  // Not a valid index so should not trigger item().
+shouldBeNull('element.htmlFor.item(-1)');
+
+debug('- Test case since DOMTokenList is case sensitive');
+
+createElement('x');
+shouldBeTrue('element.htmlFor.contains(\'x\')');
+shouldBeFalse('element.htmlFor.contains(\'X\')');
+shouldBeEqualToString('element.htmlFor[0]', 'x');
+
+createElement('X');
+shouldBeTrue('element.htmlFor.contains(\'X\')');
+shouldBeFalse('element.htmlFor.contains(\'x\')');
+shouldBeEqualToString('element.htmlFor[0]', 'X');
+
+
+debug('- Testing whitespace');
+// U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED (LF),
+// U+000C FORM FEED (FF), and U+000D CARRIAGE RETURN (CR)
+
+createElement('x\u0020y');
+shouldEvaluateTo('element.htmlFor.length', 2);
+
+createElement('x\u0009y');
+shouldEvaluateTo('element.htmlFor.length', 2);
+
+createElement('x\u000Ay');
+shouldEvaluateTo('element.htmlFor.length', 2);
+
+createElement('x\u000Cy');
+shouldEvaluateTo('element.htmlFor.length', 2);
+
+createElement('x\u000Dy');
+shouldEvaluateTo('element.htmlFor.length', 2);
+
+
+debug('- DOMSettableTokenList presence and type');
+
+
+// Safari returns object
+// Firefox returns object
+// IE8 returns object
+// Chrome returns function
+// assertEquals('object', typeof DOMSettableTokenList);
+shouldBeTrue('\'undefined\' != typeof DOMSettableTokenList');
+
+shouldBeEqualToString('typeof DOMSettableTokenList.prototype', 'object');
+
+createElement('x');
+shouldBeEqualToString('typeof element.htmlFor', 'object');
+
+shouldEvaluateTo('element.htmlFor.constructor', 'DOMSettableTokenList');
+
+shouldBeTrue('element.htmlFor === element.htmlFor');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-reset-event.js b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-reset-event.js
new file mode 100644
index 0000000..5232322
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-reset-event.js
@@ -0,0 +1,29 @@
+description('A Test for sending a reset event to output elements.');
+
+var form = document.createElement('form');
+var output = document.createElement('output');
+output.defaultValue = 'defaultValue';
+form.appendChild(output);
+
+debug('- Sets the value attribute of the output element.');
+output.value = 'aValue';
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'aValue');
+shouldBeEqualToString('output.innerText', 'aValue');
+shouldBeEqualToString('output.innerHTML', 'aValue');
+
+debug('- Sends a reset event to reset the value to the default value.');
+form.reset();
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'defaultValue');
+shouldBeEqualToString('output.innerText', 'defaultValue');
+shouldBeEqualToString('output.innerHTML', 'defaultValue');
+
+debug('- Ensures that the value mode flags is in mode "default".');
+output.defaultValue = 'another defaultValue';
+shouldBeEqualToString('output.defaultValue', 'another defaultValue');
+shouldBeEqualToString('output.value', 'another defaultValue');
+shouldBeEqualToString('output.innerText', 'another defaultValue');
+shouldBeEqualToString('output.innerHTML', 'another defaultValue');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-validity.js b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-validity.js
new file mode 100644
index 0000000..6aed389
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-validity.js
@@ -0,0 +1,27 @@
+description('Tests for the validation APIs of output elements.');
+
+var container;
+var output;
+
+container = document.createElement('div');
+document.body.appendChild(container);
+
+debug('- Ensures whether the willValidate is defined and it always returns false.');
+container.innerHTML = '<form><output id="outputElement">aValue</output></form>';
+output = document.getElementById('outputElement');
+shouldBe('typeof output.willValidate', '"boolean"');
+shouldBeFalse('output.willValidate');
+container.innerHTML = '<output id="outputElement">aValue</output>';
+output = document.getElementById('outputElement');
+shouldBeFalse('output.willValidate');
+
+debug('- Ensures validity is always "valid" and validationMessage() always returns an empty string.');
+container.innerHTML = '<form><output id="outputElement">aValue</output></form>';
+output = document.getElementById('outputElement');
+shouldBeEqualToString('output.validationMessage', '');
+shouldBeTrue('output.checkValidity()');
+output.setCustomValidity('This should not be affected.');
+shouldBeEqualToString('output.validationMessage', '');
+shouldBeTrue('output.checkValidity()');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-value.js b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-value.js
new file mode 100644
index 0000000..ba429ff
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLOutputElement/script-tests/htmloutputelement-value.js
@@ -0,0 +1,123 @@
+description('Tests for assigning the value attribute to output elements.');
+
+var output;
+var childNode;
+
+debug('- Sets the defaultValue attribute with the value mode flag is in mode "defalut".');
+output = document.createElement('output');
+output.defaultValue = "defaultValue";
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'defaultValue');
+shouldBeEqualToString('output.innerText', 'defaultValue');
+shouldBeEqualToString('output.innerHTML', 'defaultValue');
+
+debug('- Sets the value attribute. This will change the value mode flag from "default" to "value".');
+
+output.value = 'aValue';
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'aValue');
+shouldBeEqualToString('output.innerText', 'aValue');
+shouldBeEqualToString('output.innerHTML', 'aValue');
+
+debug('- Sets the defaultValue attribute with the value mode flag is in mode "value".');
+output.defaultValue = 'another defaultValue';
+shouldBeEqualToString('output.defaultValue', 'another defaultValue');
+shouldBeEqualToString('output.value', 'aValue');
+shouldBeEqualToString('output.innerText', 'aValue');
+shouldBeEqualToString('output.innerHTML', 'aValue');
+
+debug('- Ensures that setting text to the value attribute works as setTextContent().');
+output.value = '<strong>A <span style=\"color: red;\">strong</span> text</strong>';
+shouldBe('output.value', '\'<strong>A <span style="color: red;">strong</span> text</strong>\'');
+shouldBe('output.innerText', '\'<strong>A <span style="color: red;">strong</span> text</strong>\'');
+shouldBe('output.innerHTML', '\'&lt;strong&gt;A &lt;span style="color: red;"&gt;strong&lt;/span&gt; text&lt;/strong&gt;\'');
+
+debug('- Sets the innerText attribute with the value mode flag is in mode "default".');
+output = document.createElement('output');
+output.innerText = 'text';
+shouldBeEqualToString('output.defaultValue', 'text');
+shouldBeEqualToString('output.value', 'text');
+shouldBeEqualToString('output.innerText', 'text');
+shouldBeEqualToString('output.innerHTML', 'text');
+
+output.innerText = '<strong>strong</strong> text';
+shouldBeEqualToString('output.defaultValue', '<strong>strong</strong> text');
+shouldBeEqualToString('output.value', '<strong>strong</strong> text');
+shouldBeEqualToString('output.innerText', '<strong>strong</strong> text');
+shouldBeEqualToString('output.innerHTML', '&lt;strong&gt;strong&lt;/strong&gt; text');
+
+debug('- Sets the innerText attribute with the value mode flag is in mode "value".');
+output = document.createElement('output');
+output.value = 'aValue';
+output.defaultValue = 'defaultValue';
+output.innerText = 'text';
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'text');
+shouldBeEqualToString('output.innerText', 'text');
+shouldBeEqualToString('output.innerHTML', 'text');
+
+debug('- Sets the innerHTML attribute with the value mode flag is in mode "default".');
+output = document.createElement('output');
+output.innerHTML = 'text';
+shouldBeEqualToString('output.defaultValue', 'text');
+shouldBeEqualToString('output.value', 'text');
+shouldBeEqualToString('output.innerText', 'text');
+shouldBeEqualToString('output.innerHTML', 'text');
+
+output.innerHTML = '<strong>strong</strong> text';
+shouldBeEqualToString('output.defaultValue', 'strong text');
+shouldBeEqualToString('output.value', 'strong text');
+shouldBeEqualToString('output.innerText', 'strong text');
+shouldBeEqualToString('output.innerHTML', '<strong>strong</strong> text');
+
+debug('- Sets the innerHTML attribute with the value mode flag is in mode "value".');
+output = document.createElement('output');
+output.value = 'aValue';
+output.defaultValue = 'defaultValue';
+output.innerHTML = 'text';
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'text');
+shouldBeEqualToString('output.innerText', 'text');
+shouldBeEqualToString('output.innerHTML', 'text');
+
+output.innerHTML = '<strong>strong</strong> text';
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'strong text');
+shouldBeEqualToString('output.innerText', 'strong text');
+shouldBeEqualToString('output.innerHTML', '<strong>strong</strong> text');
+
+debug('- Appends a child node to the output element with the value mode flag is in mode "default".');
+output = document.createElement('output');
+childNode = document.createElement('span');
+childNode.innerText = 'childText';
+output.appendChild(childNode);
+shouldBeEqualToString('output.defaultValue', 'childText');
+shouldBeEqualToString('output.value', 'childText');
+shouldBeEqualToString('output.innerText', 'childText');
+shouldBeEqualToString('output.innerHTML', '<span>childText</span>');
+debug('- Then removes the child node from the output element with the value mode flag is in mode "default".');
+output.removeChild(childNode);
+shouldBeEqualToString('output.defaultValue', '');
+shouldBeEqualToString('output.value', '');
+shouldBeEqualToString('output.innerText', '');
+shouldBeEqualToString('output.innerHTML', '');
+
+debug('- Appends a child node to the output element with the value mode flag is in mode "value".');
+output = document.createElement('output');
+output.value = 'aValue';
+output.defaultValue = 'defaultValue';
+childNode = document.createElement('span');
+childNode.innerText = ' and childText';
+output.appendChild(childNode);
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'aValue and childText');
+shouldBeEqualToString('output.innerText', 'aValue and childText');
+shouldBeEqualToString('output.innerHTML', 'aValue<span> and childText</span>');
+debug('- Then removes the child node from the output element with the value mode flag is in mode "default".');
+output.removeChild(childNode);
+shouldBeEqualToString('output.defaultValue', 'defaultValue');
+shouldBeEqualToString('output.value', 'aValue');
+shouldBeEqualToString('output.innerText', 'aValue');
+shouldBeEqualToString('output.innerHTML', 'aValue');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/fast/dom/Window/window-properties-expected.txt b/LayoutTests/fast/dom/Window/window-properties-expected.txt
index 605a3b8..afbf456 100644
--- a/LayoutTests/fast/dom/Window/window-properties-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-properties-expected.txt
@@ -1058,6 +1058,8 @@ window.HTMLOptGroupElement [object HTMLOptGroupElementConstructor]
 window.HTMLOptGroupElement.prototype [printed above as window.Element.prototype]
 window.HTMLOptionElement [object HTMLOptionElementConstructor]
 window.HTMLOptionElement.prototype [printed above as window.Element.prototype]
+window.HTMLOutputElement [object HTMLOutputElementConstructor]
+window.HTMLOutputElement.prototype [printed above as window.Element.prototype]
 window.HTMLParagraphElement [object HTMLParagraphElementConstructor]
 window.HTMLParagraphElement.prototype [printed above as window.Element.prototype]
 window.HTMLParamElement [object HTMLParamElementConstructor]
diff --git a/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt b/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
index 8ad9a79..dc0c698 100644
--- a/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
+++ b/LayoutTests/fast/dom/Window/window-property-descriptors-expected.txt
@@ -105,6 +105,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOListElement') is 'obje
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLObjectElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptGroupElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptionElement') is 'object'
+PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOutputElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParagraphElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParamElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLPreElement') is 'object'
diff --git a/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt b/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
index 6d86608..17bdcf0 100644
--- a/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
+++ b/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
@@ -269,6 +269,7 @@ Never found HTMLOListElement
 Never found HTMLObjectElement
 Never found HTMLOptGroupElement
 Never found HTMLOptionElement
+Never found HTMLOutputElement
 Never found HTMLParagraphElement
 Never found HTMLParamElement
 Never found HTMLPreElement
diff --git a/LayoutTests/fast/dom/prototype-inheritance-expected.txt b/LayoutTests/fast/dom/prototype-inheritance-expected.txt
index 53c4339..9bc7039 100644
--- a/LayoutTests/fast/dom/prototype-inheritance-expected.txt
+++ b/LayoutTests/fast/dom/prototype-inheritance-expected.txt
@@ -207,6 +207,8 @@ PASS inner.HTMLOptGroupElement.isInner is true
 PASS inner.HTMLOptGroupElement.constructor.isInner is true
 PASS inner.HTMLOptionElement.isInner is true
 PASS inner.HTMLOptionElement.constructor.isInner is true
+PASS inner.HTMLOutputElement.isInner is true
+PASS inner.HTMLOutputElement.constructor.isInner is true
 PASS inner.HTMLParagraphElement.isInner is true
 PASS inner.HTMLParagraphElement.constructor.isInner is true
 PASS inner.HTMLParamElement.isInner is true
diff --git a/LayoutTests/fast/js/global-constructors-expected.txt b/LayoutTests/fast/js/global-constructors-expected.txt
index 73713be..c25f918 100644
--- a/LayoutTests/fast/js/global-constructors-expected.txt
+++ b/LayoutTests/fast/js/global-constructors-expected.txt
@@ -99,6 +99,7 @@ PASS HTMLOListElement.toString() is '[object HTMLOListElementConstructor]'
 PASS HTMLObjectElement.toString() is '[object HTMLObjectElementConstructor]'
 PASS HTMLOptGroupElement.toString() is '[object HTMLOptGroupElementConstructor]'
 PASS HTMLOptionElement.toString() is '[object HTMLOptionElementConstructor]'
+PASS HTMLOutputElement.toString() is '[object HTMLOutputElementConstructor]'
 PASS HTMLParagraphElement.toString() is '[object HTMLParagraphElementConstructor]'
 PASS HTMLParamElement.toString() is '[object HTMLParamElementConstructor]'
 PASS HTMLPreElement.toString() is '[object HTMLPreElementConstructor]'
diff --git a/LayoutTests/platform/chromium/fast/dom/prototype-inheritance-expected.txt b/LayoutTests/platform/chromium/fast/dom/prototype-inheritance-expected.txt
index 0fcd5e0..4adf776 100644
--- a/LayoutTests/platform/chromium/fast/dom/prototype-inheritance-expected.txt
+++ b/LayoutTests/platform/chromium/fast/dom/prototype-inheritance-expected.txt
@@ -205,6 +205,8 @@ PASS inner.HTMLOptGroupElement.isInner is true
 PASS inner.HTMLOptGroupElement.constructor.isInner is true
 PASS inner.HTMLOptionElement.isInner is true
 PASS inner.HTMLOptionElement.constructor.isInner is true
+PASS inner.HTMLOutputElement.isInner is true
+PASS inner.HTMLOutputElement.constructor.isInner is true
 PASS inner.HTMLParagraphElement.isInner is true
 PASS inner.HTMLParagraphElement.constructor.isInner is true
 PASS inner.HTMLParamElement.isInner is true
diff --git a/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt b/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt
index 5c9f5a0..2beaffe 100644
--- a/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt
+++ b/LayoutTests/platform/gtk/fast/dom/Window/window-properties-expected.txt
@@ -1042,6 +1042,8 @@ window.HTMLOptGroupElement [object HTMLOptGroupElementConstructor]
 window.HTMLOptGroupElement.prototype [printed above as window.Element.prototype]
 window.HTMLOptionElement [object HTMLOptionElementConstructor]
 window.HTMLOptionElement.prototype [printed above as window.Element.prototype]
+window.HTMLOutputElement [object HTMLOutputElementConstructor]
+window.HTMLOutputElement.prototype [printed above as window.Element.prototype]
 window.HTMLParagraphElement [object HTMLParagraphElementConstructor]
 window.HTMLParagraphElement.prototype [printed above as window.Element.prototype]
 window.HTMLParamElement [object HTMLParamElementConstructor]
diff --git a/LayoutTests/platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt b/LayoutTests/platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt
index ab5698d..018b33f 100644
--- a/LayoutTests/platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt
+++ b/LayoutTests/platform/gtk/fast/dom/Window/window-property-descriptors-expected.txt
@@ -103,6 +103,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOListElement') is 'obje
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLObjectElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptGroupElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptionElement') is 'object'
+PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOutputElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParagraphElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParamElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLPreElement') is 'object'
diff --git a/LayoutTests/platform/gtk/fast/dom/prototype-inheritance-expected.txt b/LayoutTests/platform/gtk/fast/dom/prototype-inheritance-expected.txt
index fa8c2d0..c71fd5b 100644
--- a/LayoutTests/platform/gtk/fast/dom/prototype-inheritance-expected.txt
+++ b/LayoutTests/platform/gtk/fast/dom/prototype-inheritance-expected.txt
@@ -203,6 +203,8 @@ PASS inner.HTMLOptGroupElement.isInner is true
 PASS inner.HTMLOptGroupElement.constructor.isInner is true
 PASS inner.HTMLOptionElement.isInner is true
 PASS inner.HTMLOptionElement.constructor.isInner is true
+PASS inner.HTMLOutputElement.isInner is true
+PASS inner.HTMLOutputElement.constructor.isInner is true
 PASS inner.HTMLParagraphElement.isInner is true
 PASS inner.HTMLParagraphElement.constructor.isInner is true
 PASS inner.HTMLParamElement.isInner is true
diff --git a/LayoutTests/platform/gtk/fast/js/global-constructors-expected.txt b/LayoutTests/platform/gtk/fast/js/global-constructors-expected.txt
index 00eae5f..9df0149 100644
--- a/LayoutTests/platform/gtk/fast/js/global-constructors-expected.txt
+++ b/LayoutTests/platform/gtk/fast/js/global-constructors-expected.txt
@@ -97,6 +97,7 @@ PASS HTMLOListElement.toString() is '[object HTMLOListElementConstructor]'
 PASS HTMLObjectElement.toString() is '[object HTMLObjectElementConstructor]'
 PASS HTMLOptGroupElement.toString() is '[object HTMLOptGroupElementConstructor]'
 PASS HTMLOptionElement.toString() is '[object HTMLOptionElementConstructor]'
+PASS HTMLOutputElement.toString() is '[object HTMLOutputElementConstructor]'
 PASS HTMLParagraphElement.toString() is '[object HTMLParagraphElementConstructor]'
 PASS HTMLParamElement.toString() is '[object HTMLParamElementConstructor]'
 PASS HTMLPreElement.toString() is '[object HTMLPreElementConstructor]'
diff --git a/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt b/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt
index 1bbf050..0370b60 100644
--- a/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt
+++ b/LayoutTests/platform/qt/fast/dom/Window/window-properties-expected.txt
@@ -1054,6 +1054,8 @@ window.HTMLOptGroupElement [object HTMLOptGroupElementConstructor]
 window.HTMLOptGroupElement.prototype [printed above as window.Element.prototype]
 window.HTMLOptionElement [object HTMLOptionElementConstructor]
 window.HTMLOptionElement.prototype [printed above as window.Element.prototype]
+window.HTMLOutputElement [object HTMLOutputElementConstructor]
+window.HTMLOutputElement.prototype [printed above as window.Element.prototype]
 window.HTMLParagraphElement [object HTMLParagraphElementConstructor]
 window.HTMLParagraphElement.prototype [printed above as window.Element.prototype]
 window.HTMLParamElement [object HTMLParamElementConstructor]
diff --git a/LayoutTests/platform/qt/fast/dom/Window/window-property-descriptors-expected.txt b/LayoutTests/platform/qt/fast/dom/Window/window-property-descriptors-expected.txt
index 74b4299..ad8f82a 100644
--- a/LayoutTests/platform/qt/fast/dom/Window/window-property-descriptors-expected.txt
+++ b/LayoutTests/platform/qt/fast/dom/Window/window-property-descriptors-expected.txt
@@ -104,6 +104,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOListElement') is 'obje
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLObjectElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptGroupElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptionElement') is 'object'
+PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOutputElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParagraphElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParamElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLPreElement') is 'object'
diff --git a/LayoutTests/platform/qt/fast/dom/prototype-inheritance-expected.txt b/LayoutTests/platform/qt/fast/dom/prototype-inheritance-expected.txt
index c6d527f..1c400cc 100644
--- a/LayoutTests/platform/qt/fast/dom/prototype-inheritance-expected.txt
+++ b/LayoutTests/platform/qt/fast/dom/prototype-inheritance-expected.txt
@@ -205,6 +205,8 @@ PASS inner.HTMLOptGroupElement.isInner is true
 PASS inner.HTMLOptGroupElement.constructor.isInner is true
 PASS inner.HTMLOptionElement.isInner is true
 PASS inner.HTMLOptionElement.constructor.isInner is true
+PASS inner.HTMLOutputElement.isInner is true
+PASS inner.HTMLOutputElement.constructor.isInner is true
 PASS inner.HTMLParagraphElement.isInner is true
 PASS inner.HTMLParagraphElement.constructor.isInner is true
 PASS inner.HTMLParamElement.isInner is true
diff --git a/LayoutTests/platform/qt/fast/js/global-constructors-expected.txt b/LayoutTests/platform/qt/fast/js/global-constructors-expected.txt
index 8dde1ac..94ac85d 100644
--- a/LayoutTests/platform/qt/fast/js/global-constructors-expected.txt
+++ b/LayoutTests/platform/qt/fast/js/global-constructors-expected.txt
@@ -98,6 +98,7 @@ PASS HTMLOListElement.toString() is '[object HTMLOListElementConstructor]'
 PASS HTMLObjectElement.toString() is '[object HTMLObjectElementConstructor]'
 PASS HTMLOptGroupElement.toString() is '[object HTMLOptGroupElementConstructor]'
 PASS HTMLOptionElement.toString() is '[object HTMLOptionElementConstructor]'
+PASS HTMLOutputElement.toString() is '[object HTMLOutputElementConstructor]'
 PASS HTMLParagraphElement.toString() is '[object HTMLParagraphElementConstructor]'
 PASS HTMLParamElement.toString() is '[object HTMLParamElementConstructor]'
 PASS HTMLPreElement.toString() is '[object HTMLPreElementConstructor]'
diff --git a/LayoutTests/platform/win/fast/dom/Window/window-property-descriptors-expected.txt b/LayoutTests/platform/win/fast/dom/Window/window-property-descriptors-expected.txt
index 7aa1b0a..5b94c7b 100644
--- a/LayoutTests/platform/win/fast/dom/Window/window-property-descriptors-expected.txt
+++ b/LayoutTests/platform/win/fast/dom/Window/window-property-descriptors-expected.txt
@@ -104,6 +104,7 @@ PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOListElement') is 'obje
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLObjectElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptGroupElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOptionElement') is 'object'
+PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLOutputElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParagraphElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLParamElement') is 'object'
 PASS typeof Object.getOwnPropertyDescriptor(window, 'HTMLPreElement') is 'object'
diff --git a/LayoutTests/platform/win/fast/dom/prototype-inheritance-2-expected.txt b/LayoutTests/platform/win/fast/dom/prototype-inheritance-2-expected.txt
index ed09f31..c6efb29 100644
--- a/LayoutTests/platform/win/fast/dom/prototype-inheritance-2-expected.txt
+++ b/LayoutTests/platform/win/fast/dom/prototype-inheritance-2-expected.txt
@@ -268,6 +268,7 @@ Never found HTMLOListElement
 Never found HTMLObjectElement
 Never found HTMLOptGroupElement
 Never found HTMLOptionElement
+Never found HTMLOutputElement
 Never found HTMLParagraphElement
 Never found HTMLParamElement
 Never found HTMLPreElement
diff --git a/LayoutTests/platform/win/fast/dom/prototype-inheritance-expected.txt b/LayoutTests/platform/win/fast/dom/prototype-inheritance-expected.txt
index ec99848..27fccaa 100644
--- a/LayoutTests/platform/win/fast/dom/prototype-inheritance-expected.txt
+++ b/LayoutTests/platform/win/fast/dom/prototype-inheritance-expected.txt
@@ -205,6 +205,8 @@ PASS inner.HTMLOptGroupElement.isInner is true
 PASS inner.HTMLOptGroupElement.constructor.isInner is true
 PASS inner.HTMLOptionElement.isInner is true
 PASS inner.HTMLOptionElement.constructor.isInner is true
+PASS inner.HTMLOutputElement.isInner is true
+PASS inner.HTMLOutputElement.constructor.isInner is true
 PASS inner.HTMLParagraphElement.isInner is true
 PASS inner.HTMLParagraphElement.constructor.isInner is true
 PASS inner.HTMLParamElement.isInner is true
diff --git a/LayoutTests/platform/win/fast/js/global-constructors-expected.txt b/LayoutTests/platform/win/fast/js/global-constructors-expected.txt
index a94f69c..044cfb2 100644
--- a/LayoutTests/platform/win/fast/js/global-constructors-expected.txt
+++ b/LayoutTests/platform/win/fast/js/global-constructors-expected.txt
@@ -98,6 +98,7 @@ PASS HTMLOListElement.toString() is '[object HTMLOListElementConstructor]'
 PASS HTMLObjectElement.toString() is '[object HTMLObjectElementConstructor]'
 PASS HTMLOptGroupElement.toString() is '[object HTMLOptGroupElementConstructor]'
 PASS HTMLOptionElement.toString() is '[object HTMLOptionElementConstructor]'
+PASS HTMLOutputElement.toString() is '[object HTMLOutputElementConstructor]'
 PASS HTMLParagraphElement.toString() is '[object HTMLParagraphElementConstructor]'
 PASS HTMLParamElement.toString() is '[object HTMLParamElementConstructor]'
 PASS HTMLPreElement.toString() is '[object HTMLPreElementConstructor]'
diff --git a/WebCore/Android.derived.jscbindings.mk b/WebCore/Android.derived.jscbindings.mk
index 7a850a3..d0cbd49 100644
--- a/WebCore/Android.derived.jscbindings.mk
+++ b/WebCore/Android.derived.jscbindings.mk
@@ -218,6 +218,7 @@ GEN := \
     $(intermediates)/html/JSHTMLOptGroupElement.h \
     $(intermediates)/html/JSHTMLOptionElement.h \
     $(intermediates)/html/JSHTMLOptionsCollection.h \
+    $(intermediates)/html/JSHTMLOutputElement.h \
     $(intermediates)/html/JSHTMLParagraphElement.h \
     $(intermediates)/html/JSHTMLParamElement.h \
     $(intermediates)/html/JSHTMLPreElement.h \
diff --git a/WebCore/Android.derived.v8bindings.mk b/WebCore/Android.derived.v8bindings.mk
index 4eede4c..e8a9cfd 100644
--- a/WebCore/Android.derived.v8bindings.mk
+++ b/WebCore/Android.derived.v8bindings.mk
@@ -199,6 +199,7 @@ GEN := \
     $(intermediates)/bindings/V8HTMLOptGroupElement.h \
     $(intermediates)/bindings/V8HTMLOptionElement.h \
     $(intermediates)/bindings/V8HTMLOptionsCollection.h \
+    $(intermediates)/bindings/V8HTMLOutputElement.h \
     $(intermediates)/bindings/V8HTMLParagraphElement.h \
     $(intermediates)/bindings/V8HTMLParamElement.h \
     $(intermediates)/bindings/V8HTMLPreElement.h \
diff --git a/WebCore/Android.jscbindings.mk b/WebCore/Android.jscbindings.mk
index 961e8f3..2753a18 100644
--- a/WebCore/Android.jscbindings.mk
+++ b/WebCore/Android.jscbindings.mk
@@ -117,6 +117,7 @@ LOCAL_SRC_FILES += \
 	bindings/js/JSHTMLInputElementCustom.cpp \
 	bindings/js/JSHTMLObjectElementCustom.cpp \
 	bindings/js/JSHTMLOptionsCollectionCustom.cpp \
+	bindings/js/JSHTMLOutputElementCustom.cpp \
 	bindings/js/JSHTMLSelectElementCustom.cpp \
 	bindings/js/JSHistoryCustom.cpp \
 	bindings/js/JSIDBAnyCustom.cpp \
diff --git a/WebCore/Android.mk b/WebCore/Android.mk
index 058fac3..367cdf3 100644
--- a/WebCore/Android.mk
+++ b/WebCore/Android.mk
@@ -288,6 +288,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
 	html/HTMLImageLoader.cpp \
 	html/HTMLNameCollection.cpp \
 	html/HTMLOptionsCollection.cpp \
+	html/HTMLOutputElement.cpp \
 	html/HTMLParserErrorCodes.cpp \
 	html/HTMLTableRowsCollection.cpp \
 	html/HTMLViewSourceDocument.cpp \
diff --git a/WebCore/Android.v8bindings.mk b/WebCore/Android.v8bindings.mk
index fdee6fb..501e4e1 100644
--- a/WebCore/Android.v8bindings.mk
+++ b/WebCore/Android.v8bindings.mk
@@ -133,6 +133,7 @@ LOCAL_SRC_FILES += \
 	bindings/v8/custom/V8HTMLInputElementCustom.cpp \
 	bindings/v8/custom/V8HTMLOptionElementConstructor.cpp \
 	bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp \
+	bindings/v8/custom/V8HTMLOutputElementCustom.cpp \
 	bindings/v8/custom/V8HTMLPlugInElementCustom.cpp \
 	bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp \
 	bindings/v8/custom/V8HTMLSelectElementCustom.cpp \
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index d9c72c2..12e3178 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -262,6 +262,7 @@ SET(WebCore_IDL_FILES
     html/HTMLOptGroupElement.idl
     html/HTMLOptionElement.idl
     html/HTMLOptionsCollection.idl
+    html/HTMLOutputElement.idl
     html/HTMLParagraphElement.idl
     html/HTMLParamElement.idl
     html/HTMLPreElement.idl
@@ -639,6 +640,7 @@ SET(WebCore_SOURCES
     bindings/js/JSHTMLInputElementCustom.cpp
     bindings/js/JSHTMLObjectElementCustom.cpp
     bindings/js/JSHTMLOptionsCollectionCustom.cpp
+    bindings/js/JSHTMLOutputElementCustom.cpp
     bindings/js/JSHTMLSelectElementCustom.cpp
     bindings/js/JSImageConstructor.cpp
     bindings/js/JSImageDataCustom.cpp
@@ -1033,6 +1035,7 @@ SET(WebCore_SOURCES
     html/HTMLOptGroupElement.cpp
     html/HTMLOptionElement.cpp
     html/HTMLOptionsCollection.cpp
+    html/HTMLOutputElement.cpp
     html/HTMLParagraphElement.cpp
     html/HTMLParamElement.cpp
     html/HTMLParserErrorCodes.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6fb1413..343ffa8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,69 @@
+2010-11-04  Kenichi Ishibashi  <bashi at google.com>
+
+        Reviewed by Kent Tamura.
+
+        [HTML5][Forms] Support for <output> element
+        https://bugs.webkit.org/show_bug.cgi?id=29363
+
+        Support for <output> element.
+
+        Tests: fast/dom/HTMLOutputElement/dom-settable-token-list.html
+               fast/dom/HTMLOutputElement/htmloutputelement-reset-event.html
+               fast/dom/HTMLOutputElement/htmloutputelement-validity.html
+               fast/dom/HTMLOutputElement/htmloutputelement-value.html
+               fast/dom/HTMLOutputElement/htmloutputelement.html
+
+        * Android.derived.jscbindings.mk: Added JSHTMLOutputElement.h.
+        * Android.derived.v8bindings.mk: Added V8HTMLOutputElement.h.
+        * Android.jscbindings.mk: Added JSHTMLOutputElementCustom.cpp.
+        * Android.mk: Added HTMLOutputElement.cpp.
+        * Android.v8bindings.mk: Added V8HTMLOutputElementCustom.cpp.
+        * CMakeLists.txt: Added HTMLOutputElement.{idl,cpp} and JSHTMLOutputElementCustom.cpp.
+        * DerivedSources.cpp: Added JSHTMLOutputElement.cpp.
+        * DerivedSources.make: Added HTMLOutputElement entry.
+        * GNUmakefile.am: Added JSHTMLOutputElement.{cpp,h}
+        * WebCore.gypi: Added HTMLOutputElement.{idl,cpp,h}, JSHTMLOutputElementCustom.cpp and V8HTMLOutputElementCustom.cpp
+        * WebCore.pri: Added HTMLOutputElement.idl.
+        * WebCore.pro: Added V8HTMLOutputElementCustom.cpp, JSHTMLOutputElementCustom.cpp and HTMLOutputElement.cpp.
+        * WebCore.vcproj/WebCore.vcproj: Added entries for JSHTMLOutputElement.{cpp,h} and JSHTMLOutputElementCustom.cpp.
+        * WebCore.xcodeproj/project.pbxproj: Added entries for JSHTMLOutputElementCustom.cpp, HTMLOutputElement.{cpp,h,idl}, JSHTMLOutputElement.{cpp,h}
+        * bindings/js/JSBindingsAllInOne.cpp: Added JSHTMLOutputElementCustom.cpp.
+        * bindings/js/JSHTMLOutputElementCustom.cpp: Added.
+        (WebCore::JSHTMLOutputElement::htmlFor):
+        (WebCore::JSHTMLOutputElement::setHtmlFor):
+        * bindings/v8/custom/V8DOMSettableTokenListCustom.cpp: Modified.
+        (WebCore::V8DOMSettableTokenList::indexedPropertyGetter): Returns null if the index is out of range.
+        * bindings/v8/custom/V8HTMLOutputElementCustom.cpp: Added.
+        (WebCore::V8HTMLOutputElement::htmlForAccessorGetter):
+        (WebCore::V8HTMLOutputElement::htmlForAccessorSetter):
+        * css/html.css: Added a default style of output element.
+        (output):
+        * html/DOMSettableTokenList.cpp: Fix bugs.
+        (WebCore::DOMSettableTokenList::item): Returns null string if the index is out of range.
+        (WebCore::DOMSettableTokenList::addInternal): Added check m_tokens.isNull().
+        (WebCore::DOMSettableTokenList::setValue): Set the value case sensitive.
+        * html/HTMLOutputElement.cpp: Added.
+        (WebCore::HTMLOutputElement::HTMLOutputElement):
+        (WebCore::HTMLOutputElement::create):
+        (WebCore::HTMLOutputElement::formControlType):
+        (WebCore::HTMLOutputElement::parseMappedAttribute):
+        (WebCore::HTMLOutputElement::htmlFor):
+        (WebCore::HTMLOutputElement::setFor):
+        (WebCore::HTMLOutputElement::setForm):
+        (WebCore::HTMLOutputElement::childrenChanged):
+        (WebCore::HTMLOutputElement::reset):
+        (WebCore::HTMLOutputElement::value):
+        (WebCore::HTMLOutputElement::setValue):
+        (WebCore::HTMLOutputElement::defaultValue):
+        (WebCore::HTMLOutputElement::setDefaultValue):
+        (WebCore::HTMLOutputElement::setTextContentInternal):
+        * html/HTMLOutputElement.h: Added.
+        (WebCore::HTMLOutputElement::isEnumeratable):
+        (WebCore::HTMLOutputElement::willValidate):
+        * html/HTMLOutputElement.idl: Added.
+        * html/HTMLTagNames.in: Added "output".
+        * page/DOMWindow.idl: Added an attribute for HTMLOutputElement.
+
 2010-11-04  Zhenyao Mo  <zmo at google.com>
 
         Reviewed by Kenneth Russell.
diff --git a/WebCore/DerivedSources.cpp b/WebCore/DerivedSources.cpp
index 80c1304..dcd0e22 100644
--- a/WebCore/DerivedSources.cpp
+++ b/WebCore/DerivedSources.cpp
@@ -182,6 +182,7 @@
 #include "JSHTMLOptGroupElement.cpp"
 #include "JSHTMLOptionElement.cpp"
 #include "JSHTMLOptionsCollection.cpp"
+#include "JSHTMLOutputElement.cpp"
 #include "JSHTMLParagraphElement.cpp"
 #include "JSHTMLParamElement.cpp"
 #include "JSHTMLPreElement.cpp"
diff --git a/WebCore/DerivedSources.make b/WebCore/DerivedSources.make
index 4e732de..68979b0 100644
--- a/WebCore/DerivedSources.make
+++ b/WebCore/DerivedSources.make
@@ -227,6 +227,7 @@ DOM_CLASSES = \
     HTMLOptGroupElement \
     HTMLOptionElement \
     HTMLOptionsCollection \
+    HTMLOutputElement \
     HTMLParagraphElement \
     HTMLParamElement \
     HTMLPreElement \
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index e76fcb2..ed9a5f8 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -370,6 +370,8 @@ webcore_built_sources += \
 	DerivedSources/WebCore/JSHTMLOptionElement.h \
 	DerivedSources/WebCore/JSHTMLOptionsCollection.cpp \
 	DerivedSources/WebCore/JSHTMLOptionsCollection.h \
+	DerivedSources/WebCore/JSHTMLOutputElement.cpp \
+	DerivedSources/WebCore/JSHTMLOutputElement.h \
 	DerivedSources/WebCore/JSHTMLParagraphElement.cpp \
 	DerivedSources/WebCore/JSHTMLParagraphElement.h \
 	DerivedSources/WebCore/JSHTMLParamElement.cpp \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 335c648..af9b705 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -174,6 +174,7 @@
             'html/HTMLOptGroupElement.idl',
             'html/HTMLOptionElement.idl',
             'html/HTMLOptionsCollection.idl',
+            'html/HTMLOutputElement.idl',
             'html/HTMLParagraphElement.idl',
             'html/HTMLParamElement.idl',
             'html/HTMLPreElement.idl',
@@ -625,6 +626,7 @@
             'bindings/js/JSHTMLObjectElementCustom.cpp',
             'bindings/js/JSHTMLObjectElementCustom.h',
             'bindings/js/JSHTMLOptionsCollectionCustom.cpp',
+            'bindings/js/JSHTMLOutputElementCustom.cpp',
             'bindings/js/JSHTMLSelectElementCustom.cpp',
             'bindings/js/JSHTMLSelectElementCustom.h',
             'bindings/js/JSImageConstructor.cpp',
@@ -809,6 +811,7 @@
             'bindings/v8/custom/V8HTMLOptionElementConstructor.cpp',
             'bindings/v8/custom/V8HTMLOptionElementConstructor.h',
             'bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp',
+            'bindings/v8/custom/V8HTMLOutputElementCustom.cpp',
             'bindings/v8/custom/V8HTMLPlugInElementCustom.cpp',
             'bindings/v8/custom/V8HTMLSelectElementCustom.cpp',
             'bindings/v8/custom/V8HTMLSelectElementCustom.h',
@@ -1719,6 +1722,8 @@
             'html/HTMLOptionElement.h',
             'html/HTMLOptionsCollection.cpp',
             'html/HTMLOptionsCollection.h',
+            'html/HTMLOutputElement.cpp',
+            'html/HTMLOutputElement.h',
             'html/HTMLParagraphElement.cpp',
             'html/HTMLParagraphElement.h',
             'html/HTMLParamElement.cpp',
diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri
index 3b38a45..9d9906a 100644
--- a/WebCore/WebCore.pri
+++ b/WebCore/WebCore.pri
@@ -262,6 +262,7 @@ IDL_BINDINGS += \
     html/HTMLOptGroupElement.idl \
     html/HTMLOptionElement.idl \
     html/HTMLOptionsCollection.idl \
+    html/HTMLOutputElement.idl \
     html/HTMLParagraphElement.idl \
     html/HTMLParamElement.idl \
     html/HTMLPreElement.idl \
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 8933072..5f0ed3a 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -442,6 +442,7 @@ v8 {
         bindings/v8/custom/V8HTMLInputElementCustom.cpp \
         bindings/v8/custom/V8HTMLOptionElementConstructor.cpp \
         bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp \
+        bindings/v8/custom/V8HTMLOutputElementCustom.cpp \
         bindings/v8/custom/V8HTMLPlugInElementCustom.cpp \
         bindings/v8/custom/V8HTMLSelectElementCustom.cpp \
         bindings/v8/custom/V8LocationCustom.cpp \
@@ -537,6 +538,7 @@ v8 {
         bindings/js/JSHTMLInputElementCustom.cpp \
         bindings/js/JSHTMLObjectElementCustom.cpp \
         bindings/js/JSHTMLOptionsCollectionCustom.cpp \
+        bindings/js/JSHTMLOutputElementCustom.cpp \
         bindings/js/JSHTMLSelectElementCustom.cpp \
         bindings/js/JSImageConstructor.cpp \
         bindings/js/JSImageDataCustom.cpp \
@@ -925,6 +927,7 @@ SOURCES += \
     html/HTMLOptGroupElement.cpp \
     html/HTMLOptionElement.cpp \
     html/HTMLOptionsCollection.cpp \
+    html/HTMLOutputElement.cpp \
     html/HTMLParagraphElement.cpp \
     html/HTMLParamElement.cpp \
     html/HTMLParserErrorCodes.cpp \
@@ -1831,6 +1834,7 @@ HEADERS += \
     html/HTMLOptGroupElement.h \
     html/HTMLOptionElement.h \
     html/HTMLOptionsCollection.h \
+    html/HTMLOutputElement.h \
     html/HTMLParagraphElement.h \
     html/HTMLParamElement.h \
     html/HTMLParserErrorCodes.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index f362653..1b1e104 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -8564,6 +8564,62 @@
 				>
 			</File>
 			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLOutputElement.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Internal|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_Cairo|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_All|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLOutputElement.h"
+				>
+			</File>
+			<File
 				RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHTMLParagraphElement.cpp"
 				>
 				<FileConfiguration
@@ -52028,6 +52084,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\html\HTMLOutputElement.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\html\HTMLOutputElement.h"
+				>
+			</File>
+			<File
 				RelativePath="..\html\HTMLParagraphElement.cpp"
 				>
 				<FileConfiguration
@@ -57243,6 +57307,58 @@
 					</FileConfiguration>
 				</File>
 				<File
+					RelativePath="..\bindings\js\JSHTMLOutputElementCustom.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug_Internal|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug_Cairo|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_Cairo|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug_All|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
 					RelativePath="..\bindings\js\JSHTMLSelectElementCustom.cpp"
 					>
 					<FileConfiguration
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 6a9e2f1..72032c8 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1140,6 +1140,11 @@
 		4ACBC0C412713CCA0094F9B2 /* DOMSettableTokenList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACBC0C112713CCA0094F9B2 /* DOMSettableTokenList.h */; };
 		4ACBC0CA12713D0A0094F9B2 /* JSDOMSettableTokenList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACBC0C812713D0A0094F9B2 /* JSDOMSettableTokenList.cpp */; };
 		4ACBC0CB12713D0A0094F9B2 /* JSDOMSettableTokenList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACBC0C912713D0A0094F9B2 /* JSDOMSettableTokenList.h */; };
+		4AD01000127E63100015035F /* JSHTMLOutputElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AD00FFF127E63100015035F /* JSHTMLOutputElementCustom.cpp */; };
+		4AD01008127E642A0015035F /* HTMLOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AD01005127E642A0015035F /* HTMLOutputElement.cpp */; };
+		4AD01009127E642A0015035F /* HTMLOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AD01006127E642A0015035F /* HTMLOutputElement.h */; };
+		4AD0173C127E82860015035F /* JSHTMLOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */; };
+		4AD0173D127E82860015035F /* JSHTMLOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AD0173B127E82860015035F /* JSHTMLOutputElement.h */; };
 		4B2708C70AF19EE40065127F /* Pasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2708C50AF19EE40065127F /* Pasteboard.h */; };
 		4B2709830AF2E5E00065127F /* PasteboardMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B2709810AF2E5E00065127F /* PasteboardMac.mm */; };
 		4B3043C70AE0370300A82647 /* Sound.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B3043C60AE0370300A82647 /* Sound.h */; };
@@ -7247,6 +7252,12 @@
 		4ACBC0C212713CCA0094F9B2 /* DOMSettableTokenList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMSettableTokenList.idl; sourceTree = "<group>"; };
 		4ACBC0C812713D0A0094F9B2 /* JSDOMSettableTokenList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMSettableTokenList.cpp; sourceTree = "<group>"; };
 		4ACBC0C912713D0A0094F9B2 /* JSDOMSettableTokenList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMSettableTokenList.h; sourceTree = "<group>"; };
+		4AD00FFF127E63100015035F /* JSHTMLOutputElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOutputElementCustom.cpp; sourceTree = "<group>"; };
+		4AD01005127E642A0015035F /* HTMLOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLOutputElement.cpp; sourceTree = "<group>"; };
+		4AD01006127E642A0015035F /* HTMLOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLOutputElement.h; sourceTree = "<group>"; };
+		4AD01007127E642A0015035F /* HTMLOutputElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLOutputElement.idl; sourceTree = "<group>"; };
+		4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOutputElement.cpp; sourceTree = "<group>"; };
+		4AD0173B127E82860015035F /* JSHTMLOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLOutputElement.h; sourceTree = "<group>"; };
 		4B2708C50AF19EE40065127F /* Pasteboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pasteboard.h; sourceTree = "<group>"; };
 		4B2709810AF2E5E00065127F /* PasteboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardMac.mm; sourceTree = "<group>"; };
 		4B3043C60AE0370300A82647 /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = "<group>"; };
@@ -14872,6 +14883,9 @@
 				9327A94109968D1A0068A546 /* HTMLOptionsCollection.cpp */,
 				A81369BE097374F500D74463 /* HTMLOptionsCollection.h */,
 				85DF2F920AA3C9B600AD64C5 /* HTMLOptionsCollection.idl */,
+				4AD01005127E642A0015035F /* HTMLOutputElement.cpp */,
+				4AD01006127E642A0015035F /* HTMLOutputElement.h */,
+				4AD01007127E642A0015035F /* HTMLOutputElement.idl */,
 				A8EA7CA40A192B9C00A8EF5F /* HTMLParagraphElement.cpp */,
 				A8EA7CA70A192B9C00A8EF5F /* HTMLParagraphElement.h */,
 				1AE2AB610A1CE7CA00B42B25 /* HTMLParagraphElement.idl */,
@@ -15351,6 +15365,8 @@
 				A80E7E8F0A1A83E3007FB8C5 /* JSHTMLOptionElement.h */,
 				448A29BE0A46D9CB0030759F /* JSHTMLOptionsCollection.cpp */,
 				448A29BD0A46D9CB0030759F /* JSHTMLOptionsCollection.h */,
+				4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */,
+				4AD0173B127E82860015035F /* JSHTMLOutputElement.h */,
 				1AE2AB9E0A1CE90500B42B25 /* JSHTMLParagraphElement.cpp */,
 				1AE2AB9F0A1CE90500B42B25 /* JSHTMLParagraphElement.h */,
 				1AE2ABA00A1CE90500B42B25 /* JSHTMLParamElement.cpp */,
@@ -17036,6 +17052,7 @@
 				BCC438770E886CC700533DD5 /* JSHTMLInputElementCustom.cpp */,
 				BC305CA30C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp */,
 				448AD27A0A4813790023D179 /* JSHTMLOptionsCollectionCustom.cpp */,
+				4AD00FFF127E63100015035F /* JSHTMLOutputElementCustom.cpp */,
 				BC17F9650B64EBB8004A65CB /* JSHTMLSelectElementCustom.cpp */,
 				AB4CB4EA0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h */,
 				C585A65C11D4FAB2004C3E4B /* JSIDBAnyCustom.cpp */,
@@ -19738,6 +19755,7 @@
 				A81369DE097374F600D74463 /* HTMLOptGroupElement.h in Headers */,
 				A81369DC097374F600D74463 /* HTMLOptionElement.h in Headers */,
 				A81369DA097374F600D74463 /* HTMLOptionsCollection.h in Headers */,
+				4AD01009127E642A0015035F /* HTMLOutputElement.h in Headers */,
 				A8EA7CB50A192B9C00A8EF5F /* HTMLParagraphElement.h in Headers */,
 				A871D4580A127CBC00B12A68 /* HTMLParamElement.h in Headers */,
 				BC588AF00BFA6CF900EE679E /* HTMLParserErrorCodes.h in Headers */,
@@ -20059,6 +20077,7 @@
 				A80E7E9B0A1A83E3007FB8C5 /* JSHTMLOptGroupElement.h in Headers */,
 				A80E7E990A1A83E3007FB8C5 /* JSHTMLOptionElement.h in Headers */,
 				448A29BF0A46D9CB0030759F /* JSHTMLOptionsCollection.h in Headers */,
+				4AD0173D127E82860015035F /* JSHTMLOutputElement.h in Headers */,
 				1AE2ABA70A1CE90500B42B25 /* JSHTMLParagraphElement.h in Headers */,
 				1AE2ABA90A1CE90500B42B25 /* JSHTMLParamElement.h in Headers */,
 				1AE2ABAB0A1CE90500B42B25 /* JSHTMLPreElement.h in Headers */,
@@ -22356,6 +22375,7 @@
 				A81369DF097374F600D74463 /* HTMLOptGroupElement.cpp in Sources */,
 				A81369DD097374F600D74463 /* HTMLOptionElement.cpp in Sources */,
 				9327A94209968D1A0068A546 /* HTMLOptionsCollection.cpp in Sources */,
+				4AD01008127E642A0015035F /* HTMLOutputElement.cpp in Sources */,
 				A8EA7CB20A192B9C00A8EF5F /* HTMLParagraphElement.cpp in Sources */,
 				A871D4590A127CBC00B12A68 /* HTMLParamElement.cpp in Sources */,
 				BC588B4B0BFA723C00EE679E /* HTMLParserErrorCodes.cpp in Sources */,
@@ -22714,6 +22734,8 @@
 				A80E7E9A0A1A83E3007FB8C5 /* JSHTMLOptionElement.cpp in Sources */,
 				448A29C00A46D9CB0030759F /* JSHTMLOptionsCollection.cpp in Sources */,
 				448AD27C0A48137A0023D179 /* JSHTMLOptionsCollectionCustom.cpp in Sources */,
+				4AD0173C127E82860015035F /* JSHTMLOutputElement.cpp in Sources */,
+				4AD01000127E63100015035F /* JSHTMLOutputElementCustom.cpp in Sources */,
 				1AE2ABA60A1CE90500B42B25 /* JSHTMLParagraphElement.cpp in Sources */,
 				1AE2ABA80A1CE90500B42B25 /* JSHTMLParamElement.cpp in Sources */,
 				1AE2ABAA0A1CE90500B42B25 /* JSHTMLPreElement.cpp in Sources */,
diff --git a/WebCore/bindings/js/JSBindingsAllInOne.cpp b/WebCore/bindings/js/JSBindingsAllInOne.cpp
index cf08ca9..e3fb536 100644
--- a/WebCore/bindings/js/JSBindingsAllInOne.cpp
+++ b/WebCore/bindings/js/JSBindingsAllInOne.cpp
@@ -84,6 +84,7 @@
 #include "JSHTMLInputElementCustom.cpp"
 #include "JSHTMLObjectElementCustom.cpp"
 #include "JSHTMLOptionsCollectionCustom.cpp"
+#include "JSHTMLOutputElementCustom.cpp"
 #include "JSHTMLSelectElementCustom.cpp"
 #include "JSHistoryCustom.cpp"
 #include "JSImageConstructor.cpp"
diff --git a/WebCore/bindings/js/JSHTMLOutputElementCustom.cpp b/WebCore/bindings/js/JSHTMLOutputElementCustom.cpp
new file mode 100644
index 0000000..248a08e
--- /dev/null
+++ b/WebCore/bindings/js/JSHTMLOutputElementCustom.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+ 
+#include "config.h"
+#include "JSHTMLOutputElement.h"
+
+#include "HTMLOutputElement.h"
+#include "JSDOMBinding.h"
+#include "JSDOMSettableTokenList.h"
+#include <wtf/GetPtr.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue JSHTMLOutputElement::htmlFor(ExecState* exec) const
+{
+    HTMLOutputElement* output = static_cast<HTMLOutputElement*>(impl());
+    JSValue result = toJS(exec, globalObject(), WTF::getPtr(output->htmlFor()));
+    return result;
+}
+
+void JSHTMLOutputElement::setHtmlFor(ExecState* exec, JSValue value)
+{
+    HTMLOutputElement* output = static_cast<HTMLOutputElement*>(impl());
+    output->setFor(valueToStringWithNullCheck(exec, value));
+}
+
+} // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp b/WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp
index 3bcf0fc..e1c9be4 100644
--- a/WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp
@@ -36,7 +36,7 @@ v8::Handle<v8::Value> V8DOMSettableTokenList::indexedPropertyGetter(uint32_t ind
 {
     INC_STATS("DOM.DOMSettableTokenList.IndexedPropertyGetter");
     DOMSettableTokenList* list = V8DOMSettableTokenList::toNative(info.Holder());
-    return v8String(list->item(index));
+    return v8StringOrNull(list->item(index));
 }
 
 } // namespace WebCore
diff --git a/WebCore/bindings/v8/custom/V8HTMLOutputElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLOutputElementCustom.cpp
new file mode 100644
index 0000000..ad86dd2
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8HTMLOutputElementCustom.cpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "V8HTMLOutputElement.h"
+
+#include "HTMLOutputElement.h"
+#include "V8Binding.h"
+#include "V8DOMSettableTokenList.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8HTMLOutputElement::htmlForAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.HTMLOutputElement.htmlFor._get");
+    HTMLOutputElement* imp = V8HTMLOutputElement::toNative(info.Holder());
+    return toV8(imp->htmlFor());
+}
+
+void V8HTMLOutputElement::htmlForAccessorSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.HTMLOutputElement.htmlFor._set");
+    HTMLOutputElement* imp = V8HTMLOutputElement::toNative(info.Holder());
+    imp->setFor(toWebCoreString(value));
+}
+
+} // namespace WebCore
diff --git a/WebCore/css/html.css b/WebCore/css/html.css
index 02fa620..a201adc 100644
--- a/WebCore/css/html.css
+++ b/WebCore/css/html.css
@@ -530,6 +530,10 @@ option {
     font-weight: normal;
 }
 
+output {
+    display: inline;
+}
+
 /* meter */
 
 meter {
diff --git a/WebCore/html/DOMSettableTokenList.cpp b/WebCore/html/DOMSettableTokenList.cpp
index 2636bd3..3a86e9c 100644
--- a/WebCore/html/DOMSettableTokenList.cpp
+++ b/WebCore/html/DOMSettableTokenList.cpp
@@ -40,7 +40,7 @@ DOMSettableTokenList::~DOMSettableTokenList()
 const AtomicString DOMSettableTokenList::item(unsigned index) const
 {
     if (index >= length())
-        return AtomicString("");
+        return AtomicString();
     return m_tokens[index];
 }
 
@@ -61,7 +61,10 @@ void DOMSettableTokenList::add(const AtomicString& token, ExceptionCode& ec)
 void DOMSettableTokenList::addInternal(const AtomicString& token)
 {
     m_value = addToken(m_value, token);
-    m_tokens.add(token);
+    if (m_tokens.isNull())
+        m_tokens.set(token, false);
+    else
+        m_tokens.add(token);
 }
 
 void DOMSettableTokenList::remove(const AtomicString& token, ExceptionCode& ec)
@@ -92,7 +95,7 @@ bool DOMSettableTokenList::toggle(const AtomicString& token, ExceptionCode& ec)
 void DOMSettableTokenList::setValue(const String& value)
 {
     m_value = value;
-    m_tokens.set(value, true);
+    m_tokens.set(value, false);
 }
 
 } // namespace WebCore
diff --git a/WebCore/html/HTMLOutputElement.cpp b/WebCore/html/HTMLOutputElement.cpp
new file mode 100644
index 0000000..dee21ae
--- /dev/null
+++ b/WebCore/html/HTMLOutputElement.cpp
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "HTMLOutputElement.h"
+
+#include "HTMLFormElement.h"
+#include "HTMLNames.h"
+
+namespace WebCore {
+
+inline HTMLOutputElement::HTMLOutputElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
+    : HTMLFormControlElement(tagName, document, form)
+    , m_isDefaultValueMode(true)
+    , m_isSetTextContentInProgress(false)
+    , m_defaultValue()
+    , m_tokens(DOMSettableTokenList::create())
+{
+}
+
+PassRefPtr<HTMLOutputElement> HTMLOutputElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
+{
+    return adoptRef(new HTMLOutputElement(tagName, document, form));
+}
+
+const AtomicString& HTMLOutputElement::formControlType() const
+{
+    DEFINE_STATIC_LOCAL(const AtomicString, output, ("output"));
+    return output;
+}
+
+void HTMLOutputElement::parseMappedAttribute(Attribute* attr)
+{
+    // FIXME: Should handle the 'form' attribute here.
+    if (attr->name() == HTMLNames::forAttr)
+        setFor(attr->value());
+    else
+        HTMLFormControlElement::parseMappedAttribute(attr);
+}
+
+DOMSettableTokenList* HTMLOutputElement::htmlFor() const
+{
+    return m_tokens.get();
+}
+
+void HTMLOutputElement::setFor(const String& value)
+{
+    m_tokens->setValue(value);
+}
+
+void HTMLOutputElement::setForm(const String& /*id*/)
+{
+    // FIXME: Implement this function.
+}
+
+void HTMLOutputElement::childrenChanged(bool createdByParser, Node*, Node*, int)
+{
+    if (createdByParser || m_isSetTextContentInProgress) {
+        m_isSetTextContentInProgress = false;
+        return;
+    }
+
+    if (m_isDefaultValueMode)
+        m_defaultValue = textContent();
+}
+
+void HTMLOutputElement::reset()
+{
+    // The reset algorithm for output elements is to set the element's
+    // value mode flag to "default" and then to set the element's textContent
+    // attribute to the default value.
+    m_isDefaultValueMode = true;
+    setTextContentInternal(m_defaultValue);
+}
+
+String HTMLOutputElement::value() const
+{
+    return textContent();
+}
+
+void HTMLOutputElement::setValue(const String& value)
+{
+    // The value mode flag set to "value" when the value attribute is set.
+    m_isDefaultValueMode = false;
+    setTextContentInternal(value);
+}
+
+String HTMLOutputElement::defaultValue() const
+{
+    return m_defaultValue;
+}
+
+void HTMLOutputElement::setDefaultValue(const String& value)
+{
+     m_defaultValue = value;
+     // The spec requires the value attribute set to the default value
+     // when the element's value mode flag to "default".
+     if (m_isDefaultValueMode)
+         setTextContentInternal(value);
+}
+
+void HTMLOutputElement::setTextContentInternal(const String& value)
+{
+    ASSERT(!m_isSetTextContentInProgress);
+    ExceptionCode ec;
+    m_isSetTextContentInProgress = true;
+    setTextContent(value, ec);
+}
+
+} // namespace
diff --git a/WebCore/html/HTMLOutputElement.h b/WebCore/html/HTMLOutputElement.h
new file mode 100644
index 0000000..df807fb
--- /dev/null
+++ b/WebCore/html/HTMLOutputElement.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HTMLOutputElement_h
+#define HTMLOutputElement_h
+
+#include "DOMSettableTokenList.h"
+#include "HTMLFormControlElement.h"
+#include <wtf/OwnPtr.h>
+
+namespace WebCore {
+
+class HTMLOutputElement : public HTMLFormControlElement {
+public:
+    static PassRefPtr<HTMLOutputElement> create(const QualifiedName&, Document*, HTMLFormElement*);
+
+    virtual bool willValidate() const { return false; }
+
+    void setForm(const String&);
+    String value() const;
+    void setValue(const String&);
+    String defaultValue() const;
+    void setDefaultValue(const String&);
+    void setFor(const String&);
+    DOMSettableTokenList* htmlFor() const;
+
+private:
+    HTMLOutputElement(const QualifiedName&, Document*, HTMLFormElement*);
+
+    virtual void parseMappedAttribute(Attribute*);
+    virtual const AtomicString& formControlType() const;
+    virtual bool isEnumeratable() const { return true; }
+    virtual void childrenChanged(bool createdByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
+    virtual void reset();
+
+    void setTextContentInternal(const String&);
+
+    bool m_isDefaultValueMode;
+    bool m_isSetTextContentInProgress;
+    String m_defaultValue;
+    RefPtr<DOMSettableTokenList> m_tokens;
+};
+
+} // namespace
+
+#endif
diff --git a/WebCore/html/HTMLOutputElement.idl b/WebCore/html/HTMLOutputElement.idl
new file mode 100644
index 0000000..4e6cbfb
--- /dev/null
+++ b/WebCore/html/HTMLOutputElement.idl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module html {
+    interface HTMLOutputElement : HTMLElement {
+        attribute [Custom] DOMSettableTokenList htmlFor;
+        readonly attribute HTMLFormElement form;
+        attribute [Reflect] DOMString name;
+
+        readonly attribute DOMString type;
+        attribute [ConvertNullToNullString] DOMString defaultValue;
+        attribute [ConvertNullToNullString] DOMString value;
+
+        readonly attribute boolean willValidate;
+        readonly attribute ValidityState validity;
+        readonly attribute DOMString validationMessage;
+        boolean checkValidity();
+        void setCustomValidity(in [ConvertUndefinedOrNullToNullString] DOMString error);
+
+        readonly attribute NodeList labels;
+    };
+}
diff --git a/WebCore/html/HTMLTagNames.in b/WebCore/html/HTMLTagNames.in
index 209636d..2b2c1fe 100644
--- a/WebCore/html/HTMLTagNames.in
+++ b/WebCore/html/HTMLTagNames.in
@@ -93,6 +93,7 @@ object constructorNeedsCreatedByParser
 ol interfaceName=HTMLOListElement
 optgroup interfaceName=HTMLOptGroupElement, constructorNeedsFormElement
 option constructorNeedsFormElement
+output constructorNeedsFormElement
 p interfaceName=HTMLParagraphElement
 param
 plaintext interfaceName=HTMLElement
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index 85bd70b..30205ec 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -454,6 +454,7 @@ module window {
         attribute HTMLObjectElementConstructor HTMLObjectElement;
         attribute HTMLOptGroupElementConstructor HTMLOptGroupElement;
         attribute HTMLOptionElementConstructor HTMLOptionElement;
+        attribute HTMLOutputElementConstructor HTMLOutputElement;
         attribute HTMLParagraphElementConstructor HTMLParagraphElement;
         attribute HTMLParamElementConstructor HTMLParamElement;
         attribute HTMLPreElementConstructor HTMLPreElement;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list