Add a new ResourceLoaderOption to avoid page defers loading mechanisms for inspector
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Sep 2015 08:47:22 +0000 (08:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Sep 2015 08:47:22 +0000 (08:47 +0000)
commit56227dcb664a922b2ff6c18de8b8f6a82b4e61f6
treee6caeaf18628bddb8ae60f3b8c728c299887e388
parentcced9ff408f9aa517bc3088dad700879969e6b5f
Add a new ResourceLoaderOption to avoid page defers loading mechanisms for inspector
https://bugs.webkit.org/show_bug.cgi?id=148727

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-09-05
Reviewed by Antti Koivisto.

This will be tested shortly by inspector tests.

* loader/ResourceLoaderOptions.h:
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
(WebCore::ResourceLoaderOptions::defersLoadingPolicy):
(WebCore::ResourceLoaderOptions::setDefersLoadingPolicy):
Add a new policy for defers loading. The default is to allow defers loading.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::init):
(WebCore::ResourceLoader::setDefersLoading):
Respect the defers loading policy whenever we would set defers loading status.

* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::loadResource):
Switch from incorrectly changing the defersLoading state of the loader
to setting an option to disallow defers loading entirely for the loader.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::start):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading):
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):
Add the new value to instance of the longhand ResourceLoaderOptions constructor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/MediaResourceLoader.cpp
Source/WebCore/loader/NetscapePlugInStreamLoader.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoaderOptions.h
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/icon/IconLoader.cpp
Source/WebCore/platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp
Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm