Add initiator to CachedResourceRequest.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 18:52:28 +0000 (18:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Nov 2012 18:52:28 +0000 (18:52 +0000)
commit21dd909e3f64d3f10740272e96773d635f91875b
tree124391dbaebcef72b69598bc11c6576c35f59825
parent559f3c4767ef0b00a5f1a781885dad47131d7da0
Add initiator to CachedResourceRequest.
https://bugs.webkit.org/show_bug.cgi?id=101935

Patch by Marja Hölttä <marja@chromium.org> on 2012-11-13
Reviewed by Adam Barth.

Motivation: Chromium needs to know which elements request a
resource (such as an image or a script) (bug 92761). In addition,
for exposing resource timing information (bug 84883) we need to
store the initiator, and this is the first step towards it.

No new tests: No visible change in behavior.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSCrossfadeValue.cpp:
(WebCore::cachedImageForCSSValue):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::cachedImage):
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::cachedFont):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage):
* css/CSSImageValue.h:
(WebCore):
(CSSImageValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImage):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet):
* css/WebKitCSSSVGDocumentValue.cpp:
(WebCore::WebKitCSSSVGDocumentValue::load):
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::cachedShader):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::emitRule):
* html/parser/CSSPreloadScanner.h:
(CSSPreloadScanner):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::PreloadTask::preload):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
(WebCore):
(WebCore::CachedResourceLoader::preload):
* loader/cache/CachedResourceLoader.h:
(WebCore):
(CachedResourceLoader):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
(WebCore):
(WebCore::CachedResourceRequest::~CachedResourceRequest):
(WebCore::CachedResourceRequest::setInitiator):
(WebCore::CachedResourceRequest::initiatorName):
(WebCore::CachedResourceRequest::initiatorDocument):
(WebCore::CachedResourceRequest::initiatorElement):
* loader/cache/CachedResourceRequest.h:
(WebCore):
(WebCore::CachedResourceRequest::setOptions):
(WebCore::CachedResourceRequest::defer):
(WebCore::CachedResourceRequest::setDefer):
(CachedResourceRequest):
* loader/cache/CachedResourceRequestInitiators.cpp: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
(WebCore):
(WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
* loader/cache/CachedResourceRequestInitiators.h: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp.
(WebCore):
(CachedResourceRequestInitiators):
(WebCore::cachedResourceRequestInitiators):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::ThreadGlobalData):
* platform/ThreadGlobalData.h:
(WebCore):
(WebCore::ThreadGlobalData::cachedResourceRequestInitiators):
(ThreadGlobalData):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::requestImageResource):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::loadFont):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::svgAttributeChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSCursorImageValue.cpp
Source/WebCore/css/CSSFontFaceSrcValue.cpp
Source/WebCore/css/CSSImageSetValue.cpp
Source/WebCore/css/CSSImageValue.cpp
Source/WebCore/css/CSSImageValue.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleRuleImport.cpp
Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp
Source/WebCore/css/WebKitCSSShaderValue.cpp
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/parser/CSSPreloadScanner.cpp
Source/WebCore/html/parser/CSSPreloadScanner.h
Source/WebCore/html/parser/HTMLPreloadScanner.cpp
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedResourceLoader.h
Source/WebCore/loader/cache/CachedResourceRequest.cpp
Source/WebCore/loader/cache/CachedResourceRequest.h
Source/WebCore/loader/cache/CachedResourceRequestInitiators.cpp [new file with mode: 0644]
Source/WebCore/loader/cache/CachedResourceRequestInitiators.h [new file with mode: 0644]
Source/WebCore/loader/icon/IconLoader.cpp
Source/WebCore/platform/ThreadGlobalData.cpp
Source/WebCore/platform/ThreadGlobalData.h
Source/WebCore/svg/SVGFEImageElement.cpp
Source/WebCore/svg/SVGFontFaceUriElement.cpp
Source/WebCore/svg/SVGUseElement.cpp