Index: Source/core/xml/parser/XMLDocumentParser.cpp |
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp |
index e5cc2bde9aef458ae1ef42d94cbfcd5bab8f4499..bf7d75ccb1e36b10a2a714d94f141f5265582e08 100644 |
--- a/Source/core/xml/parser/XMLDocumentParser.cpp |
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp |
@@ -100,9 +100,17 @@ static inline AtomicString toAtomicString(const xmlChar* string) |
return AtomicString::fromUTF8(reinterpret_cast<const char*>(string)); |
} |
+static bool xsltTransformed(Document* document) |
+{ |
+ bool xsltTransformed; |
+ if (!V8Document::PrivateScript::xsltTransformedMethod(document->frame(), document, &xsltTransformed)) |
+ return false; |
+ return xsltTransformed; |
+} |
+ |
static inline bool hasNoStyleInformation(Document* document) |
{ |
- if (document->sawElementsInKnownNamespaces() || document->transformSourceDocument()) |
+ if (document->sawElementsInKnownNamespaces() || xsltTransformed(document)) |
return false; |
if (!document->frame() || !document->frame()->page()) |
@@ -1165,7 +1173,7 @@ void XMLDocumentParser::processingInstruction(const String& target, const String |
return; |
m_sawXSLTransform = !m_sawFirstElement && pi->isXSL(); |
- if (m_sawXSLTransform && !document()->transformSourceDocument()) { |
+ if (m_sawXSLTransform && !xsltTransformed(document())) { |
// This behavior is very tricky. We call stopParsing() here because we |
// want to stop processing the document until we're ready to apply the |
// transform, but we actually still want to be fed decoded string pieces |