<!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>[191268] 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/191268">191268</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-10-18 16:41:02 -0700 (Sun, 18 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebKit must support all JavaScript MIME types in HTML5 spec
https://bugs.webkit.org/show_bug.cgi?id=148854
&lt;rdar://problem/22588195&gt;

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C HTML test now that more checks are passing.

* web-platform-tests/html/semantics/scripting-1/the-script-element/script-languages-02-expected.txt:

Source/WebCore:

WebKit did not execute certain EcmaScript MIME types although the HTML
specification says all user agents should support those:
https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type

In particular, the following MIME types are now recognized as valid and
executed: &quot;application/x-ecmascript&quot;, &quot;text/javascript1.0&quot;,
&quot;text/javascript1.4&quot;, &quot;text/javascript1.5&quot;, &quot;text/x-javascript&quot;,
&quot;text/x-ecmascript&quot;.

The new behavior is consistent with Firefox.

No new tests, already covered by existing test.

* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedJavaScriptMIMETypes):

LayoutTests:

Rebaseline several existing layout tests now that we execute
more JS MIME types.

* fast/html/script-allowed-types-languages-expected.txt:
* fast/tokenizer/004-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasthtmlscriptallowedtypeslanguagesexpectedtxt">trunk/LayoutTests/fast/html/script-allowed-types-languages-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttokenizer004expectedtxt">trunk/LayoutTests/fast/tokenizer/004-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsscripting1thescriptelementscriptlanguages02expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-languages-02-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformMIMETypeRegistrycpp">trunk/Source/WebCore/platform/MIMETypeRegistry.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191267 => 191268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-18 23:39:20 UTC (rev 191267)
+++ trunk/LayoutTests/ChangeLog        2015-10-18 23:41:02 UTC (rev 191268)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-10-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        WebKit must support all JavaScript MIME types in HTML5 spec
+        https://bugs.webkit.org/show_bug.cgi?id=148854
+        &lt;rdar://problem/22588195&gt;
+
+        Reviewed by Darin Adler.
+
+        Rebaseline several existing layout tests now that we execute
+        more JS MIME types.
+
+        * fast/html/script-allowed-types-languages-expected.txt:
+        * fast/tokenizer/004-expected.txt:
+
</ins><span class="cx"> 2015-10-18  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Computed style should work correctly with slotted elements that have display:none
</span></span></pre></div>
<a id="trunkLayoutTestsfasthtmlscriptallowedtypeslanguagesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/html/script-allowed-types-languages-expected.txt (191267 => 191268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/html/script-allowed-types-languages-expected.txt        2015-10-18 23:39:20 UTC (rev 191267)
+++ trunk/LayoutTests/fast/html/script-allowed-types-languages-expected.txt        2015-10-18 23:41:02 UTC (rev 191268)
</span><span class="lines">@@ -7,9 +7,12 @@
</span><span class="cx"> Type: &quot;application/javascript&quot;, Language: unspecified
</span><span class="cx"> Type: &quot;application/ecmascript&quot;, Language: unspecified
</span><span class="cx"> Type: &quot;application/x-javascript&quot;, Language: unspecified
</span><ins>+Type: &quot;text/javascript1.0&quot;, Language: unspecified
</ins><span class="cx"> Type: &quot;text/javascript1.1&quot;, Language: unspecified
</span><span class="cx"> Type: &quot;text/javascript1.2&quot;, Language: unspecified
</span><span class="cx"> Type: &quot;text/javascript1.3&quot;, Language: unspecified
</span><ins>+Type: &quot;text/javascript1.4&quot;, Language: unspecified
+Type: &quot;text/javascript1.5&quot;, Language: unspecified
</ins><span class="cx"> Type: &quot;text/jscript&quot;, Language: unspecified
</span><span class="cx"> Type: &quot;text/livescript&quot;, Language: unspecified
</span><span class="cx"> Type: &quot;  text/javascript&quot;, Language: unspecified
</span></span></pre></div>
<a id="trunkLayoutTestsfasttokenizer004expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/tokenizer/004-expected.txt (191267 => 191268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/tokenizer/004-expected.txt        2015-10-18 23:39:20 UTC (rev 191267)
+++ trunk/LayoutTests/fast/tokenizer/004-expected.txt        2015-10-18 23:41:02 UTC (rev 191268)
</span><span class="lines">@@ -26,15 +26,15 @@
</span><span class="cx"> text/vbs
</span><span class="cx"> text/xml
</span><span class="cx"> text/javascript1
</span><del>-text/javascript1.0
-text/javascript1.4
-text/javascript1.5
</del><ins>+text/javascript1.0 executed
+text/javascript1.4 executed
+text/javascript1.5 executed
</ins><span class="cx"> text/javascript1.6
</span><span class="cx"> application/jscript
</span><span class="cx"> application/x-jscript
</span><span class="cx"> application/livescript
</span><span class="cx"> application/x-livescript
</span><del>-application/x-ecmascript
</del><ins>+application/x-ecmascript executed
</ins><span class="cx"> application/javascript1.2
</span><span class="cx"> application/x-javascript1.2
</span><span class="cx"> javascript
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (191267 => 191268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2015-10-18 23:39:20 UTC (rev 191267)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2015-10-18 23:41:02 UTC (rev 191268)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-10-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        WebKit must support all JavaScript MIME types in HTML5 spec
+        https://bugs.webkit.org/show_bug.cgi?id=148854
+        &lt;rdar://problem/22588195&gt;
+
+        Reviewed by Darin Adler.
+
+        Rebaseline W3C HTML test now that more checks are passing.
+
+        * web-platform-tests/html/semantics/scripting-1/the-script-element/script-languages-02-expected.txt:
+
</ins><span class="cx"> 2015-10-17  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         td and th should use HTMLTableDataCellElement and HTMLTableHeaderCellElement interfaces
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsscripting1thescriptelementscriptlanguages02expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-languages-02-expected.txt (191267 => 191268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-languages-02-expected.txt        2015-10-18 23:39:20 UTC (rev 191267)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-languages-02-expected.txt        2015-10-18 23:41:02 UTC (rev 191268)
</span><span class="lines">@@ -3,51 +3,51 @@
</span><span class="cx"> PASS Script shouldn't run with type=&quot; &quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;application/x-ecmascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;application/x-ecmascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;application/x-javascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;APPLICATION/ECMASCRIPT&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;APPLICATION/JAVASCRIPT&quot; 
</span><del>-FAIL Script should run with type=&quot;APPLICATION/X-ECMASCRIPT&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;APPLICATION/X-ECMASCRIPT&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;APPLICATION/X-JAVASCRIPT&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/ecmascript &quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/javascript &quot; 
</span><del>-FAIL Script should run with type=&quot;application/x-ecmascript &quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;application/x-ecmascript &quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;application/x-javascript &quot; 
</span><span class="cx"> PASS Script should run with type=&quot; application/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot; application/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot; application/x-ecmascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot; application/x-ecmascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot; application/x-javascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/ecmascript\t&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/javascript\t&quot; 
</span><del>-FAIL Script should run with type=&quot;application/x-ecmascript\t&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;application/x-ecmascript\t&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;application/x-javascript\t&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\tapplication/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\tapplication/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\tapplication/x-ecmascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\tapplication/x-ecmascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\tapplication/x-javascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/ecmascript\n&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/javascript\n&quot; 
</span><del>-FAIL Script should run with type=&quot;application/x-ecmascript\n&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;application/x-ecmascript\n&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;application/x-javascript\n&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\napplication/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\napplication/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\napplication/x-ecmascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\napplication/x-ecmascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\napplication/x-javascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/ecmascript\r&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/javascript\r&quot; 
</span><del>-FAIL Script should run with type=&quot;application/x-ecmascript\r&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;application/x-ecmascript\r&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;application/x-javascript\r&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\rapplication/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\rapplication/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\rapplication/x-ecmascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\rapplication/x-ecmascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\rapplication/x-javascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/ecmascript\f&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;application/javascript\f&quot; 
</span><del>-FAIL Script should run with type=&quot;application/x-ecmascript\f&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;application/x-ecmascript\f&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;application/x-javascript\f&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\fapplication/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\fapplication/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\fapplication/x-ecmascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\fapplication/x-ecmascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\fapplication/x-javascript&quot; 
</span><span class="cx"> PASS Script shouldn't run with type=&quot;application/ecmascript\0&quot; 
</span><span class="cx"> PASS Script shouldn't run with type=&quot;application/javascript\0&quot; 
</span><span class="lines">@@ -59,148 +59,148 @@
</span><span class="cx"> PASS Script shouldn't run with type=&quot;application/x-javascript\0foo&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.0&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.0&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/javascript1.1&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.2&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.3&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.4&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/javascript1.5&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.4&quot; 
+PASS Script should run with type=&quot;text/javascript1.5&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/jscript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/livescript&quot; 
</span><del>-FAIL Script should run with type=&quot;text/x-ecmascript&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/x-javascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/x-ecmascript&quot; 
+PASS Script should run with type=&quot;text/x-javascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;TEXT/ECMASCRIPT&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;TEXT/JAVASCRIPT&quot; 
</span><del>-FAIL Script should run with type=&quot;TEXT/JAVASCRIPT1.0&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;TEXT/JAVASCRIPT1.0&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;TEXT/JAVASCRIPT1.1&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;TEXT/JAVASCRIPT1.2&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;TEXT/JAVASCRIPT1.3&quot; 
</span><del>-FAIL Script should run with type=&quot;TEXT/JAVASCRIPT1.4&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;TEXT/JAVASCRIPT1.5&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;TEXT/JAVASCRIPT1.4&quot; 
+PASS Script should run with type=&quot;TEXT/JAVASCRIPT1.5&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;TEXT/JSCRIPT&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;TEXT/LIVESCRIPT&quot; 
</span><del>-FAIL Script should run with type=&quot;TEXT/X-ECMASCRIPT&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;TEXT/X-JAVASCRIPT&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;TEXT/X-ECMASCRIPT&quot; 
+PASS Script should run with type=&quot;TEXT/X-JAVASCRIPT&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/ecmascript &quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript &quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.0 &quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.0 &quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/javascript1.1 &quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.2 &quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.3 &quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.4 &quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/javascript1.5 &quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.4 &quot; 
+PASS Script should run with type=&quot;text/javascript1.5 &quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/jscript &quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/livescript &quot; 
</span><del>-FAIL Script should run with type=&quot;text/x-ecmascript &quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/x-javascript &quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/x-ecmascript &quot; 
+PASS Script should run with type=&quot;text/x-javascript &quot; 
</ins><span class="cx"> PASS Script should run with type=&quot; text/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot; text/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot; text/javascript1.0&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot; text/javascript1.0&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot; text/javascript1.1&quot; 
</span><span class="cx"> PASS Script should run with type=&quot; text/javascript1.2&quot; 
</span><span class="cx"> PASS Script should run with type=&quot; text/javascript1.3&quot; 
</span><del>-FAIL Script should run with type=&quot; text/javascript1.4&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot; text/javascript1.5&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot; text/javascript1.4&quot; 
+PASS Script should run with type=&quot; text/javascript1.5&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot; text/jscript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot; text/livescript&quot; 
</span><del>-FAIL Script should run with type=&quot; text/x-ecmascript&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot; text/x-javascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot; text/x-ecmascript&quot; 
+PASS Script should run with type=&quot; text/x-javascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/ecmascript\t&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript\t&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.0\t&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.0\t&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/javascript1.1\t&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.2\t&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.3\t&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.4\t&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/javascript1.5\t&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.4\t&quot; 
+PASS Script should run with type=&quot;text/javascript1.5\t&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/jscript\t&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/livescript\t&quot; 
</span><del>-FAIL Script should run with type=&quot;text/x-ecmascript\t&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/x-javascript\t&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/x-ecmascript\t&quot; 
+PASS Script should run with type=&quot;text/x-javascript\t&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ttext/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ttext/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\ttext/javascript1.0&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ttext/javascript1.0&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ttext/javascript1.1&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ttext/javascript1.2&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ttext/javascript1.3&quot; 
</span><del>-FAIL Script should run with type=&quot;\ttext/javascript1.4&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\ttext/javascript1.5&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ttext/javascript1.4&quot; 
+PASS Script should run with type=&quot;\ttext/javascript1.5&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ttext/jscript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ttext/livescript&quot; 
</span><del>-FAIL Script should run with type=&quot;\ttext/x-ecmascript&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\ttext/x-javascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ttext/x-ecmascript&quot; 
+PASS Script should run with type=&quot;\ttext/x-javascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/ecmascript\n&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript\n&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.0\n&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.0\n&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/javascript1.1\n&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.2\n&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.3\n&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.4\n&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/javascript1.5\n&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.4\n&quot; 
+PASS Script should run with type=&quot;text/javascript1.5\n&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/jscript\n&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/livescript\n&quot; 
</span><del>-FAIL Script should run with type=&quot;text/x-ecmascript\n&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/x-javascript\n&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/x-ecmascript\n&quot; 
+PASS Script should run with type=&quot;text/x-javascript\n&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ntext/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ntext/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\ntext/javascript1.0&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ntext/javascript1.0&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ntext/javascript1.1&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ntext/javascript1.2&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ntext/javascript1.3&quot; 
</span><del>-FAIL Script should run with type=&quot;\ntext/javascript1.4&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\ntext/javascript1.5&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ntext/javascript1.4&quot; 
+PASS Script should run with type=&quot;\ntext/javascript1.5&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ntext/jscript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ntext/livescript&quot; 
</span><del>-FAIL Script should run with type=&quot;\ntext/x-ecmascript&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\ntext/x-javascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ntext/x-ecmascript&quot; 
+PASS Script should run with type=&quot;\ntext/x-javascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/ecmascript\r&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript\r&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.0\r&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.0\r&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/javascript1.1\r&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.2\r&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.3\r&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.4\r&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/javascript1.5\r&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.4\r&quot; 
+PASS Script should run with type=&quot;text/javascript1.5\r&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/jscript\r&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/livescript\r&quot; 
</span><del>-FAIL Script should run with type=&quot;text/x-ecmascript\r&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/x-javascript\r&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/x-ecmascript\r&quot; 
+PASS Script should run with type=&quot;text/x-javascript\r&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\rtext/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\rtext/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\rtext/javascript1.0&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\rtext/javascript1.0&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\rtext/javascript1.1&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\rtext/javascript1.2&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\rtext/javascript1.3&quot; 
</span><del>-FAIL Script should run with type=&quot;\rtext/javascript1.4&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\rtext/javascript1.5&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\rtext/javascript1.4&quot; 
+PASS Script should run with type=&quot;\rtext/javascript1.5&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\rtext/jscript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\rtext/livescript&quot; 
</span><del>-FAIL Script should run with type=&quot;\rtext/x-ecmascript&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\rtext/x-javascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\rtext/x-ecmascript&quot; 
+PASS Script should run with type=&quot;\rtext/x-javascript&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/ecmascript\f&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript\f&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.0\f&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.0\f&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/javascript1.1\f&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.2\f&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/javascript1.3\f&quot; 
</span><del>-FAIL Script should run with type=&quot;text/javascript1.4\f&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/javascript1.5\f&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/javascript1.4\f&quot; 
+PASS Script should run with type=&quot;text/javascript1.5\f&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;text/jscript\f&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;text/livescript\f&quot; 
</span><del>-FAIL Script should run with type=&quot;text/x-ecmascript\f&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;text/x-javascript\f&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;text/x-ecmascript\f&quot; 
+PASS Script should run with type=&quot;text/x-javascript\f&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ftext/ecmascript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ftext/javascript&quot; 
</span><del>-FAIL Script should run with type=&quot;\ftext/javascript1.0&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ftext/javascript1.0&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ftext/javascript1.1&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ftext/javascript1.2&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ftext/javascript1.3&quot; 
</span><del>-FAIL Script should run with type=&quot;\ftext/javascript1.4&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\ftext/javascript1.5&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ftext/javascript1.4&quot; 
+PASS Script should run with type=&quot;\ftext/javascript1.5&quot; 
</ins><span class="cx"> PASS Script should run with type=&quot;\ftext/jscript&quot; 
</span><span class="cx"> PASS Script should run with type=&quot;\ftext/livescript&quot; 
</span><del>-FAIL Script should run with type=&quot;\ftext/x-ecmascript&quot; assert_equals: expected true but got false
-FAIL Script should run with type=&quot;\ftext/x-javascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=&quot;\ftext/x-ecmascript&quot; 
+PASS Script should run with type=&quot;\ftext/x-javascript&quot; 
</ins><span class="cx"> PASS Script shouldn't run with type=&quot;text/ecmascript\0&quot; 
</span><span class="cx"> PASS Script shouldn't run with type=&quot;text/javascript\0&quot; 
</span><span class="cx"> PASS Script shouldn't run with type=&quot;text/javascript1.0\0&quot; 
</span><span class="lines">@@ -237,8 +237,8 @@
</span><span class="cx"> PASS Script should run with language=&quot;javascript1.5&quot; 
</span><span class="cx"> PASS Script should run with language=&quot;jscript&quot; 
</span><span class="cx"> PASS Script should run with language=&quot;livescript&quot; 
</span><del>-FAIL Script should run with language=&quot;x-ecmascript&quot; assert_equals: expected true but got false
-FAIL Script should run with language=&quot;x-javascript&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with language=&quot;x-ecmascript&quot; 
+PASS Script should run with language=&quot;x-javascript&quot; 
</ins><span class="cx"> PASS Script should run with language=&quot;ECMASCRIPT&quot; 
</span><span class="cx"> PASS Script should run with language=&quot;JAVASCRIPT&quot; 
</span><span class="cx"> PASS Script should run with language=&quot;JAVASCRIPT1.0&quot; 
</span><span class="lines">@@ -249,8 +249,8 @@
</span><span class="cx"> PASS Script should run with language=&quot;JAVASCRIPT1.5&quot; 
</span><span class="cx"> PASS Script should run with language=&quot;JSCRIPT&quot; 
</span><span class="cx"> PASS Script should run with language=&quot;LIVESCRIPT&quot; 
</span><del>-FAIL Script should run with language=&quot;X-ECMASCRIPT&quot; assert_equals: expected true but got false
-FAIL Script should run with language=&quot;X-JAVASCRIPT&quot; assert_equals: expected true but got false
</del><ins>+PASS Script should run with language=&quot;X-ECMASCRIPT&quot; 
+PASS Script should run with language=&quot;X-JAVASCRIPT&quot; 
</ins><span class="cx"> PASS Script shouldn't run with language=&quot;ecmascript &quot; 
</span><span class="cx"> PASS Script shouldn't run with language=&quot;javascript &quot; 
</span><span class="cx"> PASS Script shouldn't run with language=&quot;javascript1.0 &quot; 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191267 => 191268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-18 23:39:20 UTC (rev 191267)
+++ trunk/Source/WebCore/ChangeLog        2015-10-18 23:41:02 UTC (rev 191268)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-10-18  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        WebKit must support all JavaScript MIME types in HTML5 spec
+        https://bugs.webkit.org/show_bug.cgi?id=148854
+        &lt;rdar://problem/22588195&gt;
+
+        Reviewed by Darin Adler.
+
+        WebKit did not execute certain EcmaScript MIME types although the HTML
+        specification says all user agents should support those:
+        https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type
+
+        In particular, the following MIME types are now recognized as valid and
+        executed: &quot;application/x-ecmascript&quot;, &quot;text/javascript1.0&quot;,
+        &quot;text/javascript1.4&quot;, &quot;text/javascript1.5&quot;, &quot;text/x-javascript&quot;,
+        &quot;text/x-ecmascript&quot;.
+
+        The new behavior is consistent with Firefox.
+
+        No new tests, already covered by existing test.
+
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::initializeSupportedJavaScriptMIMETypes):
+
</ins><span class="cx"> 2015-10-18  Sungmann Cho  &lt;sungmann.cho@navercorp.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Fix the Windows builds.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformMIMETypeRegistrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/MIMETypeRegistry.cpp (191267 => 191268)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/MIMETypeRegistry.cpp        2015-10-18 23:39:20 UTC (rev 191267)
+++ trunk/Source/WebCore/platform/MIMETypeRegistry.cpp        2015-10-18 23:41:02 UTC (rev 191268)
</span><span class="lines">@@ -277,28 +277,27 @@
</span><span class="cx"> 
</span><span class="cx"> static void initializeSupportedJavaScriptMIMETypes()
</span><span class="cx"> {
</span><del>-    /*
-        Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript.
-        Mozilla 1.8 accepts application/javascript, application/ecmascript, and application/x-javascript, but WinIE 7 doesn't.
-        WinIE 7 accepts text/javascript1.1 - text/javascript1.3, text/jscript, and text/livescript, but Mozilla 1.8 doesn't.
-        Mozilla 1.8 allows leading and trailing whitespace, but WinIE 7 doesn't.
-        Mozilla 1.8 and WinIE 7 both accept the empty string, but neither accept a whitespace-only string.
-        We want to accept all the values that either of these browsers accept, but not other values.
-     */
</del><ins>+    // https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type
</ins><span class="cx">     static const char* types[] = {
</span><span class="cx">         &quot;text/javascript&quot;,
</span><span class="cx">         &quot;text/ecmascript&quot;,
</span><span class="cx">         &quot;application/javascript&quot;,
</span><span class="cx">         &quot;application/ecmascript&quot;,
</span><span class="cx">         &quot;application/x-javascript&quot;,
</span><ins>+        &quot;application/x-ecmascript&quot;,
+        &quot;text/javascript1.0&quot;,
</ins><span class="cx">         &quot;text/javascript1.1&quot;,
</span><span class="cx">         &quot;text/javascript1.2&quot;,
</span><span class="cx">         &quot;text/javascript1.3&quot;,
</span><ins>+        &quot;text/javascript1.4&quot;,
+        &quot;text/javascript1.5&quot;,
</ins><span class="cx">         &quot;text/jscript&quot;,
</span><span class="cx">         &quot;text/livescript&quot;,
</span><ins>+        &quot;text/x-javascript&quot;,
+        &quot;text/x-ecmascript&quot;
</ins><span class="cx">     };
</span><del>-    for (size_t i = 0; i &lt; WTF_ARRAY_LENGTH(types); ++i)
-      supportedJavaScriptMIMETypes-&gt;add(types[i]);
</del><ins>+    for (auto* type : types)
+        supportedJavaScriptMIMETypes-&gt;add(type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void initializePDFMIMETypes()
</span></span></pre>
</div>
</div>

</body>
</html>