summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/DocumentParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/dom/DocumentParser.cpp')
-rw-r--r--WebCore/dom/DocumentParser.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/WebCore/dom/DocumentParser.cpp b/WebCore/dom/DocumentParser.cpp
index cc4c61b..efb96b0 100644
--- a/WebCore/dom/DocumentParser.cpp
+++ b/WebCore/dom/DocumentParser.cpp
@@ -31,7 +31,7 @@
namespace WebCore {
DocumentParser::DocumentParser(Document* document)
- : m_parserStopped(false)
+ : m_state(ParsingState)
, m_document(document)
{
ASSERT(document);
@@ -45,8 +45,25 @@ DocumentParser::~DocumentParser()
ASSERT(!m_document);
}
+void DocumentParser::startParsing()
+{
+ m_state = ParsingState;
+}
+
+void DocumentParser::prepareToStopParsing()
+{
+ ASSERT(m_state == ParsingState);
+ m_state = StoppingState;
+}
+
+void DocumentParser::stopParsing()
+{
+ m_state = StoppedState;
+}
+
void DocumentParser::detach()
{
+ m_state = DetachedState;
m_document = 0;
}