Remove CredentialRequest ResourceLoaderOptions
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jul 2016 07:59:20 +0000 (07:59 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jul 2016 07:59:20 +0000 (07:59 +0000)
commit1a1b6e570fdcfc560203b3707a18ef756da52ac5
tree529dd3d3d352d795899ca53eaf43aa60c1e42478
parent094b258f0b4ec4a46fde193dca64976f820a2160
Remove CredentialRequest ResourceLoaderOptions
https://bugs.webkit.org/show_bug.cgi?id=159404

Patch by Youenn Fablet <youenn@apple.com> on 2016-07-05
Reviewed by Sam Weinig.

No observable change of behavior.
Removing CredentialRequest from ResourceLoaderOptions and replacing it by FetchOptions::Credentials.
As per https://fetch.spec.whatwg.org/#http-fetch, credentials flag is set according FetchOptions::Credentials.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Set credentials mode to Include.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::redirectReceived): Disable credentials if credentials mode is SameOrigin
(request being cross origin).
* loader/MediaResourceLoader.cpp: Refqctoring to use CachedResourceReauest::setAsPotentiallyCrossOrigin.
Removed unnecessary ResourceRequest copy by using the mutable request of CachedResourceRequest.
(WebCore::MediaResourceLoader::requestResource):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Set credential mode  to Include
* loader/ResourceLoaderOptions.h: Removing CredentialRequest option.
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
(WebCore::ResourceLoaderOptions::credentialRequest): Deleted.
(WebCore::ResourceLoaderOptions::setCredentialRequest): Deleted.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Set credential mode to Include.
(WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin): Set credential mode according crossorigin
atribute value.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading): Set credential mode to Omit.
* page/EventSource.cpp:
(WebCore::EventSource::connect): Set credential mode according crossorigin atribute value.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading): Set credential mode to Omit.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
* platform/network/ResourceHandleTypes.h: Removed definition of CredentialRequest.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest): Set credential mode according crossorigin atribute value.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/loader/MediaResourceLoader.cpp
Source/WebCore/loader/NetscapePlugInStreamLoader.cpp
Source/WebCore/loader/ResourceLoaderOptions.h
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedResourceRequest.cpp
Source/WebCore/loader/icon/IconLoader.cpp
Source/WebCore/page/EventSource.cpp
Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp
Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm
Source/WebCore/platform/network/ResourceHandleTypes.h
Source/WebCore/xml/XMLHttpRequest.cpp