<!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>[199650] 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/199650">199650</a></dd>
<dt>Author</dt> <dd>yoav@yoav.ws</dd>
<dt>Date</dt> <dd>2016-04-17 23:06:42 -0700 (Sun, 17 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Initial Link preload support
https://bugs.webkit.org/show_bug.cgi?id=156334

Source/WebCore:

Added basic `&lt;link rel=preload&gt;` functionality that enables preloading
of resources according to their type.

Reviewed by Darin Adler.

Tests: http/tests/preload/download_resources.html
       http/tests/preload/dynamic_adding_preload.html
       http/tests/preload/dynamic_remove_preload_href.html
       http/tests/preload/dynamic_removing_preload.html

* bindings/generic/RuntimeEnabledFeatures.cpp: Added a runtime flag for the feature.
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h: Added a runtime flag for the feature.
(WebCore::RuntimeEnabledFeatures::setLinkPreloadEnabled):
(WebCore::RuntimeEnabledFeatures::linkPreloadEnabled):
* html/HTMLAttributeNames.in: Added an `as` attribute.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process): Added `as` and `crossorigin` attribute values to the loadLink() call.
(WebCore::HTMLLinkElement::setCrossOrigin): Setter for crossOrigin.
(WebCore::HTMLLinkElement::crossOrigin): Getter for crossOrigin.
* html/HTMLLinkElement.idl: Added `as` and `crossorigin` to HTMLLinkElement.
* html/HTMLLinkElement.h: Added getter and setter for crossorigin.
* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute): Added &quot;preload&quot; as a potential value.
* html/LinkRelAttribute.h: Added isLinkPreload.
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::resourceTypeFromAsAttribute): Translates an `as` value into a resource type.
(WebCore::preloadIfNeeded): Triggers a resource preload when link element is a preload one.
(WebCore::LinkLoader::loadLink): Added a call to preloadIfNeeded.
* loader/LinkLoader.h: Added signatures.
* loader/ResourceLoadInfo.cpp:
(WebCore::toResourceType): Added LinkPreload as a possible CachedResource::type.
* loader/SubresourceLoader.cpp:
(WebCore::logResourceLoaded): Added LinkPreload as a possible CachedResource::type.
* loader/cache/CachedResource.cpp: Turned defaultPriorityForResourceType into a static member, as it's now also called from LinkLoader.
(WebCore::CachedResource::defaultPriorityForResourceType): Added LinkPreload as a possible CachedResource::type, giving it low priority.
(WebCore::defaultPriorityForResourceType): Deleted.
* loader/cache/CachedResource.h: Added LinkPreload as a possible CachedResource::type. Added defaultPriorityForResourceType as static.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::contentTypeFromResourceType): Added LinkPreload as a possible CachedResource::type.
(WebCore::createResource): Added creation of a LinkPreload resource if needed.
(WebCore::CachedResourceLoader::checkInsecureContent): Added LinkPreload as a possible CachedResource::type.
(WebCore::CachedResourceLoader::canRequest): Added LinkPreload as a possible CachedResource::type.
* testing/Internals.cpp: Added function to turn on the link preload feature.
(WebCore::setLinkPreloadSupport):
* testing/Internals.idl: Added function to turn on the link preload feature.
* testing/Internals.h: Added function signature to turn on the link preload feature.

Source/WebKit2:

Reviewed by Darin Adler.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::maximumBufferingTime): Added LinkPreload as a possible CachedResource::type.

LayoutTests:

Added tests that make sure that `&lt;link rel=preload&gt;` performs its basic
tasks and preloads resources.

Reviewed by Darin Adler.

