Changeset 247481 in webkit
- Timestamp:
- Jul 16, 2019, 8:55:05 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247475 r247481 1 2019-07-16 Rob Buis <rbuis@igalia.com> 2 3 Remove support for beforeload on link=prefetch 4 https://bugs.webkit.org/show_bug.cgi?id=199632 5 6 Reviewed by Youenn Fablet. 7 8 Add tests to verify that beforeload event is not called for link 9 rel=prefetch. 10 11 12 * TestExpectations: 13 * fast/dom/HTMLLinkElement/prefetch-beforeload-expected.txt: Removed. 14 * fast/dom/HTMLLinkElement/prefetch-beforeload.html: Removed. 15 * http/wpt/prefetch/beforeload-dynamic-expected.txt: Added. 16 * http/wpt/prefetch/beforeload-dynamic.html: Added. 17 * http/wpt/prefetch/beforeload-expected.txt: Added. 18 * http/wpt/prefetch/beforeload.html: Added. 19 * platform/mac-wk1/TestExpectations: 20 * platform/win/TestExpectations: 21 1 22 2019-07-15 Ryan Haddad <ryanhaddad@apple.com> 2 23 -
trunk/LayoutTests/TestExpectations
r247377 r247481 2334 2334 webkit.org/b/3652 fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html [ Skip ] 2335 2335 webkit.org/b/3652 fast/dom/HTMLLinkElement/prefetch.html [ Skip ] 2336 webkit.org/b/3652 fast/dom/HTMLLinkElement/prefetch-beforeload.html [ Skip ]2337 2336 webkit.org/b/3652 fast/dom/HTMLLinkElement/prefetch-onerror.html [ Skip ] 2338 2337 webkit.org/b/3652 fast/dom/HTMLLinkElement/prefetch-onload.html [ Skip ] -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r247295 r247481 737 737 webkit.org/b/197371 http/wpt/prefetch/link-prefetch-main-resource-redirect.html [ Skip ] 738 738 739 webkit.org/b/199632 http/wpt/prefetch/beforeload.html [ Skip ] 740 webkit.org/b/199632 http/wpt/prefetch/beforeload-dynamic.html [ Skip ] 741 739 742 webkit.org/b/198177 pointerevents/mouse/compatibility-mouse-events-prevention-mouse-pressed.html [ Skip ] 740 743 -
trunk/LayoutTests/platform/win/TestExpectations
r247457 r247481 4421 4421 webkit.org/b/197371 http/wpt/prefetch/link-prefetch-main-resource-redirect.html [ Skip ] 4422 4422 4423 webkit.org/b/199632 http/wpt/prefetch/beforeload.html [ Skip ] 4424 webkit.org/b/199632 http/wpt/prefetch/beforeload-dynamic.html [ Skip ] 4425 4423 4426 webkit.org/b/198112 http/tests/security/showModalDialog-sync-cross-origin-page-load2.html [ Skip ] 4424 4427 -
trunk/Source/WebCore/ChangeLog
r247480 r247481 1 2019-07-16 Rob Buis <rbuis@igalia.com> 2 3 Remove support for beforeload on link=prefetch 4 https://bugs.webkit.org/show_bug.cgi?id=199632 5 6 Reviewed by Youenn Fablet. 7 8 Remove support for beforeload on link=prefetch 9 by not calling shouldLoadLink for prefetch. 10 Also make loadLink return void since it always 11 succeeds. 12 13 Tests: http/wpt/prefetch/beforeload-dynamic.html 14 http/wpt/prefetch/beforeload.html 15 16 * html/HTMLLinkElement.cpp: 17 (WebCore::HTMLLinkElement::process): 18 * loader/LinkLoader.cpp: 19 (WebCore::LinkLoader::prefetchIfNeeded): 20 (WebCore::LinkLoader::loadLink): 21 * loader/LinkLoader.h: 22 1 23 2019-07-16 Youenn Fablet <youenn@apple.com> 2 24 -
trunk/Source/WebCore/html/HTMLLinkElement.cpp
r246786 r247481 274 274 }; 275 275 276 if (!m_linkLoader.loadLink(params, document())) 277 return; 276 m_linkLoader.loadLink(params, document()); 278 277 279 278 bool treatAsStyleSheet = m_relAttribute.isStyleSheet -
trunk/Source/WebCore/loader/LinkLoader.cpp
r246786 r247481 284 284 void LinkLoader::prefetchIfNeeded(const LinkLoadParameters& params, Document& document) 285 285 { 286 if (!params. relAttribute.isLinkPrefetch || !params.href.isValid() || !document.frame() || !m_client.shouldLoadLink())286 if (!params.href.isValid() || !document.frame()) 287 287 return; 288 288 … … 317 317 } 318 318 319 boolLinkLoader::loadLink(const LinkLoadParameters& params, Document& document)319 void LinkLoader::loadLink(const LinkLoadParameters& params, Document& document) 320 320 { 321 321 if (params.relAttribute.isDNSPrefetch) { … … 327 327 328 328 preconnectIfNeeded(params, document); 329 330 if (params.relAttribute.isLinkPrefetch) { 331 prefetchIfNeeded(params, document); 332 return; 333 } 329 334 330 335 if (m_client.shouldLoadLink()) { … … 335 340 m_preloadResourceClient = WTFMove(resourceClient); 336 341 } 337 338 prefetchIfNeeded(params, document); 339 340 return true; 341 } 342 343 } 342 } 343 344 } -
trunk/Source/WebCore/loader/LinkLoader.h
r246786 r247481 61 61 virtual ~LinkLoader(); 62 62 63 boolloadLink(const LinkLoadParameters&, Document&);63 void loadLink(const LinkLoadParameters&, Document&); 64 64 static Optional<CachedResource::Type> resourceTypeFromAsAttribute(const String& as); 65 65
Note:
See TracChangeset
for help on using the changeset viewer.