2006-06-20 Anders Carlsson <acarlsson@apple.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2006 21:34:35 +0000 (21:34 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2006 21:34:35 +0000 (21:34 +0000)
commitd94ff5748c00326a492e75a9e5b62640df12f166
tree43d7acca7dc7917eb9b1af0bb73e5983a06fc07d
parent8bf04cde649520b93f6f68842adb0fc923017176
2006-06-20  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=9509
        Would like a way to pause/resume XML parsing

        * dom/xml_tokenizer.cpp:
        (WebCore::PendingCallbacks::PendingCallbacks):
        (WebCore::PendingCallbacks::appendStartElementNSCallback):
        (WebCore::PendingCallbacks::appendEndElementNSCallback):
        (WebCore::PendingCallbacks::appendCharactersCallback):
        (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
        (WebCore::PendingCallbacks::appendCDATABlockCallback):
        (WebCore::PendingCallbacks::appendCommentCallback):
        (WebCore::PendingCallbacks::appendInternalSubsetCallback):
        (WebCore::PendingCallbacks::appendErrorCallback):
        (WebCore::PendingCallbacks::callAndRemoveFirstCallback):
        (WebCore::PendingCallbacks::isEmpty):
        (WebCore::PendingCallbacks::PendingCallback::~PendingCallback):
        (WebCore::PendingCallbacks::PendingStartElementNSCallback::~PendingStartElementNSCallback):
        (WebCore::PendingCallbacks::PendingStartElementNSCallback::call):
        (WebCore::PendingCallbacks::PendingEndElementNSCallback::call):
        (WebCore::PendingCallbacks::PendingCharactersCallback::~PendingCharactersCallback):
        (WebCore::PendingCallbacks::PendingCharactersCallback::call):
        (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::~PendingProcessingInstructionCallback):
        (WebCore::PendingCallbacks::PendingProcessingInstructionCallback::call):
        (WebCore::PendingCallbacks::PendingCDATABlockCallback::~PendingCDATABlockCallback):
        (WebCore::PendingCallbacks::PendingCDATABlockCallback::call):
        (WebCore::PendingCallbacks::PendingCommentCallback::~PendingCommentCallback):
        (WebCore::PendingCallbacks::PendingCommentCallback::call):
        (WebCore::PendingCallbacks::PendingInternalSubsetCallback::~PendingInternalSubsetCallback):
        (WebCore::PendingCallbacks::PendingInternalSubsetCallback::call):
        (WebCore::PendingCallbacks::):
        New classes which manage a list of pending SAX callbacks that have not yet
        been sent to the tokenizer.

        (WebCore::XMLTokenizer::XMLTokenizer):
        Initialize new member variables.

        (WebCore::XMLTokenizer::~XMLTokenizer):
        Delete PendingCallbacks object.

        (WebCore::XMLTokenizer::write):
        If the parser is paused, queue the data to be written.

        (WebCore::XMLTokenizer::startElementNs):
        (WebCore::XMLTokenizer::endElementNs):
        (WebCore::XMLTokenizer::characters):
        (WebCore::XMLTokenizer::error):
        (WebCore::XMLTokenizer::processingInstruction):
        (WebCore::XMLTokenizer::cdataBlock):
        (WebCore::XMLTokenizer::comment):
        (WebCore::XMLTokenizer::internalSubset):
        If the parser has been paused, queue the callbacks instead.

        (WebCore::XMLTokenizer::handleError):
        New function, called by both ::error and :PendingCallbacks::callAndRemoveFirstCallback

        (WebCore::XMLTokenizer::finish):
        (WebCore::XMLTokenizer::pauseParsing):
         Set m_parserPaused to true.

        (WebCore::XMLTokenizer::resumeParsing):
        Call the pending callbacks and then parse the pending source.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/xml_tokenizer.cpp