<!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>[205912] 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/205912">205912</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-09-14 09:56:06 -0700 (Wed, 14 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>input.type cannot be set to &quot;file&quot; after being set to another type
https://bugs.webkit.org/show_bug.cgi?id=161943

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

Rebaseline a couple of W3C tests now that more checks are passing.

* web-platform-tests/html/dom/reflection-forms-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:

Source/WebCore:

input.type cannot be set to &quot;file&quot; after being set to another type.
This behavior does not match the HTML specification or the behavior
of Firefox and Chrome. This patch drops this restriction and aligns
our behavior with other browsers.

Test: fast/dom/HTMLInputElement/input-type-change-to-file.html

* html/FileInputType.cpp:
(WebCore::FileInputType::canChangeFromAnotherType): Deleted.
* html/FileInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* html/InputType.cpp:
(WebCore::InputType::canChangeFromAnotherType): Deleted.
* html/InputType.h:

LayoutTests:

* fast/dom/HTMLInputElement/input-type-change-to-file-expected.txt: Added.
* fast/dom/HTMLInputElement/input-type-change-to-file.html: Added.
* fast/dom/HTMLInputElement/input-type-file-security-expected.txt: Added
* fast/dom/HTMLInputElement/input-type-file-security.html: Added
Add layout test coverage. I have verified that these tests are passing in both
Firefox and Chrome.

