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

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

Issue 19002005: Share Custom Element registration contexts between related documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tweak the test to do lazy wrapping in both cases. Created 7 years, 5 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/xml/XSLTProcessor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698