* http/tests/preload/download_resources-expected.txt: Added.
* http/tests/preload/download_resources.html: Added.
* http/tests/preload/dynamic_adding_preload-expected.txt: Added.
* http/tests/preload/dynamic_adding_preload.html: Added.
* http/tests/preload/dynamic_remove_preload_href-expected.txt: Added.
* http/tests/preload/dynamic_remove_preload_href.html: Added.
* http/tests/preload/dynamic_removing_preload-expected.txt: Added.
* http/tests/preload/dynamic_removing_preload.html: Added.
* imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions.
* imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt: Adjusted expected results to progressions.
* platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmldomreflectionmetadataexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturescpp">trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh">trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAttributeNamesin">trunk/Source/WebCore/html/HTMLAttributeNames.in</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementcpp">trunk/Source/WebCore/html/HTMLLinkElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementh">trunk/Source/WebCore/html/HTMLLinkElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLLinkElementidl">trunk/Source/WebCore/html/HTMLLinkElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlLinkRelAttributecpp">trunk/Source/WebCore/html/LinkRelAttribute.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlLinkRelAttributeh">trunk/Source/WebCore/html/LinkRelAttribute.h</a></li>
<li><a href="#trunkSourceWebCoreloaderLinkLoadercpp">trunk/Source/WebCore/loader/LinkLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderLinkLoaderh">trunk/Source/WebCore/loader/LinkLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadInfocpp">trunk/Source/WebCore/loader/ResourceLoadInfo.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoadercpp">trunk/Source/WebCore/loader/SubresourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourcecpp">trunk/Source/WebCore/loader/cache/CachedResource.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceh">trunk/Source/WebCore/loader/cache/CachedResource.h</a></li>
<li><a href="#trunkSourceWebCoreloadercacheCachedResourceLoadercpp">trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp">trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/http/tests/preload/</li>
<li><a href="#trunkLayoutTestshttptestspreloaddownload_resourcesexpectedtxt">trunk/LayoutTests/http/tests/preload/download_resources-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestspreloaddownload_resourceshtml">trunk/LayoutTests/http/tests/preload/download_resources.html</a></li>
<li><a href="#trunkLayoutTestshttptestspreloaddynamic_adding_preloadexpectedtxt">trunk/LayoutTests/http/tests/preload/dynamic_adding_preload-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestspreloaddynamic_adding_preloadhtml">trunk/LayoutTests/http/tests/preload/dynamic_adding_preload.html</a></li>
<li><a href="#trunkLayoutTestshttptestspreloaddynamic_remove_preload_hrefexpectedtxt">trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestspreloaddynamic_remove_preload_hrefhtml">trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html</a></li>
<li><a href="#trunkLayoutTestshttptestspreloaddynamic_removing_preloadexpectedtxt">trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestspreloaddynamic_removing_preloadhtml">trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/LayoutTests/ChangeLog        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-04-17  Yoav Weiss  &lt;yoav@yoav.ws&gt;
+
+        Initial Link preload support
+        https://bugs.webkit.org/show_bug.cgi?id=156334
+
+        Added tests that make sure that `&lt;link rel=preload&gt;` performs its basic
+        tasks and preloads resources.
+
+        Reviewed by Darin Adler.
+
+        * http/tests/preload/download_resources-expected.txt: Added.
+        * http/tests/preload/download_resources.html: Added.
+        * http/tests/preload/dynamic_adding_preload-expected.txt: Added.
+        * http/tests/preload/dynamic_adding_preload.html: Added.
+        * http/tests/preload/dynamic_remove_preload_href-expected.txt: Added.
+        * http/tests/preload/dynamic_remove_preload_href.html: Added.
+        * http/tests/preload/dynamic_removing_preload-expected.txt: Added.
+        * http/tests/preload/dynamic_removing_preload.html: Added.
+        * imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions.
+        * imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt: Adjusted expected results to progressions.
+        * platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt: Adjusted expected results to progressions.
+
</ins><span class="cx"> 2016-04-17  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         [Streams] Consume HTTP data as a ReadableStream
</span></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddownload_resourcesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/download_resources-expected.txt (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/download_resources-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/download_resources-expected.txt        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+CONSOLE MESSAGE: line 15: &lt;link rel=preload&gt; must have a valid `as` value
+PASS internals.isPreloaded('../resources/dummy.js'); is true
+PASS internals.isPreloaded('../resources/dummy.css'); is true
+PASS internals.isPreloaded('../resources/square.png'); is true
+PASS internals.isPreloaded('../resources/Ahem.ttf'); is true
+PASS internals.isPreloaded('../resources/test.mp4'); is true
+PASS internals.isPreloaded('../security/resources/captions.vtt'); is true
+PASS internals.isPreloaded('../resources/dummy.xml?badvalue'); is false
+PASS internals.isPreloaded('../resources/dummy.xml'); is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddownload_resourceshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/download_resources.html (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/download_resources.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/download_resources.html        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+    if (window.internals)
+        window.internals.setLinkPreloadSupport(true);
+&lt;/script&gt;
+&lt;script src=&quot;/js-test-resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;link rel=preload href=&quot;../resources/dummy.js&quot; as=script&gt;
+&lt;link rel=preload href=&quot;../resources/dummy.css&quot; as=style&gt;
+&lt;link rel=preload href=&quot;../resources/square.png&quot; as=image&gt;
+&lt;link rel=preload href=&quot;../resources/Ahem.ttf&quot; as=font crossorigin&gt;
+&lt;link rel=preload href=&quot;../resources/test.mp4&quot; as=media&gt;
+&lt;link rel=preload href=&quot;../security/resources/captions.vtt&quot; as=track&gt;
+&lt;link rel=preload href=&quot;../resources/dummy.xml?badvalue&quot; as=foobarxmlthing&gt;
+&lt;link rel=preload href=&quot;../resources/dummy.xml&quot;&gt;
+&lt;script src=&quot;http://127.0.0.1:8000/resources/slow-script.pl?delay=100&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+    if (window.testRunner)
+        testRunner.dumpAsText();
+    shouldBeTrue(&quot;internals.isPreloaded('../resources/dummy.js');&quot;);
+    shouldBeTrue(&quot;internals.isPreloaded('../resources/dummy.css');&quot;);
+    shouldBeTrue(&quot;internals.isPreloaded('../resources/square.png');&quot;);
+    shouldBeTrue(&quot;internals.isPreloaded('../resources/Ahem.ttf');&quot;);
+    shouldBeTrue(&quot;internals.isPreloaded('../resources/test.mp4');&quot;);
+    shouldBeTrue(&quot;internals.isPreloaded('../security/resources/captions.vtt');&quot;);
+    shouldBeFalse(&quot;internals.isPreloaded('../resources/dummy.xml?badvalue');&quot;);
+    shouldBeTrue(&quot;internals.isPreloaded('../resources/dummy.xml');&quot;);
+&lt;/script&gt;
+&lt;script&gt;
+    if (window.internals)
+        window.internals.setLinkPreloadSupport(false);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddynamic_adding_preloadexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/dynamic_adding_preload-expected.txt (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/dynamic_adding_preload-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/dynamic_adding_preload-expected.txt        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+PASS internals.isPreloaded('../resources/dummy.js'); is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddynamic_adding_preloadhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/dynamic_adding_preload.html (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/dynamic_adding_preload.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/dynamic_adding_preload.html        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,24 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+    if (window.internals)
+        window.internals.setLinkPreloadSupport(true);
+&lt;/script&gt;
+&lt;script src=&quot;/js-test-resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script&gt;
+    var link = document.createElement(&quot;link&quot;);
+    link.as = &quot;script&quot;;
+    link.rel = &quot;preload&quot;;
+    link.href = &quot;../resources/dummy.js&quot;;
+    document.body.appendChild(link);
+&lt;/script&gt;
+&lt;script src=&quot;http://127.0.0.1:8000/resources/slow-script.pl?delay=100&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    shouldBeTrue(&quot;internals.isPreloaded('../resources/dummy.js');&quot;);
+
+    if (window.internals)
+        window.internals.setLinkPreloadSupport(false);
+&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddynamic_remove_preload_hrefexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href-expected.txt (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href-expected.txt        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+CONSOLE MESSAGE: line 16: &lt;link rel=preload&gt; has an invalid `href` value
+PASS internals.isPreloaded('../resources/dummy.js'); is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddynamic_remove_preload_hrefhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/dynamic_remove_preload_href.html        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+    if (window.internals)
+        window.internals.setLinkPreloadSupport(true);
+&lt;/script&gt;
+&lt;script src=&quot;/js-test-resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script&gt;
+    var link = document.createElement(&quot;link&quot;);
+    link.as = &quot;script&quot;;
+    link.rel = &quot;preload&quot;;
+    link.href = &quot;../resources/dummy.js&quot;;
+    document.body.appendChild(link);
+    link.href = &quot;&quot;;
+    window.addEventListener(&quot;load&quot;, function() {
+        shouldBeFalse(&quot;internals.isPreloaded('../resources/dummy.js');&quot;);
+    });
+&lt;/script&gt;
+&lt;script src=&quot;../resources/slow-script.pl?delay=200&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    if (window.internals)
+        window.internals.setLinkPreloadSupport(false);
+&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddynamic_removing_preloadexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/dynamic_removing_preload-expected.txt        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+PASS internals.isPreloaded('../resources/dummy.js'); is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestspreloaddynamic_removing_preloadhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html (0 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/preload/dynamic_removing_preload.html        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;/js-test-resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script&gt;
+    var link = document.createElement(&quot;link&quot;);
+    link.as = &quot;script&quot;;
+    link.rel = &quot;preload&quot;;
+    link.href = &quot;../resources/dummy.js&quot;;
+    document.body.appendChild(link);
+    document.body.removeChild(link);
+    window.addEventListener(&quot;load&quot;, function() {
+        shouldBeFalse(&quot;internals.isPreloaded('../resources/dummy.js');&quot;);
+    });
+&lt;/script&gt;
+&lt;script src=&quot;../resources/slow-script.pl?delay=200&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -1366,7 +1366,7 @@
</span><span class="cx"> PASS HTMLLinkElement interface: existence and properties of interface prototype object 
</span><span class="cx"> PASS HTMLLinkElement interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
</span><span class="cx"> PASS HTMLLinkElement interface: attribute href 
</span><del>-FAIL HTMLLinkElement interface: attribute crossOrigin assert_true: The prototype object must have a property &quot;crossOrigin&quot; expected true got false
</del><ins>+PASS HTMLLinkElement interface: attribute crossOrigin 
</ins><span class="cx"> PASS HTMLLinkElement interface: attribute rel 
</span><span class="cx"> PASS HTMLLinkElement interface: attribute relList 
</span><span class="cx"> PASS HTMLLinkElement interface: attribute media 
</span><span class="lines">@@ -1379,7 +1379,7 @@
</span><span class="cx"> PASS HTMLLinkElement must be primary interface of document.createElement(&quot;link&quot;) 
</span><span class="cx"> PASS Stringification of document.createElement(&quot;link&quot;) 
</span><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;href&quot; with the proper type (0) 
</span><del>-FAIL HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;crossOrigin&quot; with the proper type (1) assert_inherits: property &quot;crossOrigin&quot; not found in prototype chain
</del><ins>+PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;crossOrigin&quot; with the proper type (1) 
</ins><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;rel&quot; with the proper type (2) 
</span><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;relList&quot; with the proper type (3) 
</span><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;media&quot; with the proper type (4) 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldomreflectionmetadataexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -3051,132 +3051,132 @@
</span><span class="cx"> PASS link.href: IDL set to object &quot;test-valueOf&quot; should not throw 
</span><span class="cx"> PASS link.href: IDL set to object &quot;test-valueOf&quot; followed by getAttribute() 
</span><span class="cx"> PASS link.href: IDL set to object &quot;test-valueOf&quot; followed by IDL get 
</span><del>-FAIL link.crossOrigin: typeof IDL attribute assert_equals: expected &quot;string&quot; but got &quot;undefined&quot;
-FAIL link.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (string) &quot;&quot; but got (undefined) undefined
</del><ins>+FAIL link.crossOrigin: typeof IDL attribute assert_equals: expected &quot;string&quot; but got &quot;object&quot;
+FAIL link.crossOrigin: IDL get with DOM attribute unset assert_equals: expected (string) &quot;&quot; but got (object) null
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to undefined followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to undefined followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to undefined followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to 7 followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to 7 followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to 7 followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to 1.5 followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to 1.5 followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to 1.5 followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to true followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to true followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to true followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to false followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to false followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to false followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to object &quot;[object Object]&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to object &quot;[object Object]&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to object &quot;[object Object]&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to NaN followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to NaN followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to NaN followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to Infinity followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to Infinity followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to Infinity followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to -Infinity followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to -Infinity followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to -Infinity followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;\0&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;\0&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;\0&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to null followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to null followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to null followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to object &quot;test-toString&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to object &quot;test-toString&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to object &quot;test-toString&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to object &quot;test-valueOf&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to object &quot;test-valueOf&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to object &quot;test-valueOf&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;anonymous&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;anonymous&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;anonymous&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;xanonymous&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;xanonymous&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;xanonymous&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;anonymous\0&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;anonymous\0&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;anonymous\0&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;nonymous&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;nonymous&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;nonymous&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;ANONYMOUS&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;ANONYMOUS&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;ANONYMOUS&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;use-credentials&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;use-credentials&quot; followed by IDL get assert_equals: expected (string) &quot;use-credentials&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;use-credentials&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;xuse-credentials&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;xuse-credentials&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;xuse-credentials&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;use-credentials\0&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;use-credentials\0&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;use-credentials\0&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;se-credentials&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;se-credentials&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;se-credentials&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: setAttribute() to &quot;USE-CREDENTIALS&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: setAttribute() to &quot;USE-CREDENTIALS&quot; followed by IDL get assert_equals: expected (string) &quot;use-credentials&quot; but got (undefined) undefined
</del><ins>+PASS link.crossOrigin: setAttribute() to &quot;USE-CREDENTIALS&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;&quot; followed by getAttribute() assert_equals: expected &quot;&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by getAttribute() assert_equals: expected &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot; \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo &quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to undefined should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected &quot;undefined&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (undefined) undefined
</del><ins>+FAIL link.crossOrigin: IDL set to undefined followed by getAttribute() assert_equals: expected (string) &quot;undefined&quot; but got (object) null
+FAIL link.crossOrigin: IDL set to undefined followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (object) null
</ins><span class="cx"> PASS link.crossOrigin: IDL set to 7 should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to 7 followed by getAttribute() assert_equals: expected &quot;7&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to 7 followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (number) 7
</del><ins>+PASS link.crossOrigin: IDL set to 7 followed by getAttribute() 
+PASS link.crossOrigin: IDL set to 7 followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to 1.5 should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to 1.5 followed by getAttribute() assert_equals: expected &quot;1.5&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to 1.5 followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (number) 1.5
</del><ins>+PASS link.crossOrigin: IDL set to 1.5 followed by getAttribute() 
+PASS link.crossOrigin: IDL set to 1.5 followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to true should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to true followed by getAttribute() assert_equals: expected &quot;true&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to true followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (boolean) true
</del><ins>+PASS link.crossOrigin: IDL set to true followed by getAttribute() 
+PASS link.crossOrigin: IDL set to true followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to false should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to false followed by getAttribute() assert_equals: expected &quot;false&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to false followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (boolean) false
</del><ins>+PASS link.crossOrigin: IDL set to false followed by getAttribute() 
+PASS link.crossOrigin: IDL set to false followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to object &quot;[object Object]&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to object &quot;[object Object]&quot; followed by getAttribute() assert_equals: expected &quot;[object Object]&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to object &quot;[object Object]&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (object) object &quot;[object Object]&quot;
</del><ins>+PASS link.crossOrigin: IDL set to object &quot;[object Object]&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to object &quot;[object Object]&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to NaN should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to NaN followed by getAttribute() assert_equals: expected &quot;NaN&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to NaN followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (number) NaN
</del><ins>+PASS link.crossOrigin: IDL set to NaN followed by getAttribute() 
+PASS link.crossOrigin: IDL set to NaN followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to Infinity should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to Infinity followed by getAttribute() assert_equals: expected &quot;Infinity&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to Infinity followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (number) Infinity
</del><ins>+PASS link.crossOrigin: IDL set to Infinity followed by getAttribute() 
+PASS link.crossOrigin: IDL set to Infinity followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to -Infinity should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to -Infinity followed by getAttribute() assert_equals: expected &quot;-Infinity&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to -Infinity followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (number) -Infinity
</del><ins>+PASS link.crossOrigin: IDL set to -Infinity followed by getAttribute() 
+PASS link.crossOrigin: IDL set to -Infinity followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;\0&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;\0&quot; followed by getAttribute() assert_equals: expected &quot;\0&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;\0&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;\0&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;\0&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;\0&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to null should not throw 
</span><span class="cx"> FAIL link.crossOrigin: IDL set to null followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (object) null
</span><span class="cx"> PASS link.crossOrigin: IDL set to object &quot;test-toString&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to object &quot;test-toString&quot; followed by getAttribute() assert_equals: expected &quot;test-toString&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to object &quot;test-toString&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (object) object &quot;test-toString&quot;
</del><ins>+PASS link.crossOrigin: IDL set to object &quot;test-toString&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to object &quot;test-toString&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to object &quot;test-valueOf&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to object &quot;test-valueOf&quot; followed by getAttribute() assert_equals: expected &quot;test-valueOf&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to object &quot;test-valueOf&quot; followed by IDL get assert_equals: expected (string) &quot;anonymous&quot; but got (object) object &quot;test-valueOf&quot;
</del><ins>+PASS link.crossOrigin: IDL set to object &quot;test-valueOf&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to object &quot;test-valueOf&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;anonymous&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;anonymous&quot; followed by getAttribute() assert_equals: expected &quot;anonymous&quot; but got &quot;USE-CREDENTIALS&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;anonymous&quot; followed by getAttribute() 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;anonymous&quot; followed by IDL get 
</span><span class="cx"> PASS link.crossOrigin: IDL set to &quot;xanonymous&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;xanonymous&quot; followed by getAttribute() assert_equals: expected &quot;xanonymous&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;xanonymous&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;xanonymous&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;xanonymous&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;xanonymous&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;anonymous\0&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;anonymous\0&quot; followed by getAttribute() assert_equals: expected &quot;anonymous\0&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;anonymous\0&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;anonymous\0&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;anonymous\0&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;anonymous\0&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;nonymous&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;nonymous&quot; followed by getAttribute() assert_equals: expected &quot;nonymous&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;nonymous&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;nonymous&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;nonymous&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;nonymous&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;ANONYMOUS&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;ANONYMOUS&quot; followed by getAttribute() assert_equals: expected &quot;ANONYMOUS&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;ANONYMOUS&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;ANONYMOUS&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;ANONYMOUS&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;ANONYMOUS&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;use-credentials&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;use-credentials&quot; followed by getAttribute() assert_equals: expected &quot;use-credentials&quot; but got &quot;USE-CREDENTIALS&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;use-credentials&quot; followed by getAttribute() 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;use-credentials&quot; followed by IDL get 
</span><span class="cx"> PASS link.crossOrigin: IDL set to &quot;xuse-credentials&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;xuse-credentials&quot; followed by getAttribute() assert_equals: expected &quot;xuse-credentials&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;xuse-credentials&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;xuse-credentials&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;xuse-credentials&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;xuse-credentials&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;use-credentials\0&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;use-credentials\0&quot; followed by getAttribute() assert_equals: expected &quot;use-credentials\0&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;use-credentials\0&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;use-credentials\0&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;use-credentials\0&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;use-credentials\0&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;se-credentials&quot; should not throw 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;se-credentials&quot; followed by getAttribute() assert_equals: expected &quot;se-credentials&quot; but got &quot;USE-CREDENTIALS&quot;
-FAIL link.crossOrigin: IDL set to &quot;se-credentials&quot; followed by IDL get assert_equals: expected &quot;anonymous&quot; but got &quot;se-credentials&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;se-credentials&quot; followed by getAttribute() 
+PASS link.crossOrigin: IDL set to &quot;se-credentials&quot; followed by IDL get 
</ins><span class="cx"> PASS link.crossOrigin: IDL set to &quot;USE-CREDENTIALS&quot; should not throw 
</span><span class="cx"> PASS link.crossOrigin: IDL set to &quot;USE-CREDENTIALS&quot; followed by getAttribute() 
</span><del>-FAIL link.crossOrigin: IDL set to &quot;USE-CREDENTIALS&quot; followed by IDL get assert_equals: expected &quot;use-credentials&quot; but got &quot;USE-CREDENTIALS&quot;
</del><ins>+PASS link.crossOrigin: IDL set to &quot;USE-CREDENTIALS&quot; followed by IDL get 
</ins><span class="cx"> PASS link.rel: typeof IDL attribute 
</span><span class="cx"> PASS link.rel: IDL get with DOM attribute unset 
</span><span class="cx"> PASS link.rel: setAttribute() to &quot;&quot; followed by getAttribute() 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -1366,7 +1366,7 @@
</span><span class="cx"> PASS HTMLLinkElement interface: existence and properties of interface prototype object 
</span><span class="cx"> PASS HTMLLinkElement interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
</span><span class="cx"> PASS HTMLLinkElement interface: attribute href 
</span><del>-FAIL HTMLLinkElement interface: attribute crossOrigin assert_true: The prototype object must have a property &quot;crossOrigin&quot; expected true got false
</del><ins>+PASS HTMLLinkElement interface: attribute crossOrigin 
</ins><span class="cx"> PASS HTMLLinkElement interface: attribute rel 
</span><span class="cx"> PASS HTMLLinkElement interface: attribute relList 
</span><span class="cx"> PASS HTMLLinkElement interface: attribute media 
</span><span class="lines">@@ -1379,7 +1379,7 @@
</span><span class="cx"> PASS HTMLLinkElement must be primary interface of document.createElement(&quot;link&quot;) 
</span><span class="cx"> PASS Stringification of document.createElement(&quot;link&quot;) 
</span><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;href&quot; with the proper type (0) 
</span><del>-FAIL HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;crossOrigin&quot; with the proper type (1) assert_inherits: property &quot;crossOrigin&quot; not found in prototype chain
</del><ins>+PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;crossOrigin&quot; with the proper type (1) 
</ins><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;rel&quot; with the proper type (2) 
</span><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;relList&quot; with the proper type (3) 
</span><span class="cx"> PASS HTMLLinkElement interface: document.createElement(&quot;link&quot;) must inherit property &quot;media&quot; with the proper type (4) 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/ChangeLog        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2016-04-17  Yoav Weiss  &lt;yoav@yoav.ws&gt;
+
+        Initial Link preload support
+        https://bugs.webkit.org/show_bug.cgi?id=156334
+
+        Added basic `&lt;link rel=preload&gt;` functionality that enables preloading
+        of resources according to their type.
+
+        Reviewed by Darin Adler.
+
+        Tests: http/tests/preload/download_resources.html
+               http/tests/preload/dynamic_adding_preload.html
+               http/tests/preload/dynamic_remove_preload_href.html
+               http/tests/preload/dynamic_removing_preload.html
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp: Added a runtime flag for the feature.
+        (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
+        * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime flag for the feature.
+        (WebCore::RuntimeEnabledFeatures::setLinkPreloadEnabled):
+        (WebCore::RuntimeEnabledFeatures::linkPreloadEnabled):
+        * html/HTMLAttributeNames.in: Added an `as` attribute.
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::process): Added `as` and `crossorigin` attribute values to the loadLink() call.
+        (WebCore::HTMLLinkElement::setCrossOrigin): Setter for crossOrigin.
+        (WebCore::HTMLLinkElement::crossOrigin): Getter for crossOrigin.
+        * html/HTMLLinkElement.idl: Added `as` and `crossorigin` to HTMLLinkElement.
+        * html/HTMLLinkElement.h: Added getter and setter for crossorigin.
+        * html/LinkRelAttribute.cpp:
+        (WebCore::LinkRelAttribute::LinkRelAttribute): Added &quot;preload&quot; as a potential value.
+        * html/LinkRelAttribute.h: Added isLinkPreload.
+        * loader/LinkLoader.cpp:
+        (WebCore::LinkLoader::resourceTypeFromAsAttribute): Translates an `as` value into a resource type.
+        (WebCore::preloadIfNeeded): Triggers a resource preload when link element is a preload one.
+        (WebCore::LinkLoader::loadLink): Added a call to preloadIfNeeded.
+        * loader/LinkLoader.h: Added signatures.
+        * loader/ResourceLoadInfo.cpp:
+        (WebCore::toResourceType): Added LinkPreload as a possible CachedResource::type.
+        * loader/SubresourceLoader.cpp:
+        (WebCore::logResourceLoaded): Added LinkPreload as a possible CachedResource::type.
+        * loader/cache/CachedResource.cpp: Turned defaultPriorityForResourceType into a static member, as it's now also called from LinkLoader.
+        (WebCore::CachedResource::defaultPriorityForResourceType): Added LinkPreload as a possible CachedResource::type, giving it low priority.
+        (WebCore::defaultPriorityForResourceType): Deleted.
+        * loader/cache/CachedResource.h: Added LinkPreload as a possible CachedResource::type. Added defaultPriorityForResourceType as static.
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::contentTypeFromResourceType): Added LinkPreload as a possible CachedResource::type.
+        (WebCore::createResource): Added creation of a LinkPreload resource if needed.
+        (WebCore::CachedResourceLoader::checkInsecureContent): Added LinkPreload as a possible CachedResource::type.
+        (WebCore::CachedResourceLoader::canRequest): Added LinkPreload as a possible CachedResource::type.
+        * testing/Internals.cpp: Added function to turn on the link preload feature.
+        (WebCore::setLinkPreloadSupport):
+        * testing/Internals.idl: Added function to turn on the link preload feature.
+        * testing/Internals.h: Added function signature to turn on the link preload feature.
+
</ins><span class="cx"> 2016-04-17  Conrad Shultz  &lt;conrad_shultz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Try (again) to fix debug builds after r199643.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx">     , m_isTouchEnabled(true)
</span><span class="cx">     , m_isDeviceMotionEnabled(true)
</span><span class="cx">     , m_isDeviceOrientationEnabled(true)
</span><ins>+    , m_isLinkPreloadEnabled(false)
</ins><span class="cx">     , m_isCSSShapesEnabled(true)
</span><span class="cx">     , m_isCSSRegionsEnabled(false)
</span><span class="cx">     , m_isCSSCompositingEnabled(false)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsgenericRuntimeEnabledFeaturesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -123,6 +123,9 @@
</span><span class="cx">     bool deviceOrientationEventEnabled() const { return m_isDeviceOrientationEnabled; }
</span><span class="cx">     bool ondeviceorientationEnabled() const { return m_isDeviceOrientationEnabled; }
</span><span class="cx"> 
</span><ins>+    void setLinkPreloadEnabled(bool isEnabled) { m_isLinkPreloadEnabled = isEnabled; }
+    bool linkPreloadEnabled() const { return m_isLinkPreloadEnabled; }
+
</ins><span class="cx"> #if ENABLE(JAVASCRIPT_I18N_API)
</span><span class="cx">     bool javaScriptI18NAPIEnabled() const;
</span><span class="cx">     void setJavaScriptI18NAPIEnabled(bool isEnabled) { m_isJavaScriptI18NAPIEnabled = isEnabled; }
</span><span class="lines">@@ -248,6 +251,7 @@
</span><span class="cx">     bool m_isTouchEnabled;
</span><span class="cx">     bool m_isDeviceMotionEnabled;
</span><span class="cx">     bool m_isDeviceOrientationEnabled;
</span><ins>+    bool m_isLinkPreloadEnabled;
</ins><span class="cx">     bool m_isCSSShapesEnabled;
</span><span class="cx">     bool m_isCSSRegionsEnabled;
</span><span class="cx">     bool m_isCSSCompositingEnabled;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAttributeNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAttributeNames.in        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx"> aria-valuemin
</span><span class="cx"> aria-valuenow
</span><span class="cx"> aria-valuetext
</span><ins>+as
</ins><span class="cx"> async
</span><span class="cx"> autocomplete
</span><span class="cx"> autofocus
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -194,6 +194,16 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void HTMLLinkElement::setCrossOrigin(const AtomicString&amp; value)
+{
+    setAttributeWithoutSynchronization(crossoriginAttr, value);
+}
+
+String HTMLLinkElement::crossOrigin() const
+{
+    return parseCORSSettingsAttribute(fastGetAttribute(crossoriginAttr));
+}
+
</ins><span class="cx"> void HTMLLinkElement::process()
</span><span class="cx"> {
</span><span class="cx">     if (!inDocument() || m_isInShadowTree) {
</span><span class="lines">@@ -203,7 +213,7 @@
</span><span class="cx"> 
</span><span class="cx">     URL url = getNonEmptyURLAttribute(hrefAttr);
</span><span class="cx"> 
</span><del>-    if (!m_linkLoader.loadLink(m_relAttribute, url, document()))
</del><ins>+    if (!m_linkLoader.loadLink(m_relAttribute, url, fastGetAttribute(asAttr), fastGetAttribute(crossoriginAttr), document()))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     bool treatAsStyleSheet = m_relAttribute.isStyleSheet
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.h (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.h        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/html/HTMLLinkElement.h        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -67,6 +67,9 @@
</span><span class="cx">     bool isEnabledViaScript() const { return m_disabledState == EnabledViaScript; }
</span><span class="cx">     DOMTokenList&amp; sizes();
</span><span class="cx"> 
</span><ins>+    void setCrossOrigin(const AtomicString&amp;);
+    String crossOrigin() const;
+
</ins><span class="cx">     void dispatchPendingEvent(LinkEventSender*);
</span><span class="cx">     static void dispatchPendingLoadEvents();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLLinkElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLLinkElement.idl (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLLinkElement.idl        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/html/HTMLLinkElement.idl        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -35,6 +35,8 @@
</span><span class="cx"> #endif
</span><span class="cx">     [Reflect] attribute DOMString target;
</span><span class="cx">     [Reflect] attribute DOMString type;
</span><ins>+    [Reflect] attribute DOMString as;
+    attribute DOMString? crossOrigin;
</ins><span class="cx"> 
</span><span class="cx">     // DOM Level 2 Style
</span><span class="cx">     readonly attribute StyleSheet sheet;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlLinkRelAttributecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/LinkRelAttribute.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/LinkRelAttribute.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/html/LinkRelAttribute.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;LinkRelAttribute.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;RuntimeEnabledFeatures.h&quot;
</ins><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -54,6 +55,8 @@
</span><span class="cx"> #endif
</span><span class="cx">     else if (equalLettersIgnoringASCIICase(rel, &quot;dns-prefetch&quot;))
</span><span class="cx">         isDNSPrefetch = true;
</span><ins>+    else if (RuntimeEnabledFeatures::sharedFeatures().linkPreloadEnabled() &amp;&amp; equalLettersIgnoringASCIICase(rel, &quot;preload&quot;))
+        isLinkPreload = true;
</ins><span class="cx">     else if (equalLettersIgnoringASCIICase(rel, &quot;alternate stylesheet&quot;) || equalLettersIgnoringASCIICase(rel, &quot;stylesheet alternate&quot;)) {
</span><span class="cx">         isStyleSheet = true;
</span><span class="cx">         isAlternate = true;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlLinkRelAttributeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/LinkRelAttribute.h (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/LinkRelAttribute.h        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/html/LinkRelAttribute.h        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx">     IconType iconType { InvalidIcon };
</span><span class="cx">     bool isAlternate { false };
</span><span class="cx">     bool isDNSPrefetch { false };
</span><ins>+    bool isLinkPreload { false };
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     bool isLinkPrefetch { false };
</span><span class="cx">     bool isLinkSubresource { false };
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderLinkLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/LinkLoader.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -37,11 +37,13 @@
</span><span class="cx"> #include &quot;CachedResourceLoader.h&quot;
</span><span class="cx"> #include &quot;CachedResourceRequest.h&quot;
</span><span class="cx"> #include &quot;ContainerNode.h&quot;
</span><ins>+#include &quot;CrossOriginAccessControl.h&quot;
</ins><span class="cx"> #include &quot;Document.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;FrameLoaderClient.h&quot;
</span><span class="cx"> #include &quot;FrameView.h&quot;
</span><span class="cx"> #include &quot;LinkRelAttribute.h&quot;
</span><ins>+#include &quot;RuntimeEnabledFeatures.h&quot;
</ins><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -83,8 +85,57 @@
</span><span class="cx">     m_cachedLinkResource = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool LinkLoader::loadLink(const LinkRelAttribute&amp; relAttribute, const URL&amp; href, Document&amp; document)
</del><ins>+Optional&lt;CachedResource::Type&gt; LinkLoader::resourceTypeFromAsAttribute(const String&amp; as)
</ins><span class="cx"> {
</span><ins>+    if (as.isEmpty())
+        return CachedResource::LinkPreload;
+    if (equalLettersIgnoringASCIICase(as, &quot;image&quot;))
+        return CachedResource::ImageResource;
+    if (equalLettersIgnoringASCIICase(as, &quot;script&quot;))
+        return CachedResource::Script;
+    if (equalLettersIgnoringASCIICase(as, &quot;style&quot;))
+        return CachedResource::CSSStyleSheet;
+    if (equalLettersIgnoringASCIICase(as, &quot;media&quot;))
+        return CachedResource::MediaResource;
+    if (equalLettersIgnoringASCIICase(as, &quot;font&quot;))
+        return CachedResource::FontResource;
+#if ENABLE(VIDEO_TRACK)
+    if (equalLettersIgnoringASCIICase(as, &quot;track&quot;))
+        return CachedResource::TextTrackResource;
+#endif
+    return Nullopt;
+}
+
+static void preloadIfNeeded(const LinkRelAttribute&amp; relAttribute, const URL&amp; href, Document&amp; document, const String&amp; as, const String&amp; crossOriginMode)
+{
+    if (!document.loader() || !relAttribute.isLinkPreload)
+        return;
+
+    ASSERT(RuntimeEnabledFeatures::sharedFeatures().linkPreloadEnabled());
+    if (!href.isValid()) {
+        document.addConsoleMessage(MessageSource::Other, MessageLevel::Error, String(&quot;&lt;link rel=preload&gt; has an invalid `href` value&quot;));
+        return;
+    }
+    auto type = LinkLoader::resourceTypeFromAsAttribute(as);
+    if (!type) {
+        document.addConsoleMessage(MessageSource::Other, MessageLevel::Error, String(&quot;&lt;link rel=preload&gt; must have a valid `as` value&quot;));
+        return;
+    }
+
+    ResourceRequest resourceRequest(document.completeURL(href));
+    CachedResourceRequest linkRequest(resourceRequest, CachedResource::defaultPriorityForResourceType(type.value()));
+    linkRequest.setInitiator(&quot;link&quot;);
+
+    if (!crossOriginMode.isNull()) {
+        StoredCredentials allowCredentials = equalLettersIgnoringASCIICase(crossOriginMode, &quot;use-credentials&quot;) ? AllowStoredCredentials : DoNotAllowStoredCredentials;
+        updateRequestForAccessControl(linkRequest.mutableResourceRequest(), document.securityOrigin(), allowCredentials);
+    }
+    linkRequest.setForPreload(true);
+    document.cachedResourceLoader().preload(type.value(), linkRequest, emptyString());
+}
+
+bool LinkLoader::loadLink(const LinkRelAttribute&amp; relAttribute, const URL&amp; href, const String&amp; as, const String&amp; crossOrigin, Document&amp; document)
+{
</ins><span class="cx">     // We'll record this URL per document, even if we later only use it in top level frames
</span><span class="cx">     if (relAttribute.iconType != InvalidIcon &amp;&amp; href.isValid() &amp;&amp; !href.isEmpty()) {
</span><span class="cx">         if (!m_client.shouldLoadLink())
</span><span class="lines">@@ -101,6 +152,9 @@
</span><span class="cx">             document.frame()-&gt;loader().client().prefetchDNS(href.host());
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (m_client.shouldLoadLink())
+        preloadIfNeeded(relAttribute, href, document, as, crossOrigin);
+
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     if ((relAttribute.isLinkPrefetch || relAttribute.isLinkSubresource) &amp;&amp; href.isValid() &amp;&amp; document.frame()) {
</span><span class="cx">         if (!m_client.shouldLoadLink())
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderLinkLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/LinkLoader.h (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/LinkLoader.h        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/loader/LinkLoader.h        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #ifndef LinkLoader_h
</span><span class="cx"> #define LinkLoader_h
</span><span class="cx"> 
</span><ins>+#include &quot;CachedResource.h&quot;
</ins><span class="cx"> #include &quot;CachedResourceClient.h&quot;
</span><span class="cx"> #include &quot;CachedResourceHandle.h&quot;
</span><span class="cx"> #include &quot;LinkLoaderClient.h&quot;
</span><span class="lines">@@ -49,7 +50,8 @@
</span><span class="cx">     explicit LinkLoader(LinkLoaderClient&amp;);
</span><span class="cx">     virtual ~LinkLoader();
</span><span class="cx"> 
</span><del>-    bool loadLink(const LinkRelAttribute&amp;, const URL&amp;, Document&amp;);
</del><ins>+    bool loadLink(const LinkRelAttribute&amp;, const URL&amp;, const String&amp; as, const String&amp; crossOrigin, Document&amp;);
+    static Optional&lt;CachedResource::Type&gt; resourceTypeFromAsAttribute(const String&amp; as);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void notifyFinished(CachedResource*) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoadInfo.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadInfo.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/loader/ResourceLoadInfo.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx">         return ResourceType::Font;
</span><span class="cx"> 
</span><span class="cx">     case CachedResource::MediaResource:
</span><ins>+    case CachedResource::LinkPreload:
</ins><span class="cx">     case CachedResource::RawResource:
</span><span class="cx">         return ResourceType::Raw;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -371,6 +371,7 @@
</span><span class="cx">     case CachedResource::SVGDocumentResource:
</span><span class="cx">         resourceType = DiagnosticLoggingKeys::svgDocumentKey();
</span><span class="cx">         break;
</span><ins>+    case CachedResource::LinkPreload:
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     case CachedResource::LinkPrefetch:
</span><span class="cx">     case CachedResource::LinkSubresource:
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/loader/cache/CachedResource.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-static ResourceLoadPriority defaultPriorityForResourceType(CachedResource::Type type)
</del><ins>+ResourceLoadPriority CachedResource::defaultPriorityForResourceType(Type type)
</ins><span class="cx"> {
</span><span class="cx">     switch (type) {
</span><span class="cx">     case CachedResource::MainResource:
</span><span class="lines">@@ -86,6 +86,8 @@
</span><span class="cx"> #endif
</span><span class="cx">     case CachedResource::SVGDocumentResource:
</span><span class="cx">         return ResourceLoadPriority::Low;
</span><ins>+    case CachedResource::LinkPreload:
+        return ResourceLoadPriority::Low;
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     case CachedResource::LinkPrefetch:
</span><span class="cx">         return ResourceLoadPriority::VeryLow;
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResource.h (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResource.h        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx"> #if ENABLE(XSLT)
</span><span class="cx">         , XSLStyleSheet
</span><span class="cx"> #endif
</span><ins>+        , LinkPreload
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">         , LinkPrefetch
</span><span class="cx">         , LinkSubresource
</span><span class="lines">@@ -263,6 +264,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     unsigned long identifierForLoadWithoutResourceLoader() const { return m_identifierForLoadWithoutResourceLoader; }
</span><ins>+    static ResourceLoadPriority defaultPriorityForResourceType(Type);
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     void setEncodedSize(unsigned);
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheCachedResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -108,6 +108,8 @@
</span><span class="cx">     case CachedResource::XSLStyleSheet:
</span><span class="cx">         return new CachedXSLStyleSheet(request, sessionID);
</span><span class="cx"> #endif
</span><ins>+    case CachedResource::LinkPreload:
+        return new CachedResource(request, CachedResource::LinkPreload, sessionID);
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     case CachedResource::LinkPrefetch:
</span><span class="cx">         return new CachedResource(request, CachedResource::LinkPrefetch, sessionID);
</span><span class="lines">@@ -313,6 +315,7 @@
</span><span class="cx">         return MixedContentChecker::ContentType::Active;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    case CachedResource::LinkPreload:
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     case CachedResource::LinkPrefetch:
</span><span class="cx">     case CachedResource::LinkSubresource:
</span><span class="lines">@@ -353,7 +356,8 @@
</span><span class="cx"> #if ENABLE(SVG_FONTS)
</span><span class="cx">     case CachedResource::SVGFontResource:
</span><span class="cx"> #endif
</span><del>-    case CachedResource::FontResource: {
</del><ins>+    case CachedResource::FontResource:
+    case CachedResource::LinkPreload: {
</ins><span class="cx">         // These resources can corrupt only the frame's pixels.
</span><span class="cx">         if (Frame* f = frame()) {
</span><span class="cx">             Frame&amp; topFrame = f-&gt;tree().top();
</span><span class="lines">@@ -399,6 +403,7 @@
</span><span class="cx">     case CachedResource::MediaResource:
</span><span class="cx">     case CachedResource::FontResource:
</span><span class="cx">     case CachedResource::RawResource:
</span><ins>+    case CachedResource::LinkPreload:
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     case CachedResource::LinkPrefetch:
</span><span class="cx">     case CachedResource::LinkSubresource:
</span><span class="lines">@@ -454,6 +459,8 @@
</span><span class="cx">     }
</span><span class="cx">     case CachedResource::MainResource:
</span><span class="cx">     case CachedResource::RawResource:
</span><ins>+    // FIXME: Preload should be subject to connect-src.
+    case CachedResource::LinkPreload:
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     case CachedResource::LinkPrefetch:
</span><span class="cx">     case CachedResource::LinkSubresource:
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -3328,4 +3328,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::setLinkPreloadSupport(bool enable)
+{
+    RuntimeEnabledFeatures::sharedFeatures().setLinkPreloadEnabled(enable);
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/testing/Internals.h        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -471,6 +471,7 @@
</span><span class="cx">     String composedTreeAsText(Node&amp;);
</span><span class="cx">     
</span><span class="cx">     void setViewportForceAlwaysUserScalable(bool);
</span><ins>+    void setLinkPreloadSupport(bool);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     explicit Internals(Document&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -445,4 +445,5 @@
</span><span class="cx">     DOMString composedTreeAsText(Node parent);
</span><span class="cx"> 
</span><span class="cx">     void setViewportForceAlwaysUserScalable(boolean scalable);
</span><ins>+    void setLinkPreloadSupport(boolean scalable);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-04-17  Yoav Weiss  &lt;yoav@yoav.ws&gt;
+
+        Initial Link preload support
+        https://bugs.webkit.org/show_bug.cgi?id=156334
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/Network/WebLoaderStrategy.cpp:
+        (WebKit::maximumBufferingTime): Added LinkPreload as a possible CachedResource::type.
+
</ins><span class="cx"> 2016-04-17  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WK2][iOS] Do not dlopen() QuickLook in the NetworkProcess
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebLoaderStrategycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp (199649 => 199650)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp        2016-04-18 05:36:31 UTC (rev 199649)
+++ trunk/Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp        2016-04-18 06:06:42 UTC (rev 199650)
</span><span class="lines">@@ -110,6 +110,7 @@
</span><span class="cx">     case CachedResource::MainResource:
</span><span class="cx">     case CachedResource::RawResource:
</span><span class="cx">     case CachedResource::SVGDocumentResource:
</span><ins>+    case CachedResource::LinkPreload:
</ins><span class="cx"> #if ENABLE(LINK_PREFETCH)
</span><span class="cx">     case CachedResource::LinkPrefetch:
</span><span class="cx">     case CachedResource::LinkSubresource:
</span></span></pre>
</div>
</div>

</body>
</html>