summaryrefslogtreecommitdiffstats
path: root/WebCore/html/parser/HTMLDocumentParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/parser/HTMLDocumentParser.cpp')
-rw-r--r--WebCore/html/parser/HTMLDocumentParser.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/WebCore/html/parser/HTMLDocumentParser.cpp b/WebCore/html/parser/HTMLDocumentParser.cpp
index dc19c96..743e5d5 100644
--- a/WebCore/html/parser/HTMLDocumentParser.cpp
+++ b/WebCore/html/parser/HTMLDocumentParser.cpp
@@ -36,11 +36,13 @@
#include "HTMLScriptRunner.h"
#include "HTMLTreeBuilder.h"
#include "HTMLDocument.h"
+#include "InspectorInstrumentation.h"
#include "NestingLevelIncrementer.h"
#include "Settings.h"
#include "XSSAuditor.h"
#include <wtf/CurrentTime.h>
+<<<<<<< HEAD
#ifdef ANDROID_INSTRUMENT
#include "TimeCounter.h"
#endif
@@ -49,6 +51,8 @@
#include "InspectorTimelineAgent.h"
#endif
+=======
+>>>>>>> webkit.org at r70209
namespace WebCore {
using namespace HTMLNames;
@@ -214,9 +218,12 @@ void HTMLDocumentParser::pumpTokenizer(SynchronousMode mode)
// ASSERT that this object is both attached to the Document and protected.
ASSERT(refCount() >= 2);
- // We tell the InspectorTimelineAgent about every pump, even if we
+ // We tell the InspectorInstrumentation about every pump, even if we
// end up pumping nothing. It can filter out empty pumps itself.
- willPumpLexer();
+ // FIXME: m_input.current().length() is only accurate if we
+ // end up parsing the whole buffer in this pump. We should pass how
+ // much we parsed as part of didWriteHTML instead of willWriteHTML.
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), m_input.current().length(), m_tokenizer->lineNumber());
HTMLParserScheduler::PumpSession session;
// FIXME: This loop body has is now too long and needs cleanup.
@@ -260,26 +267,7 @@ void HTMLDocumentParser::pumpTokenizer(SynchronousMode mode)
m_preloadScanner->scan();
}
- didPumpLexer();
-}
-
-void HTMLDocumentParser::willPumpLexer()
-{
-#if ENABLE(INSPECTOR)
- // FIXME: m_input.current().length() is only accurate if we
- // end up parsing the whole buffer in this pump. We should pass how
- // much we parsed as part of didWriteHTML instead of willWriteHTML.
- if (InspectorTimelineAgent* timelineAgent = document()->inspectorTimelineAgent())
- timelineAgent->willWriteHTML(m_input.current().length(), m_tokenizer->lineNumber());
-#endif
-}
-
-void HTMLDocumentParser::didPumpLexer()
-{
-#if ENABLE(INSPECTOR)
- if (InspectorTimelineAgent* timelineAgent = document()->inspectorTimelineAgent())
- timelineAgent->didWriteHTML(m_tokenizer->lineNumber());
-#endif
+ InspectorInstrumentation::didWriteHTML(cookie, m_tokenizer->lineNumber());
}
bool HTMLDocumentParser::hasInsertionPoint()