<!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
<rdar://problem/22588195>
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: "application/x-ecmascript", "text/javascript1.0",
"text/javascript1.4", "text/javascript1.5", "text/x-javascript",
"text/x-ecmascript".
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 <cdumez@apple.com>
+
+ WebKit must support all JavaScript MIME types in HTML5 spec
+ https://bugs.webkit.org/show_bug.cgi?id=148854
+ <rdar://problem/22588195>
+
+ 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 <antti@apple.com>
</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: "application/javascript", Language: unspecified
</span><span class="cx"> Type: "application/ecmascript", Language: unspecified
</span><span class="cx"> Type: "application/x-javascript", Language: unspecified
</span><ins>+Type: "text/javascript1.0", Language: unspecified
</ins><span class="cx"> Type: "text/javascript1.1", Language: unspecified
</span><span class="cx"> Type: "text/javascript1.2", Language: unspecified
</span><span class="cx"> Type: "text/javascript1.3", Language: unspecified
</span><ins>+Type: "text/javascript1.4", Language: unspecified
+Type: "text/javascript1.5", Language: unspecified
</ins><span class="cx"> Type: "text/jscript", Language: unspecified
</span><span class="cx"> Type: "text/livescript", Language: unspecified
</span><span class="cx"> Type: " text/javascript", 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 <cdumez@apple.com>
+
+ WebKit must support all JavaScript MIME types in HTML5 spec
+ https://bugs.webkit.org/show_bug.cgi?id=148854
+ <rdar://problem/22588195>
+
+ 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 <cdumez@apple.com>
</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=" "
</span><span class="cx"> PASS Script should run with type="application/ecmascript"
</span><span class="cx"> PASS Script should run with type="application/javascript"
</span><del>-FAIL Script should run with type="application/x-ecmascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="application/x-ecmascript"
</ins><span class="cx"> PASS Script should run with type="application/x-javascript"
</span><span class="cx"> PASS Script should run with type="APPLICATION/ECMASCRIPT"
</span><span class="cx"> PASS Script should run with type="APPLICATION/JAVASCRIPT"
</span><del>-FAIL Script should run with type="APPLICATION/X-ECMASCRIPT" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="APPLICATION/X-ECMASCRIPT"
</ins><span class="cx"> PASS Script should run with type="APPLICATION/X-JAVASCRIPT"
</span><span class="cx"> PASS Script should run with type="application/ecmascript "
</span><span class="cx"> PASS Script should run with type="application/javascript "
</span><del>-FAIL Script should run with type="application/x-ecmascript " assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="application/x-ecmascript "
</ins><span class="cx"> PASS Script should run with type="application/x-javascript "
</span><span class="cx"> PASS Script should run with type=" application/ecmascript"
</span><span class="cx"> PASS Script should run with type=" application/javascript"
</span><del>-FAIL Script should run with type=" application/x-ecmascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=" application/x-ecmascript"
</ins><span class="cx"> PASS Script should run with type=" application/x-javascript"
</span><span class="cx"> PASS Script should run with type="application/ecmascript\t"
</span><span class="cx"> PASS Script should run with type="application/javascript\t"
</span><del>-FAIL Script should run with type="application/x-ecmascript\t" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="application/x-ecmascript\t"
</ins><span class="cx"> PASS Script should run with type="application/x-javascript\t"
</span><span class="cx"> PASS Script should run with type="\tapplication/ecmascript"
</span><span class="cx"> PASS Script should run with type="\tapplication/javascript"
</span><del>-FAIL Script should run with type="\tapplication/x-ecmascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\tapplication/x-ecmascript"
</ins><span class="cx"> PASS Script should run with type="\tapplication/x-javascript"
</span><span class="cx"> PASS Script should run with type="application/ecmascript\n"
</span><span class="cx"> PASS Script should run with type="application/javascript\n"
</span><del>-FAIL Script should run with type="application/x-ecmascript\n" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="application/x-ecmascript\n"
</ins><span class="cx"> PASS Script should run with type="application/x-javascript\n"
</span><span class="cx"> PASS Script should run with type="\napplication/ecmascript"
</span><span class="cx"> PASS Script should run with type="\napplication/javascript"
</span><del>-FAIL Script should run with type="\napplication/x-ecmascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\napplication/x-ecmascript"
</ins><span class="cx"> PASS Script should run with type="\napplication/x-javascript"
</span><span class="cx"> PASS Script should run with type="application/ecmascript\r"
</span><span class="cx"> PASS Script should run with type="application/javascript\r"
</span><del>-FAIL Script should run with type="application/x-ecmascript\r" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="application/x-ecmascript\r"
</ins><span class="cx"> PASS Script should run with type="application/x-javascript\r"
</span><span class="cx"> PASS Script should run with type="\rapplication/ecmascript"
</span><span class="cx"> PASS Script should run with type="\rapplication/javascript"
</span><del>-FAIL Script should run with type="\rapplication/x-ecmascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\rapplication/x-ecmascript"
</ins><span class="cx"> PASS Script should run with type="\rapplication/x-javascript"
</span><span class="cx"> PASS Script should run with type="application/ecmascript\f"
</span><span class="cx"> PASS Script should run with type="application/javascript\f"
</span><del>-FAIL Script should run with type="application/x-ecmascript\f" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="application/x-ecmascript\f"
</ins><span class="cx"> PASS Script should run with type="application/x-javascript\f"
</span><span class="cx"> PASS Script should run with type="\fapplication/ecmascript"
</span><span class="cx"> PASS Script should run with type="\fapplication/javascript"
</span><del>-FAIL Script should run with type="\fapplication/x-ecmascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\fapplication/x-ecmascript"
</ins><span class="cx"> PASS Script should run with type="\fapplication/x-javascript"
</span><span class="cx"> PASS Script shouldn't run with type="application/ecmascript\0"
</span><span class="cx"> PASS Script shouldn't run with type="application/javascript\0"
</span><span class="lines">@@ -59,148 +59,148 @@
</span><span class="cx"> PASS Script shouldn't run with type="application/x-javascript\0foo"
</span><span class="cx"> PASS Script should run with type="text/ecmascript"
</span><span class="cx"> PASS Script should run with type="text/javascript"
</span><del>-FAIL Script should run with type="text/javascript1.0" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.0"
</ins><span class="cx"> PASS Script should run with type="text/javascript1.1"
</span><span class="cx"> PASS Script should run with type="text/javascript1.2"
</span><span class="cx"> PASS Script should run with type="text/javascript1.3"
</span><del>-FAIL Script should run with type="text/javascript1.4" assert_equals: expected true but got false
-FAIL Script should run with type="text/javascript1.5" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.4"
+PASS Script should run with type="text/javascript1.5"
</ins><span class="cx"> PASS Script should run with type="text/jscript"
</span><span class="cx"> PASS Script should run with type="text/livescript"
</span><del>-FAIL Script should run with type="text/x-ecmascript" assert_equals: expected true but got false
-FAIL Script should run with type="text/x-javascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/x-ecmascript"
+PASS Script should run with type="text/x-javascript"
</ins><span class="cx"> PASS Script should run with type="TEXT/ECMASCRIPT"
</span><span class="cx"> PASS Script should run with type="TEXT/JAVASCRIPT"
</span><del>-FAIL Script should run with type="TEXT/JAVASCRIPT1.0" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="TEXT/JAVASCRIPT1.0"
</ins><span class="cx"> PASS Script should run with type="TEXT/JAVASCRIPT1.1"
</span><span class="cx"> PASS Script should run with type="TEXT/JAVASCRIPT1.2"
</span><span class="cx"> PASS Script should run with type="TEXT/JAVASCRIPT1.3"
</span><del>-FAIL Script should run with type="TEXT/JAVASCRIPT1.4" assert_equals: expected true but got false
-FAIL Script should run with type="TEXT/JAVASCRIPT1.5" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="TEXT/JAVASCRIPT1.4"
+PASS Script should run with type="TEXT/JAVASCRIPT1.5"
</ins><span class="cx"> PASS Script should run with type="TEXT/JSCRIPT"
</span><span class="cx"> PASS Script should run with type="TEXT/LIVESCRIPT"
</span><del>-FAIL Script should run with type="TEXT/X-ECMASCRIPT" assert_equals: expected true but got false
-FAIL Script should run with type="TEXT/X-JAVASCRIPT" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="TEXT/X-ECMASCRIPT"
+PASS Script should run with type="TEXT/X-JAVASCRIPT"
</ins><span class="cx"> PASS Script should run with type="text/ecmascript "
</span><span class="cx"> PASS Script should run with type="text/javascript "
</span><del>-FAIL Script should run with type="text/javascript1.0 " assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.0 "
</ins><span class="cx"> PASS Script should run with type="text/javascript1.1 "
</span><span class="cx"> PASS Script should run with type="text/javascript1.2 "
</span><span class="cx"> PASS Script should run with type="text/javascript1.3 "
</span><del>-FAIL Script should run with type="text/javascript1.4 " assert_equals: expected true but got false
-FAIL Script should run with type="text/javascript1.5 " assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.4 "
+PASS Script should run with type="text/javascript1.5 "
</ins><span class="cx"> PASS Script should run with type="text/jscript "
</span><span class="cx"> PASS Script should run with type="text/livescript "
</span><del>-FAIL Script should run with type="text/x-ecmascript " assert_equals: expected true but got false
-FAIL Script should run with type="text/x-javascript " assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/x-ecmascript "
+PASS Script should run with type="text/x-javascript "
</ins><span class="cx"> PASS Script should run with type=" text/ecmascript"
</span><span class="cx"> PASS Script should run with type=" text/javascript"
</span><del>-FAIL Script should run with type=" text/javascript1.0" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=" text/javascript1.0"
</ins><span class="cx"> PASS Script should run with type=" text/javascript1.1"
</span><span class="cx"> PASS Script should run with type=" text/javascript1.2"
</span><span class="cx"> PASS Script should run with type=" text/javascript1.3"
</span><del>-FAIL Script should run with type=" text/javascript1.4" assert_equals: expected true but got false
-FAIL Script should run with type=" text/javascript1.5" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=" text/javascript1.4"
+PASS Script should run with type=" text/javascript1.5"
</ins><span class="cx"> PASS Script should run with type=" text/jscript"
</span><span class="cx"> PASS Script should run with type=" text/livescript"
</span><del>-FAIL Script should run with type=" text/x-ecmascript" assert_equals: expected true but got false
-FAIL Script should run with type=" text/x-javascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type=" text/x-ecmascript"
+PASS Script should run with type=" text/x-javascript"
</ins><span class="cx"> PASS Script should run with type="text/ecmascript\t"
</span><span class="cx"> PASS Script should run with type="text/javascript\t"
</span><del>-FAIL Script should run with type="text/javascript1.0\t" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.0\t"
</ins><span class="cx"> PASS Script should run with type="text/javascript1.1\t"
</span><span class="cx"> PASS Script should run with type="text/javascript1.2\t"
</span><span class="cx"> PASS Script should run with type="text/javascript1.3\t"
</span><del>-FAIL Script should run with type="text/javascript1.4\t" assert_equals: expected true but got false
-FAIL Script should run with type="text/javascript1.5\t" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.4\t"
+PASS Script should run with type="text/javascript1.5\t"
</ins><span class="cx"> PASS Script should run with type="text/jscript\t"
</span><span class="cx"> PASS Script should run with type="text/livescript\t"
</span><del>-FAIL Script should run with type="text/x-ecmascript\t" assert_equals: expected true but got false
-FAIL Script should run with type="text/x-javascript\t" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/x-ecmascript\t"
+PASS Script should run with type="text/x-javascript\t"
</ins><span class="cx"> PASS Script should run with type="\ttext/ecmascript"
</span><span class="cx"> PASS Script should run with type="\ttext/javascript"
</span><del>-FAIL Script should run with type="\ttext/javascript1.0" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ttext/javascript1.0"
</ins><span class="cx"> PASS Script should run with type="\ttext/javascript1.1"
</span><span class="cx"> PASS Script should run with type="\ttext/javascript1.2"
</span><span class="cx"> PASS Script should run with type="\ttext/javascript1.3"
</span><del>-FAIL Script should run with type="\ttext/javascript1.4" assert_equals: expected true but got false
-FAIL Script should run with type="\ttext/javascript1.5" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ttext/javascript1.4"
+PASS Script should run with type="\ttext/javascript1.5"
</ins><span class="cx"> PASS Script should run with type="\ttext/jscript"
</span><span class="cx"> PASS Script should run with type="\ttext/livescript"
</span><del>-FAIL Script should run with type="\ttext/x-ecmascript" assert_equals: expected true but got false
-FAIL Script should run with type="\ttext/x-javascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ttext/x-ecmascript"
+PASS Script should run with type="\ttext/x-javascript"
</ins><span class="cx"> PASS Script should run with type="text/ecmascript\n"
</span><span class="cx"> PASS Script should run with type="text/javascript\n"
</span><del>-FAIL Script should run with type="text/javascript1.0\n" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.0\n"
</ins><span class="cx"> PASS Script should run with type="text/javascript1.1\n"
</span><span class="cx"> PASS Script should run with type="text/javascript1.2\n"
</span><span class="cx"> PASS Script should run with type="text/javascript1.3\n"
</span><del>-FAIL Script should run with type="text/javascript1.4\n" assert_equals: expected true but got false
-FAIL Script should run with type="text/javascript1.5\n" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.4\n"
+PASS Script should run with type="text/javascript1.5\n"
</ins><span class="cx"> PASS Script should run with type="text/jscript\n"
</span><span class="cx"> PASS Script should run with type="text/livescript\n"
</span><del>-FAIL Script should run with type="text/x-ecmascript\n" assert_equals: expected true but got false
-FAIL Script should run with type="text/x-javascript\n" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/x-ecmascript\n"
+PASS Script should run with type="text/x-javascript\n"
</ins><span class="cx"> PASS Script should run with type="\ntext/ecmascript"
</span><span class="cx"> PASS Script should run with type="\ntext/javascript"
</span><del>-FAIL Script should run with type="\ntext/javascript1.0" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ntext/javascript1.0"
</ins><span class="cx"> PASS Script should run with type="\ntext/javascript1.1"
</span><span class="cx"> PASS Script should run with type="\ntext/javascript1.2"
</span><span class="cx"> PASS Script should run with type="\ntext/javascript1.3"
</span><del>-FAIL Script should run with type="\ntext/javascript1.4" assert_equals: expected true but got false
-FAIL Script should run with type="\ntext/javascript1.5" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ntext/javascript1.4"
+PASS Script should run with type="\ntext/javascript1.5"
</ins><span class="cx"> PASS Script should run with type="\ntext/jscript"
</span><span class="cx"> PASS Script should run with type="\ntext/livescript"
</span><del>-FAIL Script should run with type="\ntext/x-ecmascript" assert_equals: expected true but got false
-FAIL Script should run with type="\ntext/x-javascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ntext/x-ecmascript"
+PASS Script should run with type="\ntext/x-javascript"
</ins><span class="cx"> PASS Script should run with type="text/ecmascript\r"
</span><span class="cx"> PASS Script should run with type="text/javascript\r"
</span><del>-FAIL Script should run with type="text/javascript1.0\r" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.0\r"
</ins><span class="cx"> PASS Script should run with type="text/javascript1.1\r"
</span><span class="cx"> PASS Script should run with type="text/javascript1.2\r"
</span><span class="cx"> PASS Script should run with type="text/javascript1.3\r"
</span><del>-FAIL Script should run with type="text/javascript1.4\r" assert_equals: expected true but got false
-FAIL Script should run with type="text/javascript1.5\r" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.4\r"
+PASS Script should run with type="text/javascript1.5\r"
</ins><span class="cx"> PASS Script should run with type="text/jscript\r"
</span><span class="cx"> PASS Script should run with type="text/livescript\r"
</span><del>-FAIL Script should run with type="text/x-ecmascript\r" assert_equals: expected true but got false
-FAIL Script should run with type="text/x-javascript\r" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/x-ecmascript\r"
+PASS Script should run with type="text/x-javascript\r"
</ins><span class="cx"> PASS Script should run with type="\rtext/ecmascript"
</span><span class="cx"> PASS Script should run with type="\rtext/javascript"
</span><del>-FAIL Script should run with type="\rtext/javascript1.0" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\rtext/javascript1.0"
</ins><span class="cx"> PASS Script should run with type="\rtext/javascript1.1"
</span><span class="cx"> PASS Script should run with type="\rtext/javascript1.2"
</span><span class="cx"> PASS Script should run with type="\rtext/javascript1.3"
</span><del>-FAIL Script should run with type="\rtext/javascript1.4" assert_equals: expected true but got false
-FAIL Script should run with type="\rtext/javascript1.5" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\rtext/javascript1.4"
+PASS Script should run with type="\rtext/javascript1.5"
</ins><span class="cx"> PASS Script should run with type="\rtext/jscript"
</span><span class="cx"> PASS Script should run with type="\rtext/livescript"
</span><del>-FAIL Script should run with type="\rtext/x-ecmascript" assert_equals: expected true but got false
-FAIL Script should run with type="\rtext/x-javascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\rtext/x-ecmascript"
+PASS Script should run with type="\rtext/x-javascript"
</ins><span class="cx"> PASS Script should run with type="text/ecmascript\f"
</span><span class="cx"> PASS Script should run with type="text/javascript\f"
</span><del>-FAIL Script should run with type="text/javascript1.0\f" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.0\f"
</ins><span class="cx"> PASS Script should run with type="text/javascript1.1\f"
</span><span class="cx"> PASS Script should run with type="text/javascript1.2\f"
</span><span class="cx"> PASS Script should run with type="text/javascript1.3\f"
</span><del>-FAIL Script should run with type="text/javascript1.4\f" assert_equals: expected true but got false
-FAIL Script should run with type="text/javascript1.5\f" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/javascript1.4\f"
+PASS Script should run with type="text/javascript1.5\f"
</ins><span class="cx"> PASS Script should run with type="text/jscript\f"
</span><span class="cx"> PASS Script should run with type="text/livescript\f"
</span><del>-FAIL Script should run with type="text/x-ecmascript\f" assert_equals: expected true but got false
-FAIL Script should run with type="text/x-javascript\f" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="text/x-ecmascript\f"
+PASS Script should run with type="text/x-javascript\f"
</ins><span class="cx"> PASS Script should run with type="\ftext/ecmascript"
</span><span class="cx"> PASS Script should run with type="\ftext/javascript"
</span><del>-FAIL Script should run with type="\ftext/javascript1.0" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ftext/javascript1.0"
</ins><span class="cx"> PASS Script should run with type="\ftext/javascript1.1"
</span><span class="cx"> PASS Script should run with type="\ftext/javascript1.2"
</span><span class="cx"> PASS Script should run with type="\ftext/javascript1.3"
</span><del>-FAIL Script should run with type="\ftext/javascript1.4" assert_equals: expected true but got false
-FAIL Script should run with type="\ftext/javascript1.5" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ftext/javascript1.4"
+PASS Script should run with type="\ftext/javascript1.5"
</ins><span class="cx"> PASS Script should run with type="\ftext/jscript"
</span><span class="cx"> PASS Script should run with type="\ftext/livescript"
</span><del>-FAIL Script should run with type="\ftext/x-ecmascript" assert_equals: expected true but got false
-FAIL Script should run with type="\ftext/x-javascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with type="\ftext/x-ecmascript"
+PASS Script should run with type="\ftext/x-javascript"
</ins><span class="cx"> PASS Script shouldn't run with type="text/ecmascript\0"
</span><span class="cx"> PASS Script shouldn't run with type="text/javascript\0"
</span><span class="cx"> PASS Script shouldn't run with type="text/javascript1.0\0"
</span><span class="lines">@@ -237,8 +237,8 @@
</span><span class="cx"> PASS Script should run with language="javascript1.5"
</span><span class="cx"> PASS Script should run with language="jscript"
</span><span class="cx"> PASS Script should run with language="livescript"
</span><del>-FAIL Script should run with language="x-ecmascript" assert_equals: expected true but got false
-FAIL Script should run with language="x-javascript" assert_equals: expected true but got false
</del><ins>+PASS Script should run with language="x-ecmascript"
+PASS Script should run with language="x-javascript"
</ins><span class="cx"> PASS Script should run with language="ECMASCRIPT"
</span><span class="cx"> PASS Script should run with language="JAVASCRIPT"
</span><span class="cx"> PASS Script should run with language="JAVASCRIPT1.0"
</span><span class="lines">@@ -249,8 +249,8 @@
</span><span class="cx"> PASS Script should run with language="JAVASCRIPT1.5"
</span><span class="cx"> PASS Script should run with language="JSCRIPT"
</span><span class="cx"> PASS Script should run with language="LIVESCRIPT"
</span><del>-FAIL Script should run with language="X-ECMASCRIPT" assert_equals: expected true but got false
-FAIL Script should run with language="X-JAVASCRIPT" assert_equals: expected true but got false
</del><ins>+PASS Script should run with language="X-ECMASCRIPT"
+PASS Script should run with language="X-JAVASCRIPT"
</ins><span class="cx"> PASS Script shouldn't run with language="ecmascript "
</span><span class="cx"> PASS Script shouldn't run with language="javascript "
</span><span class="cx"> PASS Script shouldn't run with language="javascript1.0 "
</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 <cdumez@apple.com>
+
+ WebKit must support all JavaScript MIME types in HTML5 spec
+ https://bugs.webkit.org/show_bug.cgi?id=148854
+ <rdar://problem/22588195>
+
+ 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: "application/x-ecmascript", "text/javascript1.0",
+ "text/javascript1.4", "text/javascript1.5", "text/x-javascript",
+ "text/x-ecmascript".
+
+ 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 <sungmann.cho@navercorp.com>
</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"> "text/javascript",
</span><span class="cx"> "text/ecmascript",
</span><span class="cx"> "application/javascript",
</span><span class="cx"> "application/ecmascript",
</span><span class="cx"> "application/x-javascript",
</span><ins>+ "application/x-ecmascript",
+ "text/javascript1.0",
</ins><span class="cx"> "text/javascript1.1",
</span><span class="cx"> "text/javascript1.2",
</span><span class="cx"> "text/javascript1.3",
</span><ins>+ "text/javascript1.4",
+ "text/javascript1.5",
</ins><span class="cx"> "text/jscript",
</span><span class="cx"> "text/livescript",
</span><ins>+ "text/x-javascript",
+ "text/x-ecmascript"
</ins><span class="cx"> };
</span><del>- for (size_t i = 0; i < WTF_ARRAY_LENGTH(types); ++i)
- supportedJavaScriptMIMETypes->add(types[i]);
</del><ins>+ for (auto* type : types)
+ supportedJavaScriptMIMETypes->add(type);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void initializePDFMIMETypes()
</span></span></pre>
</div>
</div>
</body>
</html>