Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1528)

Unified Diff: Source/core/xml/XSLTProcessorLibxslt.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/xml/XSLTProcessor.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XSLTProcessorLibxslt.cpp
diff --git a/Source/core/xml/XSLTProcessorLibxslt.cpp b/Source/core/xml/XSLTProcessorLibxslt.cpp
index 74fcf53a1aae71eb09695a452678c92b4f8483e8..6f86926eae71ba6c2feb10e368db5f772780ad8a 100644
--- a/Source/core/xml/XSLTProcessorLibxslt.cpp
+++ b/Source/core/xml/XSLTProcessorLibxslt.cpp
@@ -226,8 +226,8 @@ static xsltStylesheetPtr xsltStylesheetPointer(RefPtr<XSLStyleSheet>& cachedStyl
{
if (!cachedStylesheet && stylesheetRootNode) {
cachedStylesheet = XSLStyleSheet::createForXSLTProcessor(stylesheetRootNode->parentNode() ? stylesheetRootNode->parentNode() : stylesheetRootNode,
- stylesheetRootNode->document()->url().string(),
- stylesheetRootNode->document()->url()); // FIXME: Should we use baseURL here?
+ stylesheetRootNode->document().url().string(),
+ stylesheetRootNode->document().url()); // FIXME: Should we use baseURL here?
// According to Mozilla documentation, the node must be a Document node, an xsl:stylesheet or xsl:transform element.
// But we just use text content regardless of node type.
@@ -242,7 +242,7 @@ static xsltStylesheetPtr xsltStylesheetPointer(RefPtr<XSLStyleSheet>& cachedStyl
static inline xmlDocPtr xmlDocPtrFromNode(Node* sourceNode, bool& shouldDelete)
{
- RefPtr<Document> ownerDocument = sourceNode->document();
+ RefPtr<Document> ownerDocument = &sourceNode->document();
bool sourceIsDocument = (sourceNode == ownerDocument.get());
xmlDocPtr sourceDoc = 0;
@@ -277,7 +277,7 @@ static inline String resultMIMEType(xmlDocPtr resultDoc, xsltStylesheetPtr sheet
bool XSLTProcessor::transformToString(Node* sourceNode, String& mimeType, String& resultString, String& resultEncoding)
{
- RefPtr<Document> ownerDocument = sourceNode->document();
+ RefPtr<Document> ownerDocument = &sourceNode->document();
setXSLTLoadCallBack(docLoaderFunc, this, ownerDocument->fetcher());
xsltStylesheetPtr sheet = xsltStylesheetPointer(m_stylesheet, m_stylesheetRootNode.get());
« no previous file with comments | « Source/core/xml/XSLTProcessor.cpp ('k') | Source/core/xml/parser/XMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698