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

Unified Diff: Source/core/xml/parser/XMLDocumentParser.cpp

Issue 27394002: Process decoded bytes when in stopped (but not detached) state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename test, add comment Created 7 years, 2 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/dom/DecodedDataDocumentParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/parser/XMLDocumentParser.cpp
diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
index 4e2ffddaa1c4525b920a8d2eba36ccb38dec691e..721958fcde5257fb88d77b354ac8a0b3beb4d220 100644
--- a/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1161,8 +1161,14 @@ void XMLDocumentParser::processingInstruction(const String& target, const String
return;
m_sawXSLTransform = !m_sawFirstElement && pi->isXSL();
- if (m_sawXSLTransform && !document()->transformSourceDocument())
+ if (m_sawXSLTransform && !document()->transformSourceDocument()) {
+ // 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 to
+ // accumulate in m_originalSourceForTransform. So, we call stopParsing() here and
+ // check isStopped() in element callbacks.
+ // FIXME: This contradicts the contract of DocumentParser.
stopParsing();
+ }
}
void XMLDocumentParser::cdataBlock(const String& text)
« no previous file with comments | « Source/core/dom/DecodedDataDocumentParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698