| Index: Source/core/xml/XSLTProcessorLibxslt.cpp
|
| diff --git a/Source/core/xml/XSLTProcessorLibxslt.cpp b/Source/core/xml/XSLTProcessorLibxslt.cpp
|
| index fb2e286a9c8afd0c90315bee9ceaf02ecd71ea3f..b8979141e7089e1ca59fdd8f7771b9e1492695e6 100644
|
| --- a/Source/core/xml/XSLTProcessorLibxslt.cpp
|
| +++ b/Source/core/xml/XSLTProcessorLibxslt.cpp
|
| @@ -83,14 +83,14 @@ 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 ResourceFetcher* globalResourceFetcher = 0;
|
| +static XSLTProcessor* globalProcessor = nullptr;
|
| +static ResourceFetcher* globalResourceFetcher = nullptr;
|
|
|
| static xmlDocPtr docLoaderFunc(
|
| const xmlChar* uri, xmlDictPtr, int options, void* ctxt, xsltLoadType type)
|
| {
|
| if (!globalProcessor)
|
| - return 0;
|
| + return nullptr;
|
|
|
| switch (type) {
|
| case XSLT_LOAD_DOCUMENT: {
|
| @@ -104,9 +104,9 @@ static xmlDocPtr docLoaderFunc(
|
| request.setOriginRestriction(FetchRequest::RestrictToSameOrigin);
|
| ResourcePtr<Resource> resource = globalResourceFetcher->fetchSynchronously(request);
|
| if (!resource || !globalProcessor)
|
| - return 0;
|
| + return nullptr;
|
|
|
| - FrameConsole* console = 0;
|
| + FrameConsole* console = nullptr;
|
| LocalFrame* frame = globalProcessor->xslStylesheet()->ownerDocument()->frame();
|
| if (frame)
|
| console = &frame->console();
|
| @@ -116,7 +116,7 @@ static xmlDocPtr docLoaderFunc(
|
| // We don't specify an encoding here. Neither Gecko nor WinIE respects
|
| // the encoding specified in the HTTP headers.
|
| SharedBuffer* data = resource->resourceBuffer();
|
| - xmlDocPtr doc = data ? xmlReadMemory(data->data(), data->size(), (const char*)uri, 0, options) : 0;
|
| + xmlDocPtr doc = data ? xmlReadMemory(data->data(), data->size(), (const char*)uri, 0, options) : nullptr;
|
|
|
| xmlSetStructuredErrorFunc(0, 0);
|
| xmlSetGenericErrorFunc(0, 0);
|
| @@ -129,7 +129,7 @@ static xmlDocPtr docLoaderFunc(
|
| break;
|
| }
|
|
|
| - return 0;
|
| + return nullptr;
|
| }
|
|
|
| static inline void setXSLTLoadCallBack(xsltDocLoaderFunc func, XSLTProcessor* processor, ResourceFetcher* fetcher)
|
| @@ -190,7 +190,7 @@ static bool saveResultToString(xmlDocPtr resultDoc, xsltStylesheetPtr sheet, Str
|
| static const char** xsltParamArrayFromParameterMap(XSLTProcessor::ParameterMap& parameters)
|
| {
|
| if (parameters.isEmpty())
|
| - return 0;
|
| + return nullptr;
|
|
|
| const char** parameterArray = static_cast<const char**>(fastMalloc(((parameters.size() * 2) + 1) * sizeof(char*)));
|
|
|
| @@ -234,7 +234,7 @@ static xsltStylesheetPtr xsltStylesheetPointer(Document* document, RefPtrWillBeM
|
| }
|
|
|
| if (!cachedStylesheet || !cachedStylesheet->document())
|
| - return 0;
|
| + return nullptr;
|
|
|
| return cachedStylesheet->compileStyleSheet();
|
| }
|
| @@ -244,7 +244,7 @@ static inline xmlDocPtr xmlDocPtrFromNode(Node* sourceNode, bool& shouldDelete)
|
| RefPtrWillBeRawPtr<Document> ownerDocument(sourceNode->document());
|
| bool sourceIsDocument = (sourceNode == ownerDocument.get());
|
|
|
| - xmlDocPtr sourceDoc = 0;
|
| + xmlDocPtr sourceDoc = nullptr;
|
| if (sourceIsDocument && ownerDocument->transformSource())
|
| sourceDoc = (xmlDocPtr)ownerDocument->transformSource()->platformSource();
|
| if (!sourceDoc) {
|
| @@ -261,7 +261,7 @@ static inline String resultMIMEType(xmlDocPtr resultDoc, xsltStylesheetPtr sheet
|
| // HTML (create an HTML document), XML (create an XML document),
|
| // and text (wrap in a <pre> and create an XML document).
|
|
|
| - const xmlChar* resultType = 0;
|
| + const xmlChar* resultType = nullptr;
|
| XSLT_GET_IMPORT_PTR(resultType, sheet, method);
|
| if (!resultType && resultDoc->type == XML_HTML_DOCUMENT_NODE)
|
| resultType = (const xmlChar*)"html";
|
|
|