Save linked subresources when saving web page resources#22623
Conversation
|
EWS run on previous version of this PR (hash 409a0c3) Details
|
There was a problem hiding this comment.
Naming suggestion: linksToExternalResource(attr)
There was a problem hiding this comment.
Based on @rniwa's comment, It seems we only need to collect URLs for subresources that may be fetched based on https://html.spec.whatwg.org/multipage/semantics.html#fetching-and-processing-a-resource-from-a-link-element, so I updated this to mayFetchResource. Let me know if you think there is better naming for this.
There was a problem hiding this comment.
We shouldn't need to do prefetch or preconnect either
There was a problem hiding this comment.
It seems prefetch could request the resource (LinkLoader::prefetchIfNeeded) but preconnect and DNSPrefetch do not, so I removed reconnect and DNSPrefetch from the list.
There was a problem hiding this comment.
Well, prefetch COULD request the resource but the effect isn't script observable so we don't need to do it.
409a0c3 to
b34ef4a
Compare
|
EWS run on previous version of this PR (hash b34ef4a) Details |
b34ef4a to
4e64621
Compare
|
EWS run on previous version of this PR (hash 4e64621) Details
|
4e64621 to
3b82ed3
Compare
|
EWS run on current version of this PR (hash 3b82ed3) Details
|
https://bugs.webkit.org/show_bug.cgi?id=267372 rdar://120491493 Reviewed by Ryosuke Niwa and BJ Burg. When collecting subresources URLs, we should include URL of link element if it is a link to external resource (https://html.spec.whatwg.org/multipage/links.html#linkTypes), and it may fetch or cache the linked resource (https://html.spec.whatwg.org/multipage/semantics.html#fetching-and-processing-a-resource-from-a-link-element). We currently only include URL of style sheet. Update API test: WebArchive.SaveResourcesLink * Source/WebCore/html/HTMLLinkElement.cpp: (WebCore::mayFetchResource): (WebCore::HTMLLinkElement::addSubresourceAttributeURLs const): * Tools/TestWebKitAPI/Tests/WebKitCocoa/CreateWebArchive.mm: Canonical link: https://commits.webkit.org/272925@main
3b82ed3 to
f006d3e
Compare
|
Committed 272925@main (f006d3e): https://commits.webkit.org/272925@main Reviewed commits have been landed. Closing PR #22623 and removing active labels. |
f006d3e
3b82ed3
🧪 wpe-wk2🧪 ios-wk2-wpt🧪 gtk-wk2🧪 mac-AS-debug-wk2🧪 api-gtk