| Index: Source/core/xml/parser/XMLDocumentParser.cpp
|
| diff --git a/Source/core/xml/parser/XMLDocumentParser.cpp b/Source/core/xml/parser/XMLDocumentParser.cpp
|
| index 7dc6a6ba07062af259058779ead7e93ec3d0845e..fafc3437f448a1738b09e177e27c84f8d924b664 100644
|
| --- a/Source/core/xml/parser/XMLDocumentParser.cpp
|
| +++ b/Source/core/xml/parser/XMLDocumentParser.cpp
|
| @@ -34,13 +34,13 @@
|
| #include "core/FetchInitiatorTypeNames.h"
|
| #include "core/HTMLNames.h"
|
| #include "core/XMLNSNames.h"
|
| -#include "core/dom/CDATASection.h"
|
| #include "core/dom/Comment.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/DocumentFragment.h"
|
| #include "core/dom/DocumentType.h"
|
| #include "core/dom/ProcessingInstruction.h"
|
| #include "core/dom/ScriptLoader.h"
|
| +#include "core/dom/Text.h"
|
| #include "core/dom/TransformSource.h"
|
| #include "core/fetch/ResourceFetcher.h"
|
| #include "core/fetch/ScriptResource.h"
|
| @@ -222,19 +222,6 @@ private:
|
| String m_data;
|
| };
|
|
|
| -class PendingCDATABlockCallback final : public XMLDocumentParser::PendingCallback {
|
| -public:
|
| - explicit PendingCDATABlockCallback(const String& text) : m_text(text) { }
|
| -
|
| - virtual void call(XMLDocumentParser* parser) override
|
| - {
|
| - parser->cdataBlock(m_text);
|
| - }
|
| -
|
| -private:
|
| - String m_text;
|
| -};
|
| -
|
| class PendingCommentCallback final : public XMLDocumentParser::PendingCallback {
|
| public:
|
| explicit PendingCommentCallback(const String& text) : m_text(text) { }
|
| @@ -1176,21 +1163,6 @@ void XMLDocumentParser::processingInstruction(const String& target, const String
|
| }
|
| }
|
|
|
| -void XMLDocumentParser::cdataBlock(const String& text)
|
| -{
|
| - if (isStopped())
|
| - return;
|
| -
|
| - if (m_parserPaused) {
|
| - m_pendingCallbacks.append(adoptPtr(new PendingCDATABlockCallback(text)));
|
| - return;
|
| - }
|
| -
|
| - exitText();
|
| -
|
| - m_currentNode->parserAppendChild(CDATASection::create(m_currentNode->document(), text));
|
| -}
|
| -
|
| void XMLDocumentParser::comment(const String& text)
|
| {
|
| if (isStopped())
|
| @@ -1275,11 +1247,6 @@ static void processingInstructionHandler(void* closure, const xmlChar* target, c
|
| getParser(closure)->processingInstruction(toString(target), toString(data));
|
| }
|
|
|
| -static void cdataBlockHandler(void* closure, const xmlChar* text, int length)
|
| -{
|
| - getParser(closure)->cdataBlock(toString(text, length));
|
| -}
|
| -
|
| static void commentHandler(void* closure, const xmlChar* text)
|
| {
|
| getParser(closure)->comment(toString(text));
|
| @@ -1431,7 +1398,7 @@ void XMLDocumentParser::initializeParserContext(const CString& chunk)
|
| sax.fatalError = normalErrorHandler;
|
| sax.characters = charactersHandler;
|
| sax.processingInstruction = processingInstructionHandler;
|
| - sax.cdataBlock = cdataBlockHandler;
|
| + sax.cdataBlock = charactersHandler;
|
| sax.comment = commentHandler;
|
| sax.warning = warningHandler;
|
| sax.startElementNs = startElementNsHandler;
|
|
|