<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[52434] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/52434">52434</a></dd>
<dt>Author</dt> <dd>tkent@chromium.org</dd>
<dt>Date</dt> <dd>2009-12-20 22:20:29 -0800 (Sun, 20 Dec 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>2009-12-20  Kent Tamura  &lt;tkent@chromium.org&gt;

        Reviewed by Darin Adler.

        A test for Date binding.
        https://bugs.webkit.org/show_bug.cgi?id=32698

        * fast/forms/input-valueasdate-expected.txt: Added.
        * fast/forms/input-valueasdate.html: Added.
        * fast/forms/script-tests/input-valueasdate.js: Added.

2009-12-20  Kent Tamura  &lt;tkent@chromium.org&gt;

        Reviewed by Darin Adler.

        Add support for JavaScriptCore Date binding.
        https://bugs.webkit.org/show_bug.cgi?id=32698

        This is needed for HTMLInputElement::valueAsDate and
        HTMLTimeElement::valueAsDate.

        A Date instance is mapped to a double value in C++.
        - If null or undefined is set to a JavaScript property, C++ setter
          function receives NaN.
        - If a getter C++ function returns NaN or infinity, a JavaScript
          property returns null.

        Test: fast/forms/input-valueasdate.html

        * bindings/js/JSDOMBinding.cpp:
        (WebCore::jsDateOrNull): Implement the above.
        (WebCore::valueToDate): ditto.
        * bindings/js/JSDOMBinding.h: Declare them.
        * bindings/scripts/CodeGeneratorJS.pm: Produce jsDateOrNull() or
          valueToDate() for Date type.
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::valueAsDate): Temporal implementation.
        (WebCore::HTMLInputElement::setValueAsDate): ditto.
        * html/HTMLInputElement.h:
        * html/HTMLInputElement.idl: Declare valueAsDate.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCorebindingsjsJSDOMBindingcpp">trunk/WebCore/bindings/js/JSDOMBinding.cpp</a></li>