* fast/forms/input-type-change3-expected.txt:
* fast/forms/input-type-change3.html:
* fast/forms/input-valueasnumber-unsupported-expected.txt:
* fast/forms/input-valueasnumber-unsupported.html:
Update existing tests to reflect behavior change.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastformsinputtypechange3expectedtxt">trunk/LayoutTests/fast/forms/input-type-change3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsinputtypechange3html">trunk/LayoutTests/fast/forms/input-type-change3.html</a></li>
<li><a href="#trunkLayoutTestsfastformsinputvalueasnumberunsupportedexpectedtxt">trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsinputvalueasnumberunsupportedhtml">trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldomreflectionformsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsformstheinputelementtypechangestateexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmldomreflectionformsexpectedtxt">trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmlsemanticsformstheinputelementtypechangestateexpectedtxt">trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlFileInputTypecpp">trunk/Source/WebCore/html/FileInputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlFileInputTypeh">trunk/Source/WebCore/html/FileInputType.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlInputTypecpp">trunk/Source/WebCore/html/InputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlInputTypeh">trunk/Source/WebCore/html/InputType.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomHTMLInputElementinputtypechangetofileexpectedtxt">trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLInputElementinputtypechangetofilehtml">trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file.html</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLInputElementinputtypefilesecurityexpectedtxt">trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLInputElementinputtypefilesecurityhtml">trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/ChangeLog        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        input.type cannot be set to &quot;file&quot; after being set to another type
+        https://bugs.webkit.org/show_bug.cgi?id=161943
+
+        Reviewed by Daniel Bates.
+
+        * fast/dom/HTMLInputElement/input-type-change-to-file-expected.txt: Added.
+        * fast/dom/HTMLInputElement/input-type-change-to-file.html: Added.
+        * fast/dom/HTMLInputElement/input-type-file-security-expected.txt: Added
+        * fast/dom/HTMLInputElement/input-type-file-security.html: Added
+        Add layout test coverage. I have verified that these tests are passing in both
+        Firefox and Chrome.
+
+        * fast/forms/input-type-change3-expected.txt:
+        * fast/forms/input-type-change3.html:
+        * fast/forms/input-valueasnumber-unsupported-expected.txt:
+        * fast/forms/input-valueasnumber-unsupported.html:
+        Update existing tests to reflect behavior change.
+
</ins><span class="cx"> 2016-09-14  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rebaseline tests added with r205905 for ios-simulator.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLInputElementinputtypechangetofileexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file-expected.txt (0 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+Tests that the input type can be set to 'file' after having been set to another type
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS input.type is &quot;text&quot;
+PASS input.getAttribute('type') is null
+input.setAttribute('type', 'radio')
+PASS input.type is &quot;radio&quot;
+PASS input.getAttribute('type') is &quot;radio&quot;
+input.setAttribute('type', 'file')
+PASS input.type is &quot;file&quot;
+PASS input.getAttribute('type') is &quot;file&quot;
+input.type = 'radio'
+PASS input.type is &quot;radio&quot;
+PASS input.getAttribute('type') is &quot;radio&quot;
+input.type = 'file'
+PASS input.type is &quot;file&quot;
+PASS input.getAttribute('type') is &quot;file&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLInputElementinputtypechangetofilehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file.html (0 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-change-to-file.html        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Tests that the input type can be set to 'file' after having been set to another type&quot;);
+
+var input = document.createElement(&quot;input&quot;);
+shouldBeEqualToString(&quot;input.type&quot;, &quot;text&quot;);
+shouldBeNull(&quot;input.getAttribute('type')&quot;);
+
+evalAndLog(&quot;input.setAttribute('type', 'radio')&quot;);
+shouldBeEqualToString(&quot;input.type&quot;, &quot;radio&quot;);
+shouldBeEqualToString(&quot;input.getAttribute('type')&quot;, &quot;radio&quot;);
+
+evalAndLog(&quot;input.setAttribute('type', 'file')&quot;);
+shouldBeEqualToString(&quot;input.type&quot;, &quot;file&quot;);
+shouldBeEqualToString(&quot;input.getAttribute('type')&quot;, &quot;file&quot;);
+
+evalAndLog(&quot;input.type = 'radio'&quot;);
+shouldBeEqualToString(&quot;input.type&quot;, &quot;radio&quot;);
+shouldBeEqualToString(&quot;input.getAttribute('type')&quot;, &quot;radio&quot;);
+
+evalAndLog(&quot;input.type = 'file'&quot;);
+shouldBeEqualToString(&quot;input.type&quot;, &quot;file&quot;);
+shouldBeEqualToString(&quot;input.getAttribute('type')&quot;, &quot;file&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLInputElementinputtypefilesecurityexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security-expected.txt (0 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -0,0 +1,15 @@
</span><ins>+Tests that input.value is properly reset when changing the input type to 'file'.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS input.type is &quot;text&quot;
+input.value = '/etc/hosts'
+PASS input.value is &quot;/etc/hosts&quot;
+input.type = 'file'
+PASS input.value is &quot;&quot;
+PASS input.getAttribute('value') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLInputElementinputtypefilesecurityhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security.html (0 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLInputElement/input-type-file-security.html        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Tests that input.value is properly reset when changing the input type to 'file'.&quot;);
+
+var input = document.createElement(&quot;input&quot;);
+shouldBeEqualToString(&quot;input.type&quot;, &quot;text&quot;);
+evalAndLog(&quot;input.value = '/etc/hosts'&quot;);
+shouldBeEqualToString(&quot;input.value&quot;, &quot;/etc/hosts&quot;);
+
+evalAndLog(&quot;input.type = 'file'&quot;);
+// Make sure that input.value is properly reset.
+shouldBeEqualToString(&quot;input.value&quot;, &quot;&quot;);
+shouldBeNull(&quot;input.getAttribute('value')&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastformsinputtypechange3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/input-type-change3-expected.txt (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-type-change3-expected.txt        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/fast/forms/input-type-change3-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> PASS input.type for &quot; button &quot; is correctly &quot;text&quot;.
</span><span class="cx"> PASS input.type for &quot;checkbox&quot; is correctly &quot;checkbox&quot;.
</span><span class="cx"> PASS input.type for &quot;email&quot; is correctly &quot;email&quot;.
</span><del>-PASS input.type for &quot;file&quot; is correctly &quot;email&quot;.
</del><ins>+PASS input.type for &quot;file&quot; is correctly &quot;file&quot;.
</ins><span class="cx"> PASS input.type for &quot;hidden&quot; is correctly &quot;hidden&quot;.
</span><span class="cx"> PASS input.type for &quot;image&quot; is correctly &quot;image&quot;.
</span><span class="cx"> PASS input.type for &quot;isindex&quot; is correctly &quot;text&quot;.
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsinputtypechange3html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/input-type-change3.html (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-type-change3.html        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/fast/forms/input-type-change3.html        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> check(&quot; button &quot;, &quot;text&quot;);
</span><span class="cx"> check(&quot;checkbox&quot;, &quot;checkbox&quot;);
</span><span class="cx"> check(&quot;email&quot;, &quot;email&quot;);
</span><del>-check(&quot;file&quot;, &quot;email&quot;); // We can't change a concrete type to file for a security reason.
</del><ins>+check(&quot;file&quot;, &quot;file&quot;);
</ins><span class="cx"> check(&quot;hidden&quot;, &quot;hidden&quot;);
</span><span class="cx"> check(&quot;image&quot;, &quot;image&quot;);
</span><span class="cx"> check(&quot;isindex&quot;, &quot;text&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsinputvalueasnumberunsupportedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported-expected.txt (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported-expected.txt        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -15,9 +15,6 @@
</span><span class="cx"> Check for type=email
</span><span class="cx"> PASS input.valueAsNumber is Number.NaN
</span><span class="cx"> PASS input.valueAsNumber = 0 threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
</span><del>-Check for type=file
-PASS input.valueAsNumber is Number.NaN
-PASS input.valueAsNumber = 0 threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
</del><span class="cx"> Check for type=hidden
</span><span class="cx"> PASS input.valueAsNumber is Number.NaN
</span><span class="cx"> PASS input.valueAsNumber = 0 threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsinputvalueasnumberunsupportedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported.html (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported.html        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/fast/forms/input-valueasnumber-unsupported.html        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -25,7 +25,6 @@
</span><span class="cx"> checkValueAsNumber('checkbox');
</span><span class="cx"> checkValueAsNumber('color');
</span><span class="cx"> checkValueAsNumber('email');
</span><del>-checkValueAsNumber('file');
</del><span class="cx"> checkValueAsNumber('hidden');
</span><span class="cx"> checkValueAsNumber('image');
</span><span class="cx"> checkValueAsNumber('khtml_isindex');
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        input.type cannot be set to &quot;file&quot; after being set to another type
+        https://bugs.webkit.org/show_bug.cgi?id=161943
+
+        Reviewed by Daniel Bates.
+
+        Rebaseline a couple of W3C tests now that more checks are passing.
+
+        * web-platform-tests/html/dom/reflection-forms-expected.txt:
+        * web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt:
+
</ins><span class="cx"> 2016-09-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Implement URLSearchParams
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldomreflectionformsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -6649,8 +6649,8 @@
</span><span class="cx"> PASS input.type: setAttribute() to &quot;adio&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;RADIO&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;RADIO&quot; followed by IDL get 
</span><del>-FAIL input.type: setAttribute() to &quot;file&quot; followed by getAttribute() assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
-FAIL input.type: setAttribute() to &quot;file&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
</del><ins>+PASS input.type: setAttribute() to &quot;file&quot; followed by getAttribute() 
+PASS input.type: setAttribute() to &quot;file&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: setAttribute() to &quot;xfile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;xfile&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;file\0&quot; followed by getAttribute() 
</span><span class="lines">@@ -6657,8 +6657,8 @@
</span><span class="cx"> PASS input.type: setAttribute() to &quot;file\0&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;ile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;ile&quot; followed by IDL get 
</span><del>-FAIL input.type: setAttribute() to &quot;FILE&quot; followed by getAttribute() assert_equals: expected &quot;FILE&quot; but got &quot;text&quot;
-FAIL input.type: setAttribute() to &quot;FILE&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;text&quot;
</del><ins>+PASS input.type: setAttribute() to &quot;FILE&quot; followed by getAttribute() 
+PASS input.type: setAttribute() to &quot;FILE&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: setAttribute() to &quot;submit&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;submit&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;xsubmit&quot; followed by getAttribute() 
</span><span class="lines">@@ -7014,8 +7014,8 @@
</span><span class="cx"> PASS input.type: IDL set to &quot;RADIO&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;RADIO&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: IDL set to &quot;file&quot; should not throw 
</span><del>-FAIL input.type: IDL set to &quot;file&quot; followed by getAttribute() assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
-FAIL input.type: IDL set to &quot;file&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
</del><ins>+PASS input.type: IDL set to &quot;file&quot; followed by getAttribute() 
+PASS input.type: IDL set to &quot;file&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: IDL set to &quot;xfile&quot; should not throw 
</span><span class="cx"> PASS input.type: IDL set to &quot;xfile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;xfile&quot; followed by IDL get 
</span><span class="lines">@@ -7026,8 +7026,8 @@
</span><span class="cx"> PASS input.type: IDL set to &quot;ile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;ile&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: IDL set to &quot;FILE&quot; should not throw 
</span><del>-FAIL input.type: IDL set to &quot;FILE&quot; followed by getAttribute() assert_equals: expected &quot;FILE&quot; but got &quot;text&quot;
-FAIL input.type: IDL set to &quot;FILE&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;text&quot;
</del><ins>+PASS input.type: IDL set to &quot;FILE&quot; followed by getAttribute() 
+PASS input.type: IDL set to &quot;FILE&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: IDL set to &quot;submit&quot; should not throw 
</span><span class="cx"> PASS input.type: IDL set to &quot;submit&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;submit&quot; followed by IDL get 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsformstheinputelementtypechangestateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> PASS change state from hidden to color 
</span><span class="cx"> PASS change state from hidden to checkbox 
</span><span class="cx"> PASS change state from hidden to radio 
</span><del>-FAIL change state from hidden to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from hidden to file 
</ins><span class="cx"> PASS change state from hidden to submit 
</span><span class="cx"> PASS change state from hidden to image 
</span><span class="cx"> PASS change state from hidden to reset 
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> PASS change state from text to color 
</span><span class="cx"> FAIL change state from text to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from text to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from text to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from text to file 
</ins><span class="cx"> FAIL change state from text to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from text to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from text to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> PASS change state from search to color 
</span><span class="cx"> FAIL change state from search to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from search to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from search to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from search to file 
</ins><span class="cx"> FAIL change state from search to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from search to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from search to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> PASS change state from tel to color 
</span><span class="cx"> FAIL change state from tel to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from tel to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from tel to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from tel to file 
</ins><span class="cx"> FAIL change state from tel to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from tel to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from tel to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> PASS change state from url to color 
</span><span class="cx"> FAIL change state from url to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from url to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><del>-FAIL change state from url to file assert_equals: expected &quot;&quot; but got &quot;foobar&quot;
</del><ins>+PASS change state from url to file 
</ins><span class="cx"> FAIL change state from url to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from url to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from url to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> PASS change state from email to color 
</span><span class="cx"> FAIL change state from email to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from email to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><del>-FAIL change state from email to file assert_equals: expected &quot;&quot; but got &quot;foobar&quot;
</del><ins>+PASS change state from email to file 
</ins><span class="cx"> FAIL change state from email to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from email to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from email to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> PASS change state from password to color 
</span><span class="cx"> FAIL change state from password to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from password to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from password to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from password to file 
</ins><span class="cx"> FAIL change state from password to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from password to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from password to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx"> PASS change state from datetime to color 
</span><span class="cx"> FAIL change state from datetime to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from datetime to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from datetime to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from datetime to file 
</ins><span class="cx"> FAIL change state from datetime to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from datetime to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from datetime to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> PASS change state from date to color 
</span><span class="cx"> FAIL change state from date to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from date to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from date to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from date to file 
</ins><span class="cx"> FAIL change state from date to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from date to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from date to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> PASS change state from month to color 
</span><span class="cx"> FAIL change state from month to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from month to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from month to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from month to file 
</ins><span class="cx"> FAIL change state from month to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from month to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from month to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -225,7 +225,7 @@
</span><span class="cx"> PASS change state from week to color 
</span><span class="cx"> FAIL change state from week to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from week to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from week to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from week to file 
</ins><span class="cx"> FAIL change state from week to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from week to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from week to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx"> PASS change state from time to color 
</span><span class="cx"> FAIL change state from time to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from time to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from time to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from time to file 
</ins><span class="cx"> FAIL change state from time to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from time to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from time to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx"> PASS change state from range to color 
</span><span class="cx"> FAIL change state from range to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="cx"> FAIL change state from range to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><del>-FAIL change state from range to file assert_equals: expected &quot;&quot; but got &quot;50&quot;
</del><ins>+PASS change state from range to file 
</ins><span class="cx"> FAIL change state from range to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="cx"> FAIL change state from range to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="cx"> FAIL change state from range to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="lines">@@ -309,7 +309,7 @@
</span><span class="cx"> PASS change state from color to range 
</span><span class="cx"> FAIL change state from color to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;#000000&quot;
</span><span class="cx"> FAIL change state from color to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;#000000&quot;
</span><del>-FAIL change state from color to file assert_equals: expected &quot;&quot; but got &quot;#000000&quot;
</del><ins>+PASS change state from color to file 
</ins><span class="cx"> FAIL change state from color to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;#000000&quot;
</span><span class="cx"> FAIL change state from color to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;#000000&quot;
</span><span class="cx"> FAIL change state from color to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;#000000&quot;
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx"> PASS change state from checkbox to range 
</span><span class="cx"> PASS change state from checkbox to color 
</span><span class="cx"> PASS change state from checkbox to radio 
</span><del>-FAIL change state from checkbox to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from checkbox to file 
</ins><span class="cx"> PASS change state from checkbox to submit 
</span><span class="cx"> PASS change state from checkbox to image 
</span><span class="cx"> PASS change state from checkbox to reset 
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx"> PASS change state from radio to range 
</span><span class="cx"> PASS change state from radio to color 
</span><span class="cx"> PASS change state from radio to checkbox 
</span><del>-FAIL change state from radio to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from radio to file 
</ins><span class="cx"> PASS change state from radio to submit 
</span><span class="cx"> PASS change state from radio to image 
</span><span class="cx"> PASS change state from radio to reset 
</span><span class="lines">@@ -394,7 +394,7 @@
</span><span class="cx"> PASS change state from submit to color 
</span><span class="cx"> PASS change state from submit to checkbox 
</span><span class="cx"> PASS change state from submit to radio 
</span><del>-FAIL change state from submit to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from submit to file 
</ins><span class="cx"> PASS change state from submit to image 
</span><span class="cx"> PASS change state from submit to reset 
</span><span class="cx"> PASS change state from submit to button 
</span><span class="lines">@@ -415,7 +415,7 @@
</span><span class="cx"> PASS change state from image to color 
</span><span class="cx"> PASS change state from image to checkbox 
</span><span class="cx"> PASS change state from image to radio 
</span><del>-FAIL change state from image to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from image to file 
</ins><span class="cx"> PASS change state from image to submit 
</span><span class="cx"> PASS change state from image to reset 
</span><span class="cx"> PASS change state from image to button 
</span><span class="lines">@@ -436,7 +436,7 @@
</span><span class="cx"> PASS change state from reset to color 
</span><span class="cx"> PASS change state from reset to checkbox 
</span><span class="cx"> PASS change state from reset to radio 
</span><del>-FAIL change state from reset to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from reset to file 
</ins><span class="cx"> PASS change state from reset to submit 
</span><span class="cx"> PASS change state from reset to image 
</span><span class="cx"> PASS change state from reset to button 
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx"> PASS change state from button to color 
</span><span class="cx"> PASS change state from button to checkbox 
</span><span class="cx"> PASS change state from button to radio 
</span><del>-FAIL change state from button to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from button to file 
</ins><span class="cx"> PASS change state from button to submit 
</span><span class="cx"> PASS change state from button to image 
</span><span class="cx"> PASS change state from button to reset 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmldomreflectionformsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -6649,8 +6649,8 @@
</span><span class="cx"> PASS input.type: setAttribute() to &quot;adio&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;RADIO&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;RADIO&quot; followed by IDL get 
</span><del>-FAIL input.type: setAttribute() to &quot;file&quot; followed by getAttribute() assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
-FAIL input.type: setAttribute() to &quot;file&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
</del><ins>+PASS input.type: setAttribute() to &quot;file&quot; followed by getAttribute() 
+PASS input.type: setAttribute() to &quot;file&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: setAttribute() to &quot;xfile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;xfile&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;file\0&quot; followed by getAttribute() 
</span><span class="lines">@@ -6657,8 +6657,8 @@
</span><span class="cx"> PASS input.type: setAttribute() to &quot;file\0&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;ile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;ile&quot; followed by IDL get 
</span><del>-FAIL input.type: setAttribute() to &quot;FILE&quot; followed by getAttribute() assert_equals: expected &quot;FILE&quot; but got &quot;text&quot;
-FAIL input.type: setAttribute() to &quot;FILE&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;text&quot;
</del><ins>+PASS input.type: setAttribute() to &quot;FILE&quot; followed by getAttribute() 
+PASS input.type: setAttribute() to &quot;FILE&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: setAttribute() to &quot;submit&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;submit&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: setAttribute() to &quot;xsubmit&quot; followed by getAttribute() 
</span><span class="lines">@@ -7014,8 +7014,8 @@
</span><span class="cx"> PASS input.type: IDL set to &quot;RADIO&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;RADIO&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: IDL set to &quot;file&quot; should not throw 
</span><del>-FAIL input.type: IDL set to &quot;file&quot; followed by getAttribute() assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
-FAIL input.type: IDL set to &quot;file&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;radio&quot;
</del><ins>+PASS input.type: IDL set to &quot;file&quot; followed by getAttribute() 
+PASS input.type: IDL set to &quot;file&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: IDL set to &quot;xfile&quot; should not throw 
</span><span class="cx"> PASS input.type: IDL set to &quot;xfile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;xfile&quot; followed by IDL get 
</span><span class="lines">@@ -7026,8 +7026,8 @@
</span><span class="cx"> PASS input.type: IDL set to &quot;ile&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;ile&quot; followed by IDL get 
</span><span class="cx"> PASS input.type: IDL set to &quot;FILE&quot; should not throw 
</span><del>-FAIL input.type: IDL set to &quot;FILE&quot; followed by getAttribute() assert_equals: expected &quot;FILE&quot; but got &quot;text&quot;
-FAIL input.type: IDL set to &quot;FILE&quot; followed by IDL get assert_equals: expected &quot;file&quot; but got &quot;text&quot;
</del><ins>+PASS input.type: IDL set to &quot;FILE&quot; followed by getAttribute() 
+PASS input.type: IDL set to &quot;FILE&quot; followed by IDL get 
</ins><span class="cx"> PASS input.type: IDL set to &quot;submit&quot; should not throw 
</span><span class="cx"> PASS input.type: IDL set to &quot;submit&quot; followed by getAttribute() 
</span><span class="cx"> PASS input.type: IDL set to &quot;submit&quot; followed by IDL get 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmlsemanticsformstheinputelementtypechangestateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/type-change-state-expected.txt        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> FAIL change state from hidden to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> PASS change state from hidden to checkbox 
</span><span class="cx"> PASS change state from hidden to radio 
</span><del>-FAIL change state from hidden to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from hidden to file 
</ins><span class="cx"> PASS change state from hidden to submit 
</span><span class="cx"> PASS change state from hidden to image 
</span><span class="cx"> PASS change state from hidden to reset 
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> FAIL change state from text to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from text to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from text to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from text to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from text to file 
</ins><span class="cx"> FAIL change state from text to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from text to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from text to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> FAIL change state from search to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from search to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from search to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from search to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from search to file 
</ins><span class="cx"> FAIL change state from search to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from search to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from search to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> FAIL change state from tel to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from tel to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from tel to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from tel to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from tel to file 
</ins><span class="cx"> FAIL change state from tel to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from tel to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from tel to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> FAIL change state from url to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from url to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from url to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><del>-FAIL change state from url to file assert_equals: expected &quot;&quot; but got &quot;foobar&quot;
</del><ins>+PASS change state from url to file 
</ins><span class="cx"> FAIL change state from url to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from url to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from url to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> FAIL change state from email to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from email to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from email to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><del>-FAIL change state from email to file assert_equals: expected &quot;&quot; but got &quot;foobar&quot;
</del><ins>+PASS change state from email to file 
</ins><span class="cx"> FAIL change state from email to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from email to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="cx"> FAIL change state from email to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;foobar&quot;
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx"> FAIL change state from password to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from password to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from password to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from password to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from password to file 
</ins><span class="cx"> FAIL change state from password to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from password to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from password to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx"> FAIL change state from datetime to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from datetime to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from datetime to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from datetime to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from datetime to file 
</ins><span class="cx"> FAIL change state from datetime to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from datetime to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from datetime to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx"> FAIL change state from range to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;50&quot;
</span><span class="cx"> FAIL change state from range to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="cx"> FAIL change state from range to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><del>-FAIL change state from range to file assert_equals: expected &quot;&quot; but got &quot;50&quot;
</del><ins>+PASS change state from range to file 
</ins><span class="cx"> FAIL change state from range to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="cx"> FAIL change state from range to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="cx"> FAIL change state from range to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;50&quot;
</span><span class="lines">@@ -309,7 +309,7 @@
</span><span class="cx"> PASS change state from color to range 
</span><span class="cx"> FAIL change state from color to checkbox assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from color to radio assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><del>-FAIL change state from color to file assert_equals: expected &quot;&quot; but got &quot;  foobar  &quot;
</del><ins>+PASS change state from color to file 
</ins><span class="cx"> FAIL change state from color to submit assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from color to image assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="cx"> FAIL change state from color to reset assert_equals: input.value should be '  foo\rbar  ' after change of state expected &quot;  foo\rbar  &quot; but got &quot;  foobar  &quot;
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx"> PASS change state from checkbox to range 
</span><span class="cx"> FAIL change state from checkbox to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> PASS change state from checkbox to radio 
</span><del>-FAIL change state from checkbox to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from checkbox to file 
</ins><span class="cx"> PASS change state from checkbox to submit 
</span><span class="cx"> PASS change state from checkbox to image 
</span><span class="cx"> PASS change state from checkbox to reset 
</span><span class="lines">@@ -351,7 +351,7 @@
</span><span class="cx"> PASS change state from radio to range 
</span><span class="cx"> FAIL change state from radio to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> PASS change state from radio to checkbox 
</span><del>-FAIL change state from radio to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from radio to file 
</ins><span class="cx"> PASS change state from radio to submit 
</span><span class="cx"> PASS change state from radio to image 
</span><span class="cx"> PASS change state from radio to reset 
</span><span class="lines">@@ -394,7 +394,7 @@
</span><span class="cx"> FAIL change state from submit to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> PASS change state from submit to checkbox 
</span><span class="cx"> PASS change state from submit to radio 
</span><del>-FAIL change state from submit to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from submit to file 
</ins><span class="cx"> PASS change state from submit to image 
</span><span class="cx"> PASS change state from submit to reset 
</span><span class="cx"> PASS change state from submit to button 
</span><span class="lines">@@ -415,7 +415,7 @@
</span><span class="cx"> FAIL change state from image to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> PASS change state from image to checkbox 
</span><span class="cx"> PASS change state from image to radio 
</span><del>-FAIL change state from image to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from image to file 
</ins><span class="cx"> PASS change state from image to submit 
</span><span class="cx"> PASS change state from image to reset 
</span><span class="cx"> PASS change state from image to button 
</span><span class="lines">@@ -436,7 +436,7 @@
</span><span class="cx"> FAIL change state from reset to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> PASS change state from reset to checkbox 
</span><span class="cx"> PASS change state from reset to radio 
</span><del>-FAIL change state from reset to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from reset to file 
</ins><span class="cx"> PASS change state from reset to submit 
</span><span class="cx"> PASS change state from reset to image 
</span><span class="cx"> PASS change state from reset to button 
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx"> FAIL change state from button to color assert_equals: input.value should be #000000 after change of state expected &quot;#000000&quot; but got &quot;  foobar  &quot;
</span><span class="cx"> PASS change state from button to checkbox 
</span><span class="cx"> PASS change state from button to radio 
</span><del>-FAIL change state from button to file assert_equals: expected &quot;&quot; but got &quot;  foo\rbar  &quot;
</del><ins>+PASS change state from button to file 
</ins><span class="cx"> PASS change state from button to submit 
</span><span class="cx"> PASS change state from button to image 
</span><span class="cx"> PASS change state from button to reset 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/Source/WebCore/ChangeLog        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        input.type cannot be set to &quot;file&quot; after being set to another type
+        https://bugs.webkit.org/show_bug.cgi?id=161943
+
+        Reviewed by Daniel Bates.
+
+        input.type cannot be set to &quot;file&quot; after being set to another type.
+        This behavior does not match the HTML specification or the behavior
+        of Firefox and Chrome. This patch drops this restriction and aligns
+        our behavior with other browsers.
+
+        Test: fast/dom/HTMLInputElement/input-type-change-to-file.html
+
+        * html/FileInputType.cpp:
+        (WebCore::FileInputType::canChangeFromAnotherType): Deleted.
+        * html/FileInputType.h:
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::updateType):
+        * html/InputType.cpp:
+        (WebCore::InputType::canChangeFromAnotherType): Deleted.
+        * html/InputType.h:
+
</ins><span class="cx"> 2016-09-14  Carlos Garnacho &lt;carlosg@gnome.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK][Wayland] Implement clipboard support
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFileInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FileInputType.cpp (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FileInputType.cpp        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/Source/WebCore/html/FileInputType.cpp        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -205,16 +205,6 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FileInputType::canChangeFromAnotherType() const
-{
-    // Don't allow the type to be changed to file after the first type change.
-    // In other engines this might mean a JavaScript programmer could set a text
-    // field's value to something like /etc/passwd and then change it to a file input.
-    // I don't think this would actually occur in WebKit, but this rule still may be
-    // important for compatibility.
-    return false;
-}
-
</del><span class="cx"> FileList* FileInputType::files()
</span><span class="cx"> {
</span><span class="cx">     return m_fileList.get();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFileInputTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FileInputType.h (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FileInputType.h        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/Source/WebCore/html/FileInputType.h        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx">     void handleDOMActivateEvent(Event&amp;) override;
</span><span class="cx">     RenderPtr&lt;RenderElement&gt; createInputRenderer(RenderStyle&amp;&amp;) override;
</span><span class="cx">     bool canSetStringValue() const override;
</span><del>-    bool canChangeFromAnotherType() const override;
</del><span class="cx">     FileList* files() override;
</span><span class="cx">     void setFiles(PassRefPtr&lt;FileList&gt;) override;
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -476,18 +476,10 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_inputType);
</span><span class="cx">     auto newType = InputType::create(*this, attributeWithoutSynchronization(typeAttr));
</span><del>-    bool hadType = m_hasType;
</del><span class="cx">     m_hasType = true;
</span><span class="cx">     if (m_inputType-&gt;formControlType() == newType-&gt;formControlType())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (hadType &amp;&amp; !newType-&gt;canChangeFromAnotherType()) {
-        // Set the attribute back to the old value.
-        // Useful in case we were called from inside parseAttribute.
-        setAttributeWithoutSynchronization(typeAttr, type());
-        return;
-    }
-
</del><span class="cx">     removeFromRadioButtonGroup();
</span><span class="cx"> 
</span><span class="cx">     bool didStoreValue = m_inputType-&gt;storesValueSeparateFromAttribute();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/InputType.cpp (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/InputType.cpp        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/Source/WebCore/html/InputType.cpp        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -623,11 +623,6 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InputType::canChangeFromAnotherType() const
-{
-    return true;
-}
-
</del><span class="cx"> void InputType::minOrMaxAttributeChanged()
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlInputTypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/InputType.h (205911 => 205912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/InputType.h        2016-09-14 16:55:15 UTC (rev 205911)
+++ trunk/Source/WebCore/html/InputType.h        2016-09-14 16:56:06 UTC (rev 205912)
</span><span class="lines">@@ -82,7 +82,6 @@
</span><span class="cx">     static bool themeSupportsDataListUI(InputType*);
</span><span class="cx"> 
</span><span class="cx">     virtual const AtomicString&amp; formControlType() const = 0;
</span><del>-    virtual bool canChangeFromAnotherType() const;
</del><span class="cx"> 
</span><span class="cx">     // Type query functions.
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>