summaryrefslogtreecommitdiffstats
path: root/WebCore/xml/XSLTProcessorLibxslt.cpp
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-09-13 16:35:48 +0100
committerIain Merrick <husky@google.com>2010-09-16 12:10:42 +0100
commit5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306 (patch)
treeddce1aa5e3b6967a69691892e500897558ff8ab6 /WebCore/xml/XSLTProcessorLibxslt.cpp
parent12bec63ec71e46baba27f0bd9bd9d8067683690a (diff)
downloadexternal_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.zip
external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.gz
external_webkit-5abb8606fa57c3ebfc8b3c3dbc3fa4a25d2ae306.tar.bz2
Merge WebKit at r67178 : Initial merge by git.
Change-Id: I57e01163b6866cb029cdadf405a0394a3918bc18
Diffstat (limited to 'WebCore/xml/XSLTProcessorLibxslt.cpp')
-rw-r--r--WebCore/xml/XSLTProcessorLibxslt.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/WebCore/xml/XSLTProcessorLibxslt.cpp b/WebCore/xml/XSLTProcessorLibxslt.cpp
index ed4303d..c2869c7 100644
--- a/WebCore/xml/XSLTProcessorLibxslt.cpp
+++ b/WebCore/xml/XSLTProcessorLibxslt.cpp
@@ -28,7 +28,7 @@
#include "Console.h"
#include "DOMWindow.h"
-#include "DocLoader.h"
+#include "CachedResourceLoader.h"
#include "Frame.h"
#include "ResourceError.h"
#include "ResourceHandle.h"
@@ -96,12 +96,12 @@ void XSLTProcessor::parseErrorFunc(void* userData, xmlError* error)
// FIXME: There seems to be no way to control the ctxt pointer for loading here, thus we have globals.
static XSLTProcessor* globalProcessor = 0;
-static DocLoader* globalDocLoader = 0;
+static CachedResourceLoader* globalCachedResourceLoader = 0;
static xmlDocPtr docLoaderFunc(const xmlChar* uri,
- xmlDictPtr,
- int options,
- void* ctxt,
- xsltLoadType type)
+ xmlDictPtr,
+ int options,
+ void* ctxt,
+ xsltLoadType type)
{
if (!globalProcessor)
return 0;
@@ -117,14 +117,14 @@ static xmlDocPtr docLoaderFunc(const xmlChar* uri,
Vector<char> data;
- bool requestAllowed = globalDocLoader->frame() && globalDocLoader->doc()->securityOrigin()->canRequest(url);
+ bool requestAllowed = globalCachedResourceLoader->frame() && globalCachedResourceLoader->doc()->securityOrigin()->canRequest(url);
if (requestAllowed) {
- globalDocLoader->frame()->loader()->loadResourceSynchronously(url, AllowStoredCredentials, error, response, data);
- requestAllowed = globalDocLoader->doc()->securityOrigin()->canRequest(response.url());
+ globalCachedResourceLoader->frame()->loader()->loadResourceSynchronously(url, AllowStoredCredentials, error, response, data);
+ requestAllowed = globalCachedResourceLoader->doc()->securityOrigin()->canRequest(response.url());
}
if (!requestAllowed) {
data.clear();
- globalDocLoader->printAccessDeniedMessage(url);
+ globalCachedResourceLoader->printAccessDeniedMessage(url);
}
Console* console = 0;
@@ -151,11 +151,11 @@ static xmlDocPtr docLoaderFunc(const xmlChar* uri,
return 0;
}
-static inline void setXSLTLoadCallBack(xsltDocLoaderFunc func, XSLTProcessor* processor, DocLoader* loader)
+static inline void setXSLTLoadCallBack(xsltDocLoaderFunc func, XSLTProcessor* processor, CachedResourceLoader* cachedResourceLoader)
{
xsltSetLoaderFunc(func);
globalProcessor = processor;
- globalDocLoader = loader;
+ globalCachedResourceLoader = cachedResourceLoader;
}
static int writeToVector(void* context, const char* buffer, int len)
@@ -245,7 +245,7 @@ static inline xmlDocPtr xmlDocPtrFromNode(Node* sourceNode, bool& shouldDelete)
if (sourceIsDocument && ownerDocument->transformSource())
sourceDoc = (xmlDocPtr)ownerDocument->transformSource()->platformSource();
if (!sourceDoc) {
- sourceDoc = (xmlDocPtr)xmlDocPtrForString(ownerDocument->docLoader(), createMarkup(sourceNode),
+ sourceDoc = (xmlDocPtr)xmlDocPtrForString(ownerDocument->cachedResourceLoader(), createMarkup(sourceNode),
sourceIsDocument ? ownerDocument->url().string() : String());
shouldDelete = sourceDoc;
}
@@ -275,7 +275,7 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String
{
RefPtr<Document> ownerDocument = sourceNode->document();
- setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->docLoader());
+ setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->cachedResourceLoader());
xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRootNode.get());
if (!sheet) {
setXSLTLoadCallBack(0, 0, 0);