Changeset 217962 in webkit
- Timestamp:
- Jun 8, 2017 10:25:02 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r217958 r217962 1 2017-06-08 Yoav Weiss <yoav@yoav.ws> 2 3 [preload] Mandatory `as` value and related spec alignments 4 https://bugs.webkit.org/show_bug.cgi?id=173047 5 6 Reviewed by Dean Jackson. 7 8 Fix tests and expectations to this patch's changes: `as` is mandatory and "fetch" replaces the previous empty `as` value, 9 onerror no longer fires for invalid `as` values, and the IDL for `as` reflects only valid values, to enable feature detection. 10 11 * http/tests/fetch/redirectmode-and-preload.html: 12 * http/tests/preload/download_resources-expected.txt: 13 * http/tests/preload/download_resources.html: 14 * http/tests/preload/download_resources_from_header_iframe-expected.txt: 15 * http/tests/preload/onerror_event-expected.txt: 16 * http/tests/preload/onerror_event.html: 17 * http/tests/preload/onload_event-expected.txt: 18 * http/tests/preload/onload_event.html: 19 * http/tests/preload/preloadscanner_download_resources.html: 20 * http/tests/preload/resources/download_resources_from_header.php: 21 * http/tests/preload/resources/nph-invalid_resources_from_header.pl: 22 * http/tests/preload/single_download_preload.html: 23 * http/tests/preload/single_download_preload_headers.php: 24 * imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt: PProgressions related to correct reflection. 25 1 26 2017-06-08 Ryosuke Niwa <rniwa@webkit.org> 2 27 -
trunk/LayoutTests/http/tests/fetch/redirectmode-and-preload.html
r211341 r217962 9 9 <script src="/js-test-resources/testharness.js"></script> 10 10 <script src="/js-test-resources/testharnessreport.js"></script> 11 <link rel=preload onload="startTests()" href="./resources/redirect-with-cache.php?enableCaching&url=http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=alert-fail.js&contentType=text/ascii">11 <link rel=preload as=fetch onload="startTests()" href="./resources/redirect-with-cache.php?enableCaching&url=http://localhost:8000/security/resources/allow-if-origin.php?allowCache&origin=http%3A%2F%2F127.0.0.1%3A8000&name=alert-fail.js&contentType=text/ascii"> 12 12 </head> 13 13 <body> -
trunk/LayoutTests/http/tests/preload/download_resources-expected.txt
r214472 r217962 1 1 CONSOLE MESSAGE: line 13: <link rel=preload> must have a valid `as` value 2 CONSOLE MESSAGE: line 14: <link rel=preload> must have a valid `as` value 2 3 This test makes sure that link preload preloads resources 3 4 -
trunk/LayoutTests/http/tests/preload/download_resources.html
r217863 r217962 12 12 <link rel=preload href="../security/resources/captions.vtt" as=track> 13 13 <link rel=preload href="../resources/dummy.xml?badvalue" as=foobarxmlthing> 14 <link rel=preload href="../resources/dummy.xml"> 14 <link rel=preload href="../resources/dummy.xml?empty"> 15 <link rel=preload href="../resources/dummy.xml" as=fetch> 15 16 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=400"></script> 16 17 <script> … … 24 25 25 26 assert_false(internals.isPreloaded("../resources/dummy.xml?badvalue")); 27 assert_false(internals.isPreloaded("../resources/dummy.xml?empty")); 26 28 assert_true(internals.isPreloaded("../resources/dummy.xml")); 27 29 document.write('<script src="../resources/dummy.js"></scr' + 'ipt>' + -
trunk/LayoutTests/http/tests/preload/download_resources_from_header_iframe-expected.txt
r217863 r217962 1 CONSOLE MESSAGE: <link rel=preload> must have a valid `as` value 1 2 CONSOLE MESSAGE: <link rel=preload> must have a valid `as` value 2 3 … … 13 14 PASS internals.isPreloaded('../security/resources/captions.vtt'); is true 14 15 PASS internals.isPreloaded('../resources/dummy.xml?badvalue'); is false 16 PASS internals.isPreloaded('../resources/dummy.xml?empty'); is false 15 17 PASS internals.isPreloaded('../resources/dummy.xml'); is true 16 18 PASS successfullyParsed is true -
trunk/LayoutTests/http/tests/preload/onerror_event-expected.txt
r214472 r217962 1 CONSOLE MESSAGE: line 25: <link rel=preload> must have a valid `as` value 1 CONSOLE MESSAGE: line 26: <link rel=preload> must have a valid `as` value 2 CONSOLE MESSAGE: line 28: <link rel=preload> must have a valid `as` value 2 3 This test makes sure that link preload triggers error events for non-existing resources. 3 4 -
trunk/LayoutTests/http/tests/preload/onerror_event.html
r214472 r217962 12 12 var trackFailed = false; 13 13 var gibrishFailed = false; 14 var fetchFailed = false; 14 15 var noTypeFailed = false; 15 16 var counter = 0; … … 24 25 <link rel=preload href="../non-existent/security/captions.vtt" as=track onerror="count();trackFailed = true;" onload="count();"> 25 26 <link rel=preload href="../non-existent/dummy.xml" as=foobarxmlthing onerror="count();gibrishFailed = true;" onload="count();"> 27 <link rel=preload href="http://127.0.0.1:9999/non-existent/dummy.xml?fetch" as=fetch onerror="count();fetchFailed = true;" onload="count();"> 26 28 <link rel=preload href="http://127.0.0.1:9999/non-existent/dummy.xml" onerror="count();noTypeFailed = true;" onload="count();"> 27 29 <script> … … 49 51 assert_true(fontFailed); 50 52 assert_true(trackFailed); 51 assert_true(gibrishFailed); 52 assert_true(noTypeFailed); 53 assert_false(gibrishFailed); 54 assert_true(fetchFailed); 55 assert_false(noTypeFailed); 53 56 t.done(); 54 57 }; 55 58 setInterval(t.step_func(function() { 56 if (window.counter >= 7)59 if (window.counter >= 6) 57 60 test(); 58 61 }, 100)); -
trunk/LayoutTests/http/tests/preload/onload_event-expected.txt
r214472 r217962 1 CONSOLE MESSAGE: line 33: <link rel=preload> must have a valid `as` value2 1 CONSOLE MESSAGE: line 34: <link rel=preload> must have a valid `as` value 2 CONSOLE MESSAGE: line 35: <link rel=preload> must have a valid `as` value 3 CONSOLE MESSAGE: line 36: <link rel=preload> must have a valid `as` value 4 CONSOLE MESSAGE: line 37: <link rel=preload> must have a valid `as` value 3 5 PASS successfullyParsed is true 4 6 … … 11 13 PASS trackLoaded is true 12 14 PASS gibberishLoaded is false 13 PASS gibberishErrored is true15 PASS gibberishErrored is false 14 16 PASS xsltLoaded is false 15 PASS xsltErrored is true 16 PASS noTypeLoaded is true 17 PASS emptyTypeLoaded is true 17 PASS xsltErrored is false 18 PASS noTypeLoaded is false 19 PASS emptyTypeLoaded is false 20 PASS fetchLoaded is true 18 21 This test makes sure that link preload events are fired -
trunk/LayoutTests/http/tests/preload/onload_event.html
r217863 r217962 20 20 var noTypeLoaded = false; 21 21 var emptyTypeLoaded = false; 22 var fetchLoaded = false; 22 23 var counter = 0; 23 24 function count() { … … 31 32 <link rel=preload href="../resources/test.ogv" as=video onload="count(); mediaLoaded = true;" onerror="count()"> 32 33 <link rel=preload href="../security/resources/captions.vtt" as=track onload="count(); trackLoaded = true;" onerror="count();"> 33 <link rel=preload href="../resources/dummy.xml " as=foobarxmlthing onload="count(); gibberishLoaded = true;" onerror="count(); gibberishErrored = true;">34 <link rel=preload href="../resources/dummy.xml?foobarxmlthing" as=foobarxmlthing onload="count(); gibberishLoaded = true;" onerror="count(); gibberishErrored = true;"> 34 35 <link rel=preload href="../resources/dummy.xslt" as=xslt onload="count(); xsltLoaded = true;" onerror="count(); xsltErrored = true;"> 35 36 <link rel=preload href="../resources/dummy.xml" onload="count(); noTypeLoaded = true;" onerror="count()"> 36 37 <link rel=preload href="../resources/dummy.xml?empty" as onload="count(); emptyTypeLoaded = true;" onerror="count()"> 38 <link rel=preload href="../resources/dummy.xml?fetch" as=fetch onload="count(); fetchLoaded = true;" onerror="count()"> 37 39 <script> 38 40 function test() { … … 44 46 shouldBeTrue("trackLoaded"); 45 47 shouldBeFalse("gibberishLoaded"); 46 shouldBe True("gibberishErrored");48 shouldBeFalse("gibberishErrored"); 47 49 shouldBeFalse("xsltLoaded"); 48 shouldBeTrue("xsltErrored"); 49 shouldBeTrue("noTypeLoaded"); 50 shouldBeTrue("emptyTypeLoaded"); 50 shouldBeFalse("xsltErrored"); 51 shouldBeFalse("noTypeLoaded"); 52 shouldBeFalse("emptyTypeLoaded"); 53 shouldBeTrue("fetchLoaded"); 51 54 if (window.testRunner) 52 55 testRunner.notifyDone(); … … 71 74 addEventListener("load", function(){ 72 75 setInterval(function() { 73 if (window.counter >= 10)76 if (window.counter >= 7) 74 77 test(); 75 78 }, 100); -
trunk/LayoutTests/http/tests/preload/preloadscanner_download_resources.html
r217863 r217962 29 29 <link rel=preload href="../security/resources/captions.vtt" as=track> 30 30 <link rel=preload href="../resources/dummy.xml?badvalue" as=foobarxmlthing> 31 <link rel=preload href="../resources/dummy.xml" >31 <link rel=preload href="../resources/dummy.xml" as=fetch> -
trunk/LayoutTests/http/tests/preload/resources/download_resources_from_header.php
r217863 r217962 8 8 header("link: <../security/resources/captions.vtt>; rel=preload; as=track", false); 9 9 header("Link: <../resources/dummy.xml?badvalue>; rel=preload; as=foobar", false); 10 header("Link: <../resources/dummy.xml>; rel=preload", false); 10 header("Link: <../resources/dummy.xml?empty>; rel=preload", false); 11 header("Link: <../resources/dummy.xml>; rel=preload;as=fetch", false); 11 12 ?> 12 13 <!DOCTYPE html> … … 21 22 shouldBeTrue("internals.isPreloaded('../security/resources/captions.vtt');"); 22 23 shouldBeFalse("internals.isPreloaded('../resources/dummy.xml?badvalue');"); 24 shouldBeFalse("internals.isPreloaded('../resources/dummy.xml?empty');"); 23 25 shouldBeTrue("internals.isPreloaded('../resources/dummy.xml');"); 24 26 </script> -
trunk/LayoutTests/http/tests/preload/resources/nph-invalid_resources_from_header.pl
r217863 r217962 10 10 Link: <../resources/test\f.mp4>; rel=preload; as=video 11 11 Link: <../security/resources/cap\ttions.vtt>; rel=preload; as=track 12 Link: <../resources/dummy .xml>; rel=preload; 12 Link: <../resources/dummy .xml>; rel=preload; as=fetch 13 13 Link: <../resources/dumm>y.xml>; rel=preload 14 14 Content-Security-Policy: img-src 'none' -
trunk/LayoutTests/http/tests/preload/single_download_preload.html
r217863 r217962 14 14 <link rel=preload href="http://127.0.0.1:8000/security/resources/captions.vtt" as=track> 15 15 <link rel=preload href="http://127.0.0.1:8000/resources/dummy.xml?foobar" as=foobarxmlthing> 16 <link rel=preload href="http://127.0.0.1:8000/resources/dummy.xml" crossorigin>16 <link rel=preload href="http://127.0.0.1:8000/resources/dummy.xml" as=fetch crossorigin> 17 17 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=200"></script> 18 18 <style> -
trunk/LayoutTests/http/tests/preload/single_download_preload_headers.php
r217863 r217962 9 9 header("link: <http://127.0.0.1:8000/security/resources/captions.vtt>; rel=preload; as=track", false); 10 10 header("Link: <http://127.0.0.1:8000/resources/dummy.xml?foobar>; rel=preload; as=foobar", false); 11 header("Link: <http://127.0.0.1:8000/resources/dummy.xml>; crossorigin; rel=preload", false);11 header("Link: <http://127.0.0.1:8000/resources/dummy.xml>; as=fetch; crossorigin; rel=preload", false); 12 12 ?> 13 13 <!DOCTYPE html> -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt
r217225 r217962 1147 1147 PASS link.as: IDL get with DOM attribute unset 1148 1148 PASS link.as: setAttribute() to "" 1149 FAIL link.as: setAttribute() to " \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 " assert_equals: IDL get expected "" but got " \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 " 1150 FAIL link.as: setAttribute() to undefined assert_equals: IDL get expected "" but got "undefined" 1151 FAIL link.as: setAttribute() to 7 assert_equals: IDL get expected "" but got "7" 1152 FAIL link.as: setAttribute() to 1.5 assert_equals: IDL get expected "" but got "1.5" 1153 FAIL link.as: setAttribute() to true assert_equals: IDL get expected "" but got "true" 1154 FAIL link.as: setAttribute() to false assert_equals: IDL get expected "" but got "false" 1155 FAIL link.as: setAttribute() to object "[object Object]" assert_equals: IDL get expected "" but got "[object Object]" 1156 FAIL link.as: setAttribute() to NaN assert_equals: IDL get expected "" but got "NaN" 1157 FAIL link.as: setAttribute() to Infinity assert_equals: IDL get expected "" but got "Infinity" 1158 FAIL link.as: setAttribute() to -Infinity assert_equals: IDL get expected "" but got "-Infinity" 1159 FAIL link.as: setAttribute() to "\0" assert_equals: IDL get expected "" but got "\0" 1160 FAIL link.as: setAttribute() to null assert_equals: IDL get expected "" but got "null" 1161 FAIL link.as: setAttribute() to object "test-toString" assert_equals: IDL get expected "" but got "test-toString" 1162 FAIL link.as: setAttribute() to object "test-valueOf" assert_equals: IDL get expected "" but got "test-valueOf" 1149 PASS link.as: setAttribute() to " \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 " 1150 PASS link.as: setAttribute() to undefined 1151 PASS link.as: setAttribute() to 7 1152 PASS link.as: setAttribute() to 1.5 1153 PASS link.as: setAttribute() to true 1154 PASS link.as: setAttribute() to false 1155 PASS link.as: setAttribute() to object "[object Object]" 1156 PASS link.as: setAttribute() to NaN 1157 PASS link.as: setAttribute() to Infinity 1158 PASS link.as: setAttribute() to -Infinity 1159 PASS link.as: setAttribute() to "\0" 1160 PASS link.as: setAttribute() to null 1161 PASS link.as: setAttribute() to object "test-toString" 1162 PASS link.as: setAttribute() to object "test-valueOf" 1163 1163 PASS link.as: setAttribute() to "audio" 1164 FAIL link.as: setAttribute() to "xaudio" assert_equals: IDL get expected "" but got "xaudio" 1165 FAIL link.as: setAttribute() to "audio\0" assert_equals: IDL get expected "" but got "audio\0" 1166 FAIL link.as: setAttribute() to "udio" assert_equals: IDL get expected "" but got "udio" 1164 PASS link.as: setAttribute() to "xaudio" 1165 PASS link.as: setAttribute() to "audio\0" 1166 PASS link.as: setAttribute() to "udio" 1167 1167 FAIL link.as: setAttribute() to "AUDIO" assert_equals: IDL get expected "audio" but got "AUDIO" 1168 PASS link.as: setAttribute() to "document" 1169 FAIL link.as: setAttribute() to "xdocument" assert_equals: IDL get expected "" but got "xdocument" 1170 FAIL link.as: setAttribute() to "document\0" assert_equals: IDL get expected "" but got "document\0" 1171 FAIL link.as: setAttribute() to "ocument" assert_equals: IDL get expected "" but got "ocument" 1172 FAIL link.as: setAttribute() to "DOCUMENT" assert_equals: IDL get expected "document" but got " DOCUMENT"1173 PASS link.as: setAttribute() to "embed" 1174 FAIL link.as: setAttribute() to "xembed" assert_equals: IDL get expected "" but got "xembed" 1175 FAIL link.as: setAttribute() to "embed\0" assert_equals: IDL get expected "" but got "embed\0" 1176 FAIL link.as: setAttribute() to "mbed" assert_equals: IDL get expected "" but got "mbed" 1177 FAIL link.as: setAttribute() to "EMBED" assert_equals: IDL get expected "embed" but got " EMBED"1168 FAIL link.as: setAttribute() to "document" assert_equals: IDL get expected "document" but got "" 1169 PASS link.as: setAttribute() to "xdocument" 1170 PASS link.as: setAttribute() to "document\0" 1171 PASS link.as: setAttribute() to "ocument" 1172 FAIL link.as: setAttribute() to "DOCUMENT" assert_equals: IDL get expected "document" but got "" 1173 FAIL link.as: setAttribute() to "embed" assert_equals: IDL get expected "embed" but got "" 1174 PASS link.as: setAttribute() to "xembed" 1175 PASS link.as: setAttribute() to "embed\0" 1176 PASS link.as: setAttribute() to "mbed" 1177 FAIL link.as: setAttribute() to "EMBED" assert_equals: IDL get expected "embed" but got "" 1178 1178 PASS link.as: setAttribute() to "font" 1179 FAIL link.as: setAttribute() to "xfont" assert_equals: IDL get expected "" but got "xfont" 1180 FAIL link.as: setAttribute() to "font\0" assert_equals: IDL get expected "" but got "font\0" 1181 FAIL link.as: setAttribute() to "ont" assert_equals: IDL get expected "" but got "ont" 1179 PASS link.as: setAttribute() to "xfont" 1180 PASS link.as: setAttribute() to "font\0" 1181 PASS link.as: setAttribute() to "ont" 1182 1182 FAIL link.as: setAttribute() to "FONT" assert_equals: IDL get expected "font" but got "FONT" 1183 1183 PASS link.as: setAttribute() to "image" 1184 FAIL link.as: setAttribute() to "ximage" assert_equals: IDL get expected "" but got "ximage" 1185 FAIL link.as: setAttribute() to "image\0" assert_equals: IDL get expected "" but got "image\0" 1186 FAIL link.as: setAttribute() to "mage" assert_equals: IDL get expected "" but got "mage" 1184 PASS link.as: setAttribute() to "ximage" 1185 PASS link.as: setAttribute() to "image\0" 1186 PASS link.as: setAttribute() to "mage" 1187 1187 FAIL link.as: setAttribute() to "IMAGE" assert_equals: IDL get expected "image" but got "IMAGE" 1188 PASS link.as: setAttribute() to "manifest" 1189 FAIL link.as: setAttribute() to "xmanifest" assert_equals: IDL get expected "" but got "xmanifest" 1190 FAIL link.as: setAttribute() to "manifest\0" assert_equals: IDL get expected "" but got "manifest\0" 1191 FAIL link.as: setAttribute() to "anifest" assert_equals: IDL get expected "" but got "anifest" 1192 FAIL link.as: setAttribute() to "MANIFEST" assert_equals: IDL get expected "manifest" but got " MANIFEST"1193 PASS link.as: setAttribute() to "object" 1194 FAIL link.as: setAttribute() to "xobject" assert_equals: IDL get expected "" but got "xobject" 1195 FAIL link.as: setAttribute() to "object\0" assert_equals: IDL get expected "" but got "object\0" 1196 FAIL link.as: setAttribute() to "bject" assert_equals: IDL get expected "" but got "bject" 1197 FAIL link.as: setAttribute() to "OBJECT" assert_equals: IDL get expected "object" but got " OBJECT"1198 PASS link.as: setAttribute() to "report" 1199 FAIL link.as: setAttribute() to "xreport" assert_equals: IDL get expected "" but got "xreport" 1200 FAIL link.as: setAttribute() to "report\0" assert_equals: IDL get expected "" but got "report\0" 1201 FAIL link.as: setAttribute() to "eport" assert_equals: IDL get expected "" but got "eport" 1202 FAIL link.as: setAttribute() to "REPORT" assert_equals: IDL get expected "report" but got " REPORT"1188 FAIL link.as: setAttribute() to "manifest" assert_equals: IDL get expected "manifest" but got "" 1189 PASS link.as: setAttribute() to "xmanifest" 1190 PASS link.as: setAttribute() to "manifest\0" 1191 PASS link.as: setAttribute() to "anifest" 1192 FAIL link.as: setAttribute() to "MANIFEST" assert_equals: IDL get expected "manifest" but got "" 1193 FAIL link.as: setAttribute() to "object" assert_equals: IDL get expected "object" but got "" 1194 PASS link.as: setAttribute() to "xobject" 1195 PASS link.as: setAttribute() to "object\0" 1196 PASS link.as: setAttribute() to "bject" 1197 FAIL link.as: setAttribute() to "OBJECT" assert_equals: IDL get expected "object" but got "" 1198 FAIL link.as: setAttribute() to "report" assert_equals: IDL get expected "report" but got "" 1199 PASS link.as: setAttribute() to "xreport" 1200 PASS link.as: setAttribute() to "report\0" 1201 PASS link.as: setAttribute() to "eport" 1202 FAIL link.as: setAttribute() to "REPORT" assert_equals: IDL get expected "report" but got "" 1203 1203 PASS link.as: setAttribute() to "script" 1204 FAIL link.as: setAttribute() to "xscript" assert_equals: IDL get expected "" but got "xscript" 1205 FAIL link.as: setAttribute() to "script\0" assert_equals: IDL get expected "" but got "script\0" 1206 FAIL link.as: setAttribute() to "cript" assert_equals: IDL get expected "" but got "cript" 1204 PASS link.as: setAttribute() to "xscript" 1205 PASS link.as: setAttribute() to "script\0" 1206 PASS link.as: setAttribute() to "cript" 1207 1207 FAIL link.as: setAttribute() to "SCRIPT" assert_equals: IDL get expected "script" but got "SCRIPT" 1208 PASS link.as: setAttribute() to "serviceworker" 1209 FAIL link.as: setAttribute() to "xserviceworker" assert_equals: IDL get expected "" but got "xserviceworker" 1210 FAIL link.as: setAttribute() to "serviceworker\0" assert_equals: IDL get expected "" but got "serviceworker\0" 1211 FAIL link.as: setAttribute() to "erviceworker" assert_equals: IDL get expected "" but got "erviceworker" 1212 FAIL link.as: setAttribute() to "SERVICEWORKER" assert_equals: IDL get expected "serviceworker" but got " SERVICEWORKER"1213 PASS link.as: setAttribute() to "sharedworker" 1214 FAIL link.as: setAttribute() to "xsharedworker" assert_equals: IDL get expected "" but got "xsharedworker" 1215 FAIL link.as: setAttribute() to "sharedworker\0" assert_equals: IDL get expected "" but got "sharedworker\0" 1216 FAIL link.as: setAttribute() to "haredworker" assert_equals: IDL get expected "" but got "haredworker" 1217 FAIL link.as: setAttribute() to "SHAREDWORKER" assert_equals: IDL get expected "sharedworker" but got " SHAREDWORKER"1208 FAIL link.as: setAttribute() to "serviceworker" assert_equals: IDL get expected "serviceworker" but got "" 1209 PASS link.as: setAttribute() to "xserviceworker" 1210 PASS link.as: setAttribute() to "serviceworker\0" 1211 PASS link.as: setAttribute() to "erviceworker" 1212 FAIL link.as: setAttribute() to "SERVICEWORKER" assert_equals: IDL get expected "serviceworker" but got "" 1213 FAIL link.as: setAttribute() to "sharedworker" assert_equals: IDL get expected "sharedworker" but got "" 1214 PASS link.as: setAttribute() to "xsharedworker" 1215 PASS link.as: setAttribute() to "sharedworker\0" 1216 PASS link.as: setAttribute() to "haredworker" 1217 FAIL link.as: setAttribute() to "SHAREDWORKER" assert_equals: IDL get expected "sharedworker" but got "" 1218 1218 PASS link.as: setAttribute() to "style" 1219 FAIL link.as: setAttribute() to "xstyle" assert_equals: IDL get expected "" but got "xstyle" 1220 FAIL link.as: setAttribute() to "style\0" assert_equals: IDL get expected "" but got "style\0" 1221 FAIL link.as: setAttribute() to "tyle" assert_equals: IDL get expected "" but got "tyle" 1219 PASS link.as: setAttribute() to "xstyle" 1220 PASS link.as: setAttribute() to "style\0" 1221 PASS link.as: setAttribute() to "tyle" 1222 1222 FAIL link.as: setAttribute() to "STYLE" assert_equals: IDL get expected "style" but got "STYLE" 1223 1223 PASS link.as: setAttribute() to "track" 1224 FAIL link.as: setAttribute() to "xtrack" assert_equals: IDL get expected "" but got "xtrack" 1225 FAIL link.as: setAttribute() to "track\0" assert_equals: IDL get expected "" but got "track\0" 1226 FAIL link.as: setAttribute() to "rack" assert_equals: IDL get expected "" but got "rack" 1224 PASS link.as: setAttribute() to "xtrack" 1225 PASS link.as: setAttribute() to "track\0" 1226 PASS link.as: setAttribute() to "rack" 1227 1227 FAIL link.as: setAttribute() to "TRACK" assert_equals: IDL get expected "track" but got "TRACK" 1228 1228 PASS link.as: setAttribute() to "video" 1229 FAIL link.as: setAttribute() to "xvideo" assert_equals: IDL get expected "" but got "xvideo" 1230 FAIL link.as: setAttribute() to "video\0" assert_equals: IDL get expected "" but got "video\0" 1231 FAIL link.as: setAttribute() to "ideo" assert_equals: IDL get expected "" but got "ideo" 1229 PASS link.as: setAttribute() to "xvideo" 1230 PASS link.as: setAttribute() to "video\0" 1231 PASS link.as: setAttribute() to "ideo" 1232 1232 FAIL link.as: setAttribute() to "VIDEO" assert_equals: IDL get expected "video" but got "VIDEO" 1233 PASS link.as: setAttribute() to "worker" 1234 FAIL link.as: setAttribute() to "xworker" assert_equals: IDL get expected "" but got "xworker" 1235 FAIL link.as: setAttribute() to "worker\0" assert_equals: IDL get expected "" but got "worker\0" 1236 FAIL link.as: setAttribute() to "orker" assert_equals: IDL get expected "" but got "orker" 1237 FAIL link.as: setAttribute() to "WORKER" assert_equals: IDL get expected "worker" but got " WORKER"1238 PASS link.as: setAttribute() to "xslt" 1239 FAIL link.as: setAttribute() to "xxslt" assert_equals: IDL get expected "" but got "xxslt" 1240 FAIL link.as: setAttribute() to "xslt\0" assert_equals: IDL get expected "" but got "xslt\0" 1241 FAIL link.as: setAttribute() to "slt" assert_equals: IDL get expected "" but got "slt" 1242 FAIL link.as: setAttribute() to "XSLT" assert_equals: IDL get expected "xslt" but got " XSLT"1233 FAIL link.as: setAttribute() to "worker" assert_equals: IDL get expected "worker" but got "" 1234 PASS link.as: setAttribute() to "xworker" 1235 PASS link.as: setAttribute() to "worker\0" 1236 PASS link.as: setAttribute() to "orker" 1237 FAIL link.as: setAttribute() to "WORKER" assert_equals: IDL get expected "worker" but got "" 1238 FAIL link.as: setAttribute() to "xslt" assert_equals: IDL get expected "xslt" but got "" 1239 PASS link.as: setAttribute() to "xxslt" 1240 PASS link.as: setAttribute() to "xslt\0" 1241 PASS link.as: setAttribute() to "slt" 1242 FAIL link.as: setAttribute() to "XSLT" assert_equals: IDL get expected "xslt" but got "" 1243 1243 PASS link.as: IDL set to "" 1244 FAIL link.as: IDL set to " \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 " assert_equals: IDL get expected "" but got " \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 " 1245 FAIL link.as: IDL set to undefined assert_equals: IDL get expected "" but got "undefined" 1246 FAIL link.as: IDL set to 7 assert_equals: IDL get expected "" but got "7" 1247 FAIL link.as: IDL set to 1.5 assert_equals: IDL get expected "" but got "1.5" 1248 FAIL link.as: IDL set to true assert_equals: IDL get expected "" but got "true" 1249 FAIL link.as: IDL set to false assert_equals: IDL get expected "" but got "false" 1250 FAIL link.as: IDL set to object "[object Object]" assert_equals: IDL get expected "" but got "[object Object]" 1251 FAIL link.as: IDL set to NaN assert_equals: IDL get expected "" but got "NaN" 1252 FAIL link.as: IDL set to Infinity assert_equals: IDL get expected "" but got "Infinity" 1253 FAIL link.as: IDL set to -Infinity assert_equals: IDL get expected "" but got "-Infinity" 1254 FAIL link.as: IDL set to "\0" assert_equals: IDL get expected "" but got "\0" 1255 FAIL link.as: IDL set to null assert_equals: IDL get expected "" but got "null" 1256 FAIL link.as: IDL set to object "test-toString" assert_equals: IDL get expected "" but got "test-toString" 1257 FAIL link.as: IDL set to object "test-valueOf" assert_equals: IDL get expected "" but got "test-valueOf" 1244 PASS link.as: IDL set to " \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 " 1245 PASS link.as: IDL set to undefined 1246 PASS link.as: IDL set to 7 1247 PASS link.as: IDL set to 1.5 1248 PASS link.as: IDL set to true 1249 PASS link.as: IDL set to false 1250 PASS link.as: IDL set to object "[object Object]" 1251 PASS link.as: IDL set to NaN 1252 PASS link.as: IDL set to Infinity 1253 PASS link.as: IDL set to -Infinity 1254 PASS link.as: IDL set to "\0" 1255 PASS link.as: IDL set to null 1256 PASS link.as: IDL set to object "test-toString" 1257 PASS link.as: IDL set to object "test-valueOf" 1258 1258 PASS link.as: IDL set to "audio" 1259 FAIL link.as: IDL set to "xaudio" assert_equals: IDL get expected "" but got "xaudio" 1260 FAIL link.as: IDL set to "audio\0" assert_equals: IDL get expected "" but got "audio\0" 1261 FAIL link.as: IDL set to "udio" assert_equals: IDL get expected "" but got "udio" 1259 PASS link.as: IDL set to "xaudio" 1260 PASS link.as: IDL set to "audio\0" 1261 PASS link.as: IDL set to "udio" 1262 1262 FAIL link.as: IDL set to "AUDIO" assert_equals: IDL get expected "audio" but got "AUDIO" 1263 PASS link.as: IDL set to "document" 1264 FAIL link.as: IDL set to "xdocument" assert_equals: IDL get expected "" but got "xdocument" 1265 FAIL link.as: IDL set to "document\0" assert_equals: IDL get expected "" but got "document\0" 1266 FAIL link.as: IDL set to "ocument" assert_equals: IDL get expected "" but got "ocument" 1267 FAIL link.as: IDL set to "DOCUMENT" assert_equals: IDL get expected "document" but got " DOCUMENT"1268 PASS link.as: IDL set to "embed" 1269 FAIL link.as: IDL set to "xembed" assert_equals: IDL get expected "" but got "xembed" 1270 FAIL link.as: IDL set to "embed\0" assert_equals: IDL get expected "" but got "embed\0" 1271 FAIL link.as: IDL set to "mbed" assert_equals: IDL get expected "" but got "mbed" 1272 FAIL link.as: IDL set to "EMBED" assert_equals: IDL get expected "embed" but got " EMBED"1263 FAIL link.as: IDL set to "document" assert_equals: IDL get expected "document" but got "" 1264 PASS link.as: IDL set to "xdocument" 1265 PASS link.as: IDL set to "document\0" 1266 PASS link.as: IDL set to "ocument" 1267 FAIL link.as: IDL set to "DOCUMENT" assert_equals: IDL get expected "document" but got "" 1268 FAIL link.as: IDL set to "embed" assert_equals: IDL get expected "embed" but got "" 1269 PASS link.as: IDL set to "xembed" 1270 PASS link.as: IDL set to "embed\0" 1271 PASS link.as: IDL set to "mbed" 1272 FAIL link.as: IDL set to "EMBED" assert_equals: IDL get expected "embed" but got "" 1273 1273 PASS link.as: IDL set to "font" 1274 FAIL link.as: IDL set to "xfont" assert_equals: IDL get expected "" but got "xfont" 1275 FAIL link.as: IDL set to "font\0" assert_equals: IDL get expected "" but got "font\0" 1276 FAIL link.as: IDL set to "ont" assert_equals: IDL get expected "" but got "ont" 1274 PASS link.as: IDL set to "xfont" 1275 PASS link.as: IDL set to "font\0" 1276 PASS link.as: IDL set to "ont" 1277 1277 FAIL link.as: IDL set to "FONT" assert_equals: IDL get expected "font" but got "FONT" 1278 1278 PASS link.as: IDL set to "image" 1279 FAIL link.as: IDL set to "ximage" assert_equals: IDL get expected "" but got "ximage" 1280 FAIL link.as: IDL set to "image\0" assert_equals: IDL get expected "" but got "image\0" 1281 FAIL link.as: IDL set to "mage" assert_equals: IDL get expected "" but got "mage" 1279 PASS link.as: IDL set to "ximage" 1280 PASS link.as: IDL set to "image\0" 1281 PASS link.as: IDL set to "mage" 1282 1282 FAIL link.as: IDL set to "IMAGE" assert_equals: IDL get expected "image" but got "IMAGE" 1283 PASS link.as: IDL set to "manifest" 1284 FAIL link.as: IDL set to "xmanifest" assert_equals: IDL get expected "" but got "xmanifest" 1285 FAIL link.as: IDL set to "manifest\0" assert_equals: IDL get expected "" but got "manifest\0" 1286 FAIL link.as: IDL set to "anifest" assert_equals: IDL get expected "" but got "anifest" 1287 FAIL link.as: IDL set to "MANIFEST" assert_equals: IDL get expected "manifest" but got " MANIFEST"1288 PASS link.as: IDL set to "object" 1289 FAIL link.as: IDL set to "xobject" assert_equals: IDL get expected "" but got "xobject" 1290 FAIL link.as: IDL set to "object\0" assert_equals: IDL get expected "" but got "object\0" 1291 FAIL link.as: IDL set to "bject" assert_equals: IDL get expected "" but got "bject" 1292 FAIL link.as: IDL set to "OBJECT" assert_equals: IDL get expected "object" but got " OBJECT"1293 PASS link.as: IDL set to "report" 1294 FAIL link.as: IDL set to "xreport" assert_equals: IDL get expected "" but got "xreport" 1295 FAIL link.as: IDL set to "report\0" assert_equals: IDL get expected "" but got "report\0" 1296 FAIL link.as: IDL set to "eport" assert_equals: IDL get expected "" but got "eport" 1297 FAIL link.as: IDL set to "REPORT" assert_equals: IDL get expected "report" but got " REPORT"1283 FAIL link.as: IDL set to "manifest" assert_equals: IDL get expected "manifest" but got "" 1284 PASS link.as: IDL set to "xmanifest" 1285 PASS link.as: IDL set to "manifest\0" 1286 PASS link.as: IDL set to "anifest" 1287 FAIL link.as: IDL set to "MANIFEST" assert_equals: IDL get expected "manifest" but got "" 1288 FAIL link.as: IDL set to "object" assert_equals: IDL get expected "object" but got "" 1289 PASS link.as: IDL set to "xobject" 1290 PASS link.as: IDL set to "object\0" 1291 PASS link.as: IDL set to "bject" 1292 FAIL link.as: IDL set to "OBJECT" assert_equals: IDL get expected "object" but got "" 1293 FAIL link.as: IDL set to "report" assert_equals: IDL get expected "report" but got "" 1294 PASS link.as: IDL set to "xreport" 1295 PASS link.as: IDL set to "report\0" 1296 PASS link.as: IDL set to "eport" 1297 FAIL link.as: IDL set to "REPORT" assert_equals: IDL get expected "report" but got "" 1298 1298 PASS link.as: IDL set to "script" 1299 FAIL link.as: IDL set to "xscript" assert_equals: IDL get expected "" but got "xscript" 1300 FAIL link.as: IDL set to "script\0" assert_equals: IDL get expected "" but got "script\0" 1301 FAIL link.as: IDL set to "cript" assert_equals: IDL get expected "" but got "cript" 1299 PASS link.as: IDL set to "xscript" 1300 PASS link.as: IDL set to "script\0" 1301 PASS link.as: IDL set to "cript" 1302 1302 FAIL link.as: IDL set to "SCRIPT" assert_equals: IDL get expected "script" but got "SCRIPT" 1303 PASS link.as: IDL set to "serviceworker" 1304 FAIL link.as: IDL set to "xserviceworker" assert_equals: IDL get expected "" but got "xserviceworker" 1305 FAIL link.as: IDL set to "serviceworker\0" assert_equals: IDL get expected "" but got "serviceworker\0" 1306 FAIL link.as: IDL set to "erviceworker" assert_equals: IDL get expected "" but got "erviceworker" 1307 FAIL link.as: IDL set to "SERVICEWORKER" assert_equals: IDL get expected "serviceworker" but got " SERVICEWORKER"1308 PASS link.as: IDL set to "sharedworker" 1309 FAIL link.as: IDL set to "xsharedworker" assert_equals: IDL get expected "" but got "xsharedworker" 1310 FAIL link.as: IDL set to "sharedworker\0" assert_equals: IDL get expected "" but got "sharedworker\0" 1311 FAIL link.as: IDL set to "haredworker" assert_equals: IDL get expected "" but got "haredworker" 1312 FAIL link.as: IDL set to "SHAREDWORKER" assert_equals: IDL get expected "sharedworker" but got " SHAREDWORKER"1303 FAIL link.as: IDL set to "serviceworker" assert_equals: IDL get expected "serviceworker" but got "" 1304 PASS link.as: IDL set to "xserviceworker" 1305 PASS link.as: IDL set to "serviceworker\0" 1306 PASS link.as: IDL set to "erviceworker" 1307 FAIL link.as: IDL set to "SERVICEWORKER" assert_equals: IDL get expected "serviceworker" but got "" 1308 FAIL link.as: IDL set to "sharedworker" assert_equals: IDL get expected "sharedworker" but got "" 1309 PASS link.as: IDL set to "xsharedworker" 1310 PASS link.as: IDL set to "sharedworker\0" 1311 PASS link.as: IDL set to "haredworker" 1312 FAIL link.as: IDL set to "SHAREDWORKER" assert_equals: IDL get expected "sharedworker" but got "" 1313 1313 PASS link.as: IDL set to "style" 1314 FAIL link.as: IDL set to "xstyle" assert_equals: IDL get expected "" but got "xstyle" 1315 FAIL link.as: IDL set to "style\0" assert_equals: IDL get expected "" but got "style\0" 1316 FAIL link.as: IDL set to "tyle" assert_equals: IDL get expected "" but got "tyle" 1314 PASS link.as: IDL set to "xstyle" 1315 PASS link.as: IDL set to "style\0" 1316 PASS link.as: IDL set to "tyle" 1317 1317 FAIL link.as: IDL set to "STYLE" assert_equals: IDL get expected "style" but got "STYLE" 1318 1318 PASS link.as: IDL set to "track" 1319 FAIL link.as: IDL set to "xtrack" assert_equals: IDL get expected "" but got "xtrack" 1320 FAIL link.as: IDL set to "track\0" assert_equals: IDL get expected "" but got "track\0" 1321 FAIL link.as: IDL set to "rack" assert_equals: IDL get expected "" but got "rack" 1319 PASS link.as: IDL set to "xtrack" 1320 PASS link.as: IDL set to "track\0" 1321 PASS link.as: IDL set to "rack" 1322 1322 FAIL link.as: IDL set to "TRACK" assert_equals: IDL get expected "track" but got "TRACK" 1323 1323 PASS link.as: IDL set to "video" 1324 FAIL link.as: IDL set to "xvideo" assert_equals: IDL get expected "" but got "xvideo" 1325 FAIL link.as: IDL set to "video\0" assert_equals: IDL get expected "" but got "video\0" 1326 FAIL link.as: IDL set to "ideo" assert_equals: IDL get expected "" but got "ideo" 1324 PASS link.as: IDL set to "xvideo" 1325 PASS link.as: IDL set to "video\0" 1326 PASS link.as: IDL set to "ideo" 1327 1327 FAIL link.as: IDL set to "VIDEO" assert_equals: IDL get expected "video" but got "VIDEO" 1328 PASS link.as: IDL set to "worker" 1329 FAIL link.as: IDL set to "xworker" assert_equals: IDL get expected "" but got "xworker" 1330 FAIL link.as: IDL set to "worker\0" assert_equals: IDL get expected "" but got "worker\0" 1331 FAIL link.as: IDL set to "orker" assert_equals: IDL get expected "" but got "orker" 1332 FAIL link.as: IDL set to "WORKER" assert_equals: IDL get expected "worker" but got " WORKER"1333 PASS link.as: IDL set to "xslt" 1334 FAIL link.as: IDL set to "xxslt" assert_equals: IDL get expected "" but got "xxslt" 1335 FAIL link.as: IDL set to "xslt\0" assert_equals: IDL get expected "" but got "xslt\0" 1336 FAIL link.as: IDL set to "slt" assert_equals: IDL get expected "" but got "slt" 1337 FAIL link.as: IDL set to "XSLT" assert_equals: IDL get expected "xslt" but got " XSLT"1328 FAIL link.as: IDL set to "worker" assert_equals: IDL get expected "worker" but got "" 1329 PASS link.as: IDL set to "xworker" 1330 PASS link.as: IDL set to "worker\0" 1331 PASS link.as: IDL set to "orker" 1332 FAIL link.as: IDL set to "WORKER" assert_equals: IDL get expected "worker" but got "" 1333 FAIL link.as: IDL set to "xslt" assert_equals: IDL get expected "xslt" but got "" 1334 PASS link.as: IDL set to "xxslt" 1335 PASS link.as: IDL set to "xslt\0" 1336 PASS link.as: IDL set to "slt" 1337 FAIL link.as: IDL set to "XSLT" assert_equals: IDL get expected "xslt" but got "" 1338 1338 PASS link.media: typeof IDL attribute 1339 1339 PASS link.media: IDL get with DOM attribute unset -
trunk/Source/WebCore/ChangeLog
r217959 r217962 1 2017-06-08 Yoav Weiss <yoav@yoav.ws> 2 3 [preload] Mandatory `as` value and related spec alignments 4 https://bugs.webkit.org/show_bug.cgi?id=173047 5 6 Reviewed by Dean Jackson. 7 8 Align preload's implementation according to latest spec changes: `as` is mandatory and "fetch" replaces the previous empty `as` value, 9 onerror no longer fires for invalid `as` values, and the IDL for `as` reflects only valid values, to enable feature detection. 10 11 Related standard discussions: 12 https://github.com/w3c/preload/issues/80 13 https://github.com/whatwg/fetch/pull/547 14 https://github.com/whatwg/fetch/pull/549 15 https://github.com/whatwg/html/pull/2588 16 17 No new tests but modified existing ones as well as their expectations. 18 19 * html/HTMLLinkElement.cpp: Add "enumerated attribute" reflection methods to `as`. 20 (WebCore::HTMLLinkElement::setAs): 21 (WebCore::HTMLLinkElement::as): 22 * html/HTMLLinkElement.h: 23 * html/HTMLLinkElement.idl: 24 * loader/LinkLoader.cpp: 25 (WebCore::LinkLoader::loadLinksFromHeader): preloadIfNeeded signature change. 26 (WebCore::LinkLoader::resourceTypeFromAsAttribute): Replace the empty value by "fetch". 27 (WebCore::LinkLoader::preloadIfNeeded): Change the signature, as a LinkLoaderClient is no longer needed, since we don't fire error 28 events from inside the function. 29 (WebCore::LinkLoader::loadLink): preloadIfNeeded signature change. 30 * loader/LinkLoader.h: preloadIfNeeded signature change. 31 1 32 2017-06-08 Chris Dumez <cdumez@apple.com> 2 33 -
trunk/Source/WebCore/html/HTMLLinkElement.cpp
r217256 r217962 220 220 } 221 221 222 void HTMLLinkElement::setAs(const AtomicString& value) 223 { 224 setAttributeWithoutSynchronization(asAttr, value); 225 } 226 227 String HTMLLinkElement::as() const 228 { 229 String as = attributeWithoutSynchronization(asAttr); 230 if (equalLettersIgnoringASCIICase(as, "fetch") 231 || equalLettersIgnoringASCIICase(as, "image") 232 || equalLettersIgnoringASCIICase(as, "script") 233 || equalLettersIgnoringASCIICase(as, "style") 234 || equalLettersIgnoringASCIICase(as, "video") 235 || equalLettersIgnoringASCIICase(as, "audio") 236 || equalLettersIgnoringASCIICase(as, "font") 237 #if ENABLE(VIDEO_TRACK) 238 || equalLettersIgnoringASCIICase(as, "track")) 239 #endif 240 return as; 241 return String(); 242 } 243 222 244 void HTMLLinkElement::process() 223 245 { -
trunk/Source/WebCore/html/HTMLLinkElement.h
r216978 r217962 66 66 WEBCORE_EXPORT void setCrossOrigin(const AtomicString&); 67 67 WEBCORE_EXPORT String crossOrigin() const; 68 WEBCORE_EXPORT void setAs(const AtomicString&); 69 WEBCORE_EXPORT String as() const; 68 70 69 71 void dispatchPendingEvent(LinkEventSender*); -
trunk/Source/WebCore/html/HTMLLinkElement.idl
r216347 r217962 34 34 [Reflect] attribute DOMString target; 35 35 [Reflect] attribute DOMString type; 36 [Reflect]attribute DOMString as;36 attribute DOMString as; 37 37 attribute DOMString? crossOrigin; 38 38 -
trunk/Source/WebCore/loader/LinkLoader.cpp
r217863 r217962 108 108 if (equalIgnoringFragmentIdentifier(url, baseURL)) 109 109 continue; 110 preloadIfNeeded(relAttribute, url, document, header.as(), header.media(), header.mimeType(), header.crossOrigin(), nullptr , nullptr);110 preloadIfNeeded(relAttribute, url, document, header.as(), header.media(), header.mimeType(), header.crossOrigin(), nullptr); 111 111 } 112 112 } … … 114 114 std::optional<CachedResource::Type> LinkLoader::resourceTypeFromAsAttribute(const String& as) 115 115 { 116 if ( as.isEmpty())116 if (equalLettersIgnoringASCIICase(as, "fetch")) 117 117 return CachedResource::RawResource; 118 118 if (equalLettersIgnoringASCIICase(as, "image")) … … 201 201 } 202 202 203 std::unique_ptr<LinkPreloadResourceClient> LinkLoader::preloadIfNeeded(const LinkRelAttribute& relAttribute, const URL& href, Document& document, const String& as, const String& media, const String& mimeType, const String& crossOriginMode, LinkLoader* loader , LinkLoaderClient* client)203 std::unique_ptr<LinkPreloadResourceClient> LinkLoader::preloadIfNeeded(const LinkRelAttribute& relAttribute, const URL& href, Document& document, const String& as, const String& media, const String& mimeType, const String& crossOriginMode, LinkLoader* loader) 204 204 { 205 205 if (!document.loader() || !relAttribute.isLinkPreload) … … 214 214 if (!type) { 215 215 document.addConsoleMessage(MessageSource::Other, MessageLevel::Error, String("<link rel=preload> must have a valid `as` value")); 216 if (client)217 client->linkLoadingErrored();218 216 return nullptr; 219 217 } … … 253 251 254 252 if (m_client.shouldLoadLink()) { 255 auto resourceClient = preloadIfNeeded(relAttribute, href, document, as, media, mimeType, crossOrigin, this , &m_client);253 auto resourceClient = preloadIfNeeded(relAttribute, href, document, as, media, mimeType, crossOrigin, this); 256 254 if (resourceClient) 257 255 m_preloadResourceClient = WTFMove(resourceClient); -
trunk/Source/WebCore/loader/LinkLoader.h
r217247 r217962 65 65 private: 66 66 void notifyFinished(CachedResource&) override; 67 static std::unique_ptr<LinkPreloadResourceClient> preloadIfNeeded(const LinkRelAttribute&, const URL& href, Document&, const String& as, const String& media, const String& type, const String& crossOriginMode, LinkLoader* , LinkLoaderClient*);67 static std::unique_ptr<LinkPreloadResourceClient> preloadIfNeeded(const LinkRelAttribute&, const URL& href, Document&, const String& as, const String& media, const String& type, const String& crossOriginMode, LinkLoader*); 68 68 69 69 LinkLoaderClient& m_client;
Note: See TracChangeset
for help on using the changeset viewer.