Implement speculation rules - same origin conservative prefetch#47366
Implement speculation rules - same origin conservative prefetch#47366yoavweiss wants to merge 1 commit into
Conversation
|
EWS run on previous version of this PR (hash 23ff6f6) Details |
|
EWS run on previous version of this PR (hash 4058b34) Details |
|
EWS run on previous version of this PR (hash 7290f87) Details |
Safer C++ Build #42068 (7290f87)❌ Found 5 failing files with 16 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
|
EWS run on previous version of this PR (hash 3351e3f) Details |
Safer C++ Build #42219 (3351e3f)❌ Found 5 failing files with 16 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
|
EWS run on previous version of this PR (hash 5400670) Details |
Safer C++ Build #42237 (5400670)❌ Found 3 failing files with 14 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
|
EWS run on previous version of this PR (hash 37fae3c) Details |
Safer C++ Build #42282 (37fae3c)❌ Found 2 failing files with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
|
EWS run on previous version of this PR (hash f57d3a9) Details |
|
EWS run on previous version of this PR (hash 2aefcc7) Details |
Safer C++ Build #42352 (2aefcc7)❌ Found 1 failing file with 3 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
|
EWS run on previous version of this PR (hash 8c8924c) Details |
|
EWS run on previous version of this PR (hash a2ebd02) Details |
|
EWS run on previous version of this PR (hash 9315cd4) Details |
|
EWS run on previous version of this PR (hash bfcb7f7) Details |
|
EWS run on previous version of this PR (hash 54c883e) Details |
|
EWS run on previous version of this PR (hash 579bbcf) Details |
|
EWS run on previous version of this PR (hash e2c34c5) Details |
Safer C++ Build #42725 (579bbcf)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
Safer C++ Build #42729 (e2c34c5)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
|
EWS run on previous version of this PR (hash d291efd) Details |
Safer C++ Build #42751 (d291efd)❌ Found 1 failing file with 1 issue. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
|
EWS run on previous version of this PR (hash b65c6df) Details |
|
EWS run on previous version of this PR (hash 746102c) Details |
|
EWS run on previous version of this PR (hash 097f57b) Details |
|
EWS run on previous version of this PR (hash 694fd28) Details |
|
EWS run on previous version of this PR (hash 1edb7c2) Details |
https://bugs.webkit.org/show_bug.cgi?id=295193 Reviewed by NOBODY (OOPS!). This implements an initial version of same-origin conservative prefetch speculation rules. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https.html: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=and-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=baseURLChangedByBaseElement-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=baseURLChangedBySameDocumentNavigation-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=defaultPredicate-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=hrefMatches-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=immediateMutation-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=invalidPredicate-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=linkHrefChanged-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=linkInShadowTree-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=linkToSelfFragment-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=newRuleSetAdded-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=not-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=or-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=selectorMatches-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=selectorMatchesDisplayLocked-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=selectorMatchesDisplayNone-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=selectorMatchesScopingRoot-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/document-rules.https_include=unslottedLink-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/prefetch-single.https.html: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/prefetch-single.https_from_protocol=http&to_protocol=http-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/prefetch-single.https_from_protocol=http&to_protocol=https-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/prefetch-single.https_from_protocol=https&to_protocol=http-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/prefetch-single.https_from_protocol=https&to_protocol=https-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/resources/executor.sub.html: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/resources/executor.sub.html.headers: Added. * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/resources/prefetch.py: Added. (main): * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/prefetch/resources/utils.sub.js: Added. (PrefetchAgent): (PrefetchAgent.prototype.getExecutorURL): (PrefetchAgent.prototype.async forceSinglePrefetch): (PrefetchAgent.prototype.async forceSpeculationRules): (PrefetchAgent.prototype.async navigate): (PrefetchAgent.prototype.async getRequestHeaders): (PrefetchAgent.prototype.async getResponseCookies): (PrefetchAgent.prototype.async getRequestCookies): (PrefetchAgent.prototype.async getRequestCredentials): (PrefetchAgent.prototype.async setReferrerPolicy): (PrefetchAgent.prototype.async getDeliveryType): (getPrefetchUrl): * LayoutTests/imported/w3c/web-platform-tests/speculation-rules/resources/utils.js: Added. (globalThis.assertSpeculationRulesIsSupported): (globalThis.RemoteContextHelper.PreloadingRemoteContextWrapper.prototype.addPreload): (globalThis.RemoteContextHelper.PreloadingRemoteContextWrapper): * Source/JavaScriptCore/CMakeLists.txt: * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: * Source/JavaScriptCore/Sources.txt: * Source/JavaScriptCore/runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::JSGlobalObject): * Source/JavaScriptCore/runtime/JSGlobalObject.h: (JSC::JSGlobalObject::speculationRules const): (JSC::JSGlobalObject::speculationRules): * Source/JavaScriptCore/runtime/SpeculationRules.cpp: Added. (JSC::parseStringOrStringList): (JSC::parseDocumentPredicate): (JSC::parseSingleRule): (JSC::parseRules): (JSC::SpeculationRules::parseSpeculationRules): * Source/JavaScriptCore/runtime/SpeculationRules.h: Added. (JSC::SpeculationRules::DocumentPredicate::DocumentPredicate): (JSC::SpeculationRules::DocumentPredicate::value const): (JSC::SpeculationRules::create): (JSC::SpeculationRules::prefetchRules const): * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/bindings/js/ScriptController.cpp: (WebCore::ScriptController::registerSpeculationRules): * Source/WebCore/bindings/js/ScriptController.h: * Source/WebCore/dom/Document.cpp: (WebCore::Document::resolveStyle): (WebCore::Document::updateBaseURL): (WebCore::Document::considerSpeculationRules): (WebCore::Document::prefetch): * Source/WebCore/dom/Document.h: * Source/WebCore/dom/ScriptElement.cpp: (WebCore::ScriptElement::determineScriptType): (WebCore::ScriptElement::prepareScript): (WebCore::ScriptElement::registerSpeculationRules): * Source/WebCore/dom/ScriptElement.h: * Source/WebCore/dom/ScriptElementCachedScriptFetcher.h: (WebCore::ScriptElementCachedScriptFetcher::isSpeculationRules const): * Source/WebCore/dom/ScriptType.h: * Source/WebCore/dom/SpeculationRulesMatcher.cpp: Copied from Source/WebCore/dom/ScriptElementCachedScriptFetcher.h. (WebCore::matches): (WebCore::SpeculationRulesMatcher::hasMatchingRule): * Source/WebCore/dom/SpeculationRulesMatcher.h: Copied from Source/WebCore/dom/ScriptElementCachedScriptFetcher.h. * Source/WebCore/dom/TextDecoderStreamDecoder.cpp: * Source/WebCore/dom/TrustedTypePolicy.cpp: * Source/WebCore/html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::defaultEventHandler): (WebCore::HTMLAnchorElement::attributeChanged): (WebCore::HTMLAnchorElement::insertedIntoAncestor): (WebCore::HTMLAnchorElement::setFullURL): (WebCore::HTMLAnchorElement::setShouldBePrefetched): (WebCore::HTMLAnchorElement::checkForSpeculationRules): * Source/WebCore/html/HTMLAnchorElement.h: * Source/WebCore/html/HTMLScriptElement.h: * Source/WebCore/loader/DocumentLoader.cpp: (WebCore::DocumentLoader::becomeMainResourceClient): (WebCore::DocumentLoader::setPrefetchedMainResource): * Source/WebCore/loader/DocumentLoader.h: * Source/WebCore/loader/DocumentPrefetcher.cpp: Copied from Source/WebCore/dom/ScriptType.h. (WebCore::DocumentPrefetcher::DocumentPrefetcher): (WebCore::DocumentPrefetcher::~DocumentPrefetcher): (WebCore::DocumentPrefetcher::prefetch): (WebCore::DocumentPrefetcher::matchPrefetchedDocument): (WebCore::DocumentPrefetcher::clear): * Source/WebCore/loader/DocumentPrefetcher.h: Copied from Source/WebCore/dom/ScriptType.h. (WebCore::DocumentPrefetcher::create): * Source/WebCore/loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): (WebCore::FrameLoader::dispatchDidCommitLoad): (WebCore::FrameLoader::prefetch): * Source/WebCore/loader/FrameLoader.h: * Source/WebCore/loader/LinkLoader.cpp: * Source/WebCore/loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const): * Source/WebCore/platform/ReferrerPolicy.cpp: (WebCore::parseReferrerPolicy): * Source/WebCore/platform/ReferrerPolicy.h: * Source/WebCore/platform/network/HTTPHeaderNames.in: * Tools/Scripts/webkitpy/style/checkers/cpp.py: (_check_parameter_name_against_text):
|
EWS run on current version of this PR (hash aa36ac4) Details |
7290f870cd7072c766b25f77424e628d6b34a38a
aa36ac4