diff options
Diffstat (limited to 'WebCore/dom/XMLDocumentParser.cpp')
-rw-r--r-- | WebCore/dom/XMLDocumentParser.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/WebCore/dom/XMLDocumentParser.cpp b/WebCore/dom/XMLDocumentParser.cpp index ab02bb3..3d2f324 100644 --- a/WebCore/dom/XMLDocumentParser.cpp +++ b/WebCore/dom/XMLDocumentParser.cpp @@ -116,7 +116,16 @@ void XMLDocumentParser::clearCurrentNodeStack() } } -void XMLDocumentParser::write(const SegmentedString& s, bool /*appendData*/) +void XMLDocumentParser::insert(const SegmentedString& source) +{ + // FIXME: This is a hack to work around the fact that XMLHttpRequest + // responseXML() calls Document::write() which in turn calls insert(). In + // HTML, that's correct, as insert() implies a synchronous parse. For XML, + // all parsing is synchronous but document.write shouldn't be supported. + append(source); +} + +void XMLDocumentParser::append(const SegmentedString& s) { String parseString = s.toString(); @@ -167,7 +176,7 @@ bool XMLDocumentParser::enterText() ASSERT(m_bufferedText.size() == 0); #endif RefPtr<Node> newNode = Text::create(document(), ""); - if (!m_currentNode->addChild(newNode.get())) + if (!m_currentNode->legacyParserAddChild(newNode.get())) return false; pushCurrentNode(newNode.get()); return true; |