Index: Source/core/xml/XSLTProcessor.cpp |
diff --git a/Source/core/xml/XSLTProcessor.cpp b/Source/core/xml/XSLTProcessor.cpp |
index ef407955ccba19222db7c243f54f6546e36c85ff..520faf420b4e5c2baecee566a4e1cdc73370000e 100644 |
--- a/Source/core/xml/XSLTProcessor.cpp |
+++ b/Source/core/xml/XSLTProcessor.cpp |
@@ -60,8 +60,7 @@ XSLTProcessor::~XSLTProcessor() |
ASSERT(!m_stylesheetRootNode || !m_stylesheet || m_stylesheet->hasOneRef()); |
} |
-PassRefPtr<Document> XSLTProcessor::createDocumentFromSource(const String& sourceString, |
- const String& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame* frame) |
+PassRefPtr<Document> XSLTProcessor::createDocumentFromSource(const String& sourceString, const String& sourceEncoding, const String& sourceMIMEType, Node* sourceNode, Frame* frame, CustomElementRegistrationContextualizer::DocumentCreationReason reason) |
{ |
RefPtr<Document> ownerDocument = sourceNode->document(); |
bool sourceIsDocument = (sourceNode == ownerDocument.get()); |
@@ -74,6 +73,8 @@ PassRefPtr<Document> XSLTProcessor::createDocumentFromSource(const String& sourc |
} else |
result = DOMImplementation::createDocument(sourceMIMEType, frame, sourceIsDocument ? ownerDocument->url() : KURL(), false); |
+ CustomElementRegistrationContextualizer::didCreateDocument(reason, result.get()); |
+ |
// Before parsing, we need to save & detach the old document and get the new document |
// in place. We have to do this only if we're rendering the result document. |
if (frame) { |
@@ -110,7 +111,7 @@ PassRefPtr<Document> XSLTProcessor::transformToDocument(Node* sourceNode) |
String resultEncoding; |
if (!transformToString(sourceNode, resultMIMEType, resultString, resultEncoding)) |
return 0; |
- return createDocumentFromSource(resultString, resultEncoding, resultMIMEType, sourceNode, 0); |
+ return createDocumentFromSource(resultString, resultEncoding, resultMIMEType, sourceNode, 0, CustomElementRegistrationContextualizer::XSLTProcessor_transformToDocument); |
} |
PassRefPtr<DocumentFragment> XSLTProcessor::transformToFragment(Node* sourceNode, Document* outputDoc) |