Source/WebCore:
authorbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Sep 2016 19:58:28 +0000 (19:58 +0000)
committerbweinstein@apple.com <bweinstein@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Sep 2016 19:58:28 +0000 (19:58 +0000)
commita488bc1d971138268f426064f245eee2c3b3a35a
tree89d0ae758b5a2b5046eb0a9589e7687763841698
parent96a7f3ab758cb5407a844f2bdb07dc5cf87723e1
Source/WebCore:
Consult with the FrameLoaderClient about whether or not content extensions should be enabled when loading this URL.
https://bugs.webkit.org/show_bug.cgi?id=161441

Reviewed by Darin Adler.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): If content extensions aren't already disabled, consult with the
FrameLoaderClient about whether or not we should use content extensions for this URL.
* loader/FrameLoaderClient.h: Add the FrameLoaderClient call to determine if we should use content extensions for a given
URL...
* loader/EmptyClients.h: ... And add a stub implementation.

Source/WebKit/mac:
Implement a stub version of FrameLoaderClient::shouldUseContentExtensionsForURL.
https://bugs.webkit.org/show_bug.cgi?id=16144

Reviewed by Darin Adler.

* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:
Implement WebFrameLoaderClient::shouldUseContentExtensionsForURL and consult the InjectedBundlePageLoaderClient.
https://bugs.webkit.org/show_bug.cgi?id=161441

Reviewed by Darin Adler.

WebFrameLoaderClient::shouldUseContentExtensionsForURL only consults the injected bundle, because we don't want to
defer the loading of every main resource to consult with the UI Process about whether or not we should use content
extensions for the load.

* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h: Bump the latest version to WKBundlePageLoaderClientV9 and
add WKBundlePageShouldUseContentExtensionsForURLCallback.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::shouldUseContentExtensionsForURL): Ask the client if we should use content
extensions for this URL.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldUseContentExtensionsForURL): Only consult with the injected bundle about whether
or not we should use content extensions for this URL.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h