<li><a href="#trunkWebCorebindingsjsJSDOMBindingh">trunk/WebCore/bindings/js/JSDOMBinding.h</a></li>
<li><a href="#trunkWebCorebindingsscriptsCodeGeneratorJSpm">trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkWebCorehtmlHTMLInputElementcpp">trunk/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkWebCorehtmlHTMLInputElementh">trunk/WebCore/html/HTMLInputElement.h</a></li>
<li><a href="#trunkWebCorehtmlHTMLInputElementidl">trunk/WebCore/html/HTMLInputElement.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastformsinputvalueasdateexpectedtxt">trunk/LayoutTests/fast/forms/input-valueasdate-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsinputvalueasdatehtml">trunk/LayoutTests/fast/forms/input-valueasdate.html</a></li>
<li><a href="#trunkLayoutTestsfastformsscripttestsinputvalueasdatejs">trunk/LayoutTests/fast/forms/script-tests/input-valueasdate.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/LayoutTests/ChangeLog        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2009-12-20  Kent Tamura  &lt;tkent@chromium.org&gt;
+
+        Reviewed by Darin Adler.
+
+        A test for Date binding.
+        https://bugs.webkit.org/show_bug.cgi?id=32698
+
+        * fast/forms/input-valueasdate-expected.txt: Added.
+        * fast/forms/input-valueasdate.html: Added.
+        * fast/forms/script-tests/input-valueasdate.js: Added.
+
</ins><span class="cx"> 2009-12-20  Alejandro G. Castro  &lt;alex@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Gustavo Noronha Silva.
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsinputvalueasdateexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/input-valueasdate-expected.txt (0 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-valueasdate-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/forms/input-valueasdate-expected.txt        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+Test HTMLInputElement::valueAsDate binding.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Unsuppported type:
+PASS input.valueAsDate is null
+PASS input.valueAsDate = date threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+
+Supported type:
+PASS valueAsDate != null is true
+PASS typeof valueAsDate is &quot;object&quot;
+PASS valueAsDate.constructor.name is &quot;Date&quot;
+Sets an Epoch Date:
+PASS input.value is &quot;1970-01&quot;
+PASS input.valueAsDate.getTime() is 0
+Sets a number 0:
+PASS input.value is &quot;1970-01&quot;
+PASS input.valueAsDate.getTime() is 0
+Sets other types:
+PASS input.valueAsDate = null threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.valueAsDate = undefined threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS input.valueAsDate = document threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformsinputvalueasdatehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/input-valueasdate.html (0 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-valueasdate.html                                (rev 0)
+++ trunk/LayoutTests/fast/forms/input-valueasdate.html        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;../../fast/js/resources/js-test-style.css&quot;&gt;
+&lt;script src=&quot;../../fast/js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/input-valueasdate.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../fast/js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformsscripttestsinputvalueasdatejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/forms/script-tests/input-valueasdate.js (0 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/script-tests/input-valueasdate.js                                (rev 0)
+++ trunk/LayoutTests/fast/forms/script-tests/input-valueasdate.js        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+description('Test HTMLInputElement::valueAsDate binding.');
+
+var input = document.createElement('input');
+var invalidStateError = 'Error: INVALID_STATE_ERR: DOM Exception 11';
+
+debug('Unsuppported type:');
+input.type = 'text';
+shouldBe('input.valueAsDate', 'null');
+shouldThrow('input.valueAsDate = date', 'invalidStateError');
+
+debug('');
+debug('Supported type:');
+input.type = 'month';
+input.value = '2009-12';
+var valueAsDate = input.valueAsDate;
+shouldBeTrue('valueAsDate != null');
+shouldBe('typeof valueAsDate', '&quot;object&quot;');
+shouldBe('valueAsDate.constructor.name', '&quot;Date&quot;');
+
+debug('Sets an Epoch Date:');
+var date = new Date();
+date.setTime(0);
+input.valueAsDate = date;
+shouldBe('input.value', '&quot;1970-01&quot;');
+shouldBe('input.valueAsDate.getTime()', '0');
+debug('Sets a number 0:');
+input.valueAsDate = 0;
+shouldBe('input.value', '&quot;1970-01&quot;');
+shouldBe('input.valueAsDate.getTime()', '0');
+debug('Sets other types:');
+shouldThrow('input.valueAsDate = null', 'invalidStateError');
+shouldThrow('input.valueAsDate = undefined', 'invalidStateError');
+shouldThrow('input.valueAsDate = document', 'invalidStateError');
+
+var successfullyParsed = true;
</ins></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/WebCore/ChangeLog        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -2,6 +2,36 @@
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin Adler.
</span><span class="cx"> 
</span><ins>+        Add support for JavaScriptCore Date binding.
+        https://bugs.webkit.org/show_bug.cgi?id=32698
+
+        This is needed for HTMLInputElement::valueAsDate and
+        HTMLTimeElement::valueAsDate.
+
+        A Date instance is mapped to a double value in C++.
+        - If null or undefined is set to a JavaScript property, C++ setter
+          function receives NaN.
+        - If a getter C++ function returns NaN or infinity, a JavaScript
+          property returns null.
+
+        Test: fast/forms/input-valueasdate.html
+
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::jsDateOrNull): Implement the above.
+        (WebCore::valueToDate): ditto.
+        * bindings/js/JSDOMBinding.h: Declare them.
+        * bindings/scripts/CodeGeneratorJS.pm: Produce jsDateOrNull() or
+          valueToDate() for Date type.
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::valueAsDate): Temporal implementation.
+        (WebCore::HTMLInputElement::setValueAsDate): ditto.
+        * html/HTMLInputElement.h:
+        * html/HTMLInputElement.idl: Declare valueAsDate.
+
+2009-12-20  Kent Tamura  &lt;tkent@chromium.org&gt;
+
+        Reviewed by Darin Adler.
+
</ins><span class="cx">         Introduce the followings:
</span><span class="cx">           - ::-webkit-inner-spin-button pseudo CSS selector
</span><span class="cx">           - ::-webkit-outer-spin-button pseudo CSS selector
</span></span></pre></div>
<a id="trunkWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/js/JSDOMBinding.cpp (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/js/JSDOMBinding.cpp        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/WebCore/bindings/js/JSDOMBinding.cpp        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -49,9 +49,11 @@
</span><span class="cx"> #include &quot;ScriptController.h&quot;
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;XMLHttpRequestException.h&quot;
</span><ins>+#include &lt;runtime/DateInstance.h&gt;
</ins><span class="cx"> #include &lt;runtime/Error.h&gt;
</span><span class="cx"> #include &lt;runtime/JSFunction.h&gt;
</span><span class="cx"> #include &lt;runtime/PrototypeFunction.h&gt;
</span><ins>+#include &lt;wtf/MathExtras.h&gt;
</ins><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG)
</span><span class="lines">@@ -596,6 +598,22 @@
</span><span class="cx">     return value.toString(exec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue jsDateOrNull(ExecState* exec, double value)
+{
+    if (!isfinite(value))
+        return jsNull();
+    return new (exec) DateInstance(exec, value);
+}
+
+double valueToDate(ExecState* exec, JSValue value)
+{
+    if (value.isNumber())
+        return value.uncheckedGetNumber();
+    if (!value.inherits(&amp;DateInstance::info))
+        return std::numeric_limits&lt;double&gt;::quiet_NaN();
+    return static_cast&lt;DateInstance*&gt;(value.toObject(exec))-&gt;internalNumber();
+}
+
</ins><span class="cx"> void reportException(ExecState* exec, JSValue exception)
</span><span class="cx"> {
</span><span class="cx">     UString errorMessage = exception.toString(exec);
</span></span></pre></div>
<a id="trunkWebCorebindingsjsJSDOMBindingh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/js/JSDOMBinding.h (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/js/JSDOMBinding.h        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/WebCore/bindings/js/JSDOMBinding.h        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -356,6 +356,11 @@
</span><span class="cx">     JSC::UString valueToStringWithNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null
</span><span class="cx">     JSC::UString valueToStringWithUndefinedOrNullCheck(JSC::ExecState*, JSC::JSValue); // null if the value is null or undefined
</span><span class="cx"> 
</span><ins>+    // Returns a Date instance for the specified value, or null if the value is NaN or infinity.
+    JSC::JSValue jsDateOrNull(JSC::ExecState*, double);
+    // NaN if the value can't be converted to a date.
+    double valueToDate(JSC::ExecState*, JSC::JSValue);
+
</ins><span class="cx">     // FIXME: These are a stop-gap until all toJS calls can be converted to pass a globalObject
</span><span class="cx">     template &lt;typename T&gt;
</span><span class="cx">     inline JSC::JSValue toJS(JSC::ExecState* exec, T* ptr)
</span></span></pre></div>
<a id="trunkWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -187,6 +187,8 @@
</span><span class="cx">     # reorganization, we won't need these special cases.
</span><span class="cx">     if ($codeGenerator-&gt;IsPrimitiveType($type) or AvoidInclusionOfType($type)
</span><span class="cx">         or $type eq &quot;DOMString&quot; or $type eq &quot;DOMObject&quot; or $type eq &quot;Array&quot;) {
</span><ins>+    } elsif ($type eq &quot;Date&quot;) {
+        $implIncludes{&quot;&lt;runtime/DateInstance.h&gt;&quot;} = 1;
</ins><span class="cx">     } elsif ($type =~ /SVGPathSeg/) {
</span><span class="cx">         $joinedName = $type;
</span><span class="cx">         $joinedName =~ s/Abs|Rel//;
</span><span class="lines">@@ -1863,6 +1865,7 @@
</span><span class="cx">     return &quot;$value.toFloat(exec)&quot; if $type eq &quot;float&quot; or $type eq &quot;SVGNumber&quot;;
</span><span class="cx">     return &quot;$value.toInt32(exec)&quot; if $type eq &quot;unsigned long&quot; or $type eq &quot;long&quot; or $type eq &quot;unsigned short&quot;;
</span><span class="cx"> 
</span><ins>+    return &quot;valueToDate(exec, $value)&quot; if $type eq &quot;Date&quot;;
</ins><span class="cx">     return &quot;static_cast&lt;Range::CompareHow&gt;($value.toInt32(exec))&quot; if $type eq &quot;CompareHow&quot;;
</span><span class="cx">     return &quot;static_cast&lt;SVGPaint::SVGPaintType&gt;($value.toInt32(exec))&quot; if $type eq &quot;SVGPaintType&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -1987,6 +1990,9 @@
</span><span class="cx">     } elsif ($type eq &quot;SerializedScriptValue&quot;) {
</span><span class="cx">         $implIncludes{&quot;$type.h&quot;} = 1;
</span><span class="cx">         return &quot;$value-&gt;deserialize(exec)&quot;;
</span><ins>+    } elsif ($type eq &quot;Date&quot;) {
+        $implIncludes{&quot;&lt;runtime/DateInstance.h&gt;&quot;} = 1;
+        return &quot;jsDateOrNull(exec, $value)&quot;;
</ins><span class="cx">     } else {
</span><span class="cx">         # Default, include header with same name.
</span><span class="cx">         $implIncludes{&quot;JS$type.h&quot;} = 1;
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLInputElement.cpp (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLInputElement.cpp        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/WebCore/html/HTMLInputElement.cpp        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -1374,6 +1374,24 @@
</span><span class="cx">     updateValidity();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+double HTMLInputElement::valueAsDate() const
+{
+    // FIXME: This is a temporary implementation to check Date binding.
+    if (inputType() == MONTH)
+        return 0.0;
+    return std::numeric_limits&lt;double&gt;::quiet_NaN();
+}
+
+void HTMLInputElement::setValueAsDate(double value, ExceptionCode&amp; ec)
+{
+    // FIXME: This is a temporary implementation to check Date binding.
+    if (!isnan(value) &amp;&amp; !isinf(value) &amp;&amp; inputType() == MONTH) {
+        setValue(String(&quot;1970-01&quot;));
+        return;
+    }
+    ec = INVALID_STATE_ERR;
+}
+
</ins><span class="cx"> String HTMLInputElement::placeholder() const
</span><span class="cx"> {
</span><span class="cx">     return getAttribute(placeholderAttr).string();
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLInputElement.h (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLInputElement.h        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/WebCore/html/HTMLInputElement.h        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -144,6 +144,9 @@
</span><span class="cx">     virtual void setValue(const String&amp;, bool sendChangeEvent = false);
</span><span class="cx">     virtual void setValueForUser(const String&amp;);
</span><span class="cx"> 
</span><ins>+    double valueAsDate() const;
+    void setValueAsDate(double, ExceptionCode&amp;);
+
</ins><span class="cx">     virtual String placeholder() const;
</span><span class="cx">     virtual void setPlaceholder(const String&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorehtmlHTMLInputElementidl"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/html/HTMLInputElement.idl (52433 => 52434)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/html/HTMLInputElement.idl        2009-12-21 06:16:28 UTC (rev 52433)
+++ trunk/WebCore/html/HTMLInputElement.idl        2009-12-21 06:20:29 UTC (rev 52434)
</span><span class="lines">@@ -67,6 +67,10 @@
</span><span class="cx">                  attribute [ConvertNullToNullString, JSCCustomGetter] DOMString type; // readonly dropped as part of DOM level 2
</span><span class="cx">                  attribute [ConvertNullToNullString] DOMString useMap;
</span><span class="cx">                  attribute [ConvertNullToNullString] DOMString value;
</span><ins>+#if defined(LANGUAGE_JAVASCRIPT) &amp;&amp; LANGUAGE_JAVASCRIPT &amp;&amp; !(defined(V8_BINDING) &amp;&amp; V8_BINDING)
+                 // FIXME: Add Date support for V8, Objective-C, and COM.
+                 attribute Date            valueAsDate setter raises(DOMException);
+#endif
</ins><span class="cx"> #if defined(ENABLE_DATALIST) &amp;&amp; ENABLE_DATALIST
</span><span class="cx">         readonly attribute HTMLOptionElement selectedOption;
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>