REGRESSION: We see authentication challenge sheets for favicon requests.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2013 19:07:44 +0000 (19:07 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2013 19:07:44 +0000 (19:07 +0000)
commit851b5f00247bf5399acc27d3fc2ac6ce18d6f31f
treeeabef6aea9fba0719b435e2e0de9f0b241a222ca
parented06701323c9d16a383a88f34618055f469d804f
REGRESSION: We see authentication challenge sheets for favicon requests.
<rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288

Reviewed by Alexey Proskuryakov.

Source/WebCore:

No new tests (Not in a tested config, might fix existing test).

Rename ClientCrossOriginCredentialPolicy to ClientCredentialPolicy, make it be three options.
and move it to ResourceHandleTypes where it belongs:
* loader/ResourceLoaderOptions.h:
* platform/network/ResourceHandleTypes.h:

Expose the ClientCredentialPolicy the ResourceLoader was created with:
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::clientCredentialPolicy):

Rework the “should ask client” clause for the new values of ClientCredentialPolicy:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):

Rework loadResourceSynchronously() to include a ClientCredentialPolicy argument:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/FrameLoader.h:
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously):
* loader/LoaderStrategy.h:

Never ask the client for credentials for icon loads:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):

Update all other users of ClientCredentialPolicy to the appropriate new value,
and update all users of loadResourceSynchronously to the new function signature:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/FrameLoader.h:
(FrameLoader):
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously):
* loader/LoaderStrategy.h:
(LoaderStrategy):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):

* WebCore.exp.in:

Source/WebKit2:

Have NetworkResourceLoadParameters remember the ClientCredentialPolicy:
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:

Pass along the ClientCredentialPolicy to the NetworkProcess:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Have the SchedulableLoader remember the ClientCredentialPolicy:
* NetworkProcess/SchedulableLoader.cpp:
(WebKit::SchedulableLoader::SchedulableLoader):
* NetworkProcess/SchedulableLoader.h:
(WebKit::SchedulableLoader::clientCredentialPolicy):

Don’t message for credentials if the ClientCredentialPolicy forbids it:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
* NetworkProcess/NetworkResourceLoader.h:

Update for the new loadResourceSynchronously signature (which is still a no-op on the NetworkProcess side):
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::loadResourceSynchronously):
* NetworkProcess/NetworkProcessPlatformStrategies.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/LoaderStrategy.cpp
Source/WebCore/loader/LoaderStrategy.h
Source/WebCore/loader/NetscapePlugInStreamLoader.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.h
Source/WebCore/loader/ResourceLoaderOptions.h
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/icon/IconLoader.cpp
Source/WebCore/platform/network/ResourceHandleTypes.h
Source/WebCore/xml/XSLTProcessorLibxslt.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.cpp
Source/WebKit2/NetworkProcess/NetworkProcessPlatformStrategies.h
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/NetworkResourceLoader.h
Source/WebKit2/NetworkProcess/SchedulableLoader.cpp
Source/WebKit2/NetworkProcess/SchedulableLoader.h
Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.cpp
Source/WebKit2/Shared/Network/NetworkResourceLoadParameters.h
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h