[BlackBerry] Set correct ResourceRequest target type.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Mar 2012 07:24:58 +0000 (07:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Mar 2012 07:24:58 +0000 (07:24 +0000)
commit7d5f755034e9bb24c19bf1520c2f0534e72410f9
tree31cd07882487bd5a169e4058182060296d59e1a0
parent12e706aeac6cba6a19b7e151f905a43807d5c6d2
[BlackBerry] Set correct ResourceRequest target type.
https://bugs.webkit.org/show_bug.cgi?id=80430

Patch by Lianghui Chen <liachen@rim.com> on 2012-03-06
Reviewed by Rob Buis.

Source/WebCore:

For loads started by AppCache, they are based on the manifest file,
it is not definitely sure what target it is for, so we just guess
based on its mimetype or file extension.

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::createResourceHandle):
* loader/cache/CachedResource.cpp:
(WebCore):
(WebCore::CachedResource::load):
* platform/network/blackberry/ResourceRequest.h:
(ResourceRequest):
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore):
(WebCore::mimeTypeRequestTypeMap):
(WebCore::ResourceRequest::targetTypeFromMimeType):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerScriptLoader::load):
* workers/Worker.cpp:
(WebCore::Worker::create):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::importScripts):
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::createResourceRequest):
* workers/WorkerScriptLoader.h:
(WorkerScriptLoader):

Source/WebKit/blackberry:

Removed unused code in dispatchWillSendRequest(). These codes are too
late as the target type has already been referred to when calling
ResourceRequest::initializePlatformRequest().

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/platform/network/blackberry/ResourceRequest.h
Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp
Source/WebCore/workers/DefaultSharedWorkerRepository.cpp
Source/WebCore/workers/Worker.cpp
Source/WebCore/workers/WorkerContext.cpp
Source/WebCore/workers/WorkerScriptLoader.cpp
Source/WebCore/workers/WorkerScriptLoader.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp