Diff
Modified: trunk/LayoutTests/ChangeLog (144755 => 144756)
--- trunk/LayoutTests/ChangeLog 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/LayoutTests/ChangeLog 2013-03-05 14:09:20 UTC (rev 144756)
@@ -1,3 +1,14 @@
+2013-03-05 Andrey Kosyakov <[email protected]>
+
+ Web Inspector: remove length parameter from Parse HTML timeline event
+ https://bugs.webkit.org/show_bug.cgi?id=111421
+
+ Reviewed by Yury Semikhatsky.
+
+ - removed length field from ParseHTML data in expectations.
+
+ * inspector/timeline/timeline-parse-html-expected.txt:
+
2013-03-05 Tim Horton <[email protected]>, Grzegorz Czajkowski <[email protected]>
[WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
Modified: trunk/LayoutTests/inspector/timeline/timeline-parse-html-expected.txt (144755 => 144756)
--- trunk/LayoutTests/inspector/timeline/timeline-parse-html-expected.txt 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/LayoutTests/inspector/timeline/timeline-parse-html-expected.txt 2013-03-05 14:09:20 UTC (rev 144756)
@@ -7,7 +7,6 @@
counters : <object>
data : {
endLine : 0
- length : 9
startLine : 0
}
endTime : <number>
@@ -23,7 +22,6 @@
counters : <object>
data : {
endLine : 0
- length : 1
startLine : 0
}
endTime : <number>
Modified: trunk/Source/WebCore/ChangeLog (144755 => 144756)
--- trunk/Source/WebCore/ChangeLog 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/ChangeLog 2013-03-05 14:09:20 UTC (rev 144756)
@@ -1,3 +1,35 @@
+2013-03-05 Andrey Kosyakov <[email protected]>
+
+ Web Inspector: remove length parameter from Parse HTML timeline event
+ https://bugs.webkit.org/show_bug.cgi?id=111421
+
+ Reviewed by Yury Semikhatsky.
+
+ - remove length parameter in all instrumentation methods used to emit ParseHTML timeline event;
+ - drive-by style fixes.
+
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
+ (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
+ (WebCore::HTMLDocumentParser::pumpTokenizer):
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore):
+ (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
+ (WebCore::InspectorInstrumentation::didWriteHTMLImpl):
+ * inspector/InspectorInstrumentation.h:
+ (InspectorInstrumentation):
+ (WebCore::InspectorInstrumentation::willWriteHTML):
+ (WebCore::InspectorInstrumentation::didWriteHTML):
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ * inspector/InspectorTimelineAgent.h:
+ (InspectorTimelineAgent):
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createParseHTMLData):
+ * inspector/TimelineRecordFactory.h:
+ (TimelineRecordFactory):
+
2013-03-05 Alexei Filippov <[email protected]>
Web Inspector: allow each profiler panel to have own landing page
Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (144755 => 144756)
--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-03-05 14:09:20 UTC (rev 144756)
@@ -318,8 +318,7 @@
// but we need to ensure it isn't deleted yet.
RefPtr<HTMLDocumentParser> protect(this);
- // FIXME: Pass in current input length.
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), 0, lineNumber().zeroBasedInt());
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), lineNumber().zeroBasedInt());
ASSERT(m_speculations.isEmpty());
chunk->preloads.clear(); // We don't need to preload because we're going to parse immediately.
@@ -451,7 +450,7 @@
ASSERT(!m_token);
// FIXME: Pass in current input length.
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), 0, lineNumber().zeroBasedInt());
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), lineNumber().zeroBasedInt());
double startTime = currentTime();
@@ -513,7 +512,7 @@
// 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_input.current().currentLine().zeroBasedInt());
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteHTML(document(), m_input.current().currentLine().zeroBasedInt());
m_xssAuditor.init(document());
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (144755 => 144756)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2013-03-05 14:09:20 UTC (rev 144756)
@@ -992,17 +992,17 @@
}
}
-InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTMLImpl(InstrumentingAgents* instrumentingAgents, unsigned int length, unsigned int startLine, Frame* frame)
+InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTMLImpl(InstrumentingAgents* instrumentingAgents, unsigned startLine, Frame* frame)
{
int timelineAgentId = 0;
if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent()) {
- timelineAgent->willWriteHTML(length, startLine, frame);
+ timelineAgent->willWriteHTML(startLine, frame);
timelineAgentId = timelineAgent->id();
}
return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
}
-void InspectorInstrumentation::didWriteHTMLImpl(const InspectorInstrumentationCookie& cookie, unsigned int endLine)
+void InspectorInstrumentation::didWriteHTMLImpl(const InspectorInstrumentationCookie& cookie, unsigned endLine)
{
if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
timelineAgent->didWriteHTML(endLine);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (144755 => 144756)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2013-03-05 14:09:20 UTC (rev 144756)
@@ -221,8 +221,8 @@
static void didRunJavaScriptDialog(const InspectorInstrumentationCookie&);
static void willDestroyCachedResource(CachedResource*);
- static InspectorInstrumentationCookie willWriteHTML(Document*, unsigned int length, unsigned int startLine);
- static void didWriteHTML(const InspectorInstrumentationCookie&, unsigned int endLine);
+ static InspectorInstrumentationCookie willWriteHTML(Document*, unsigned startLine);
+ static void didWriteHTML(const InspectorInstrumentationCookie&, unsigned endLine);
// FIXME: Remove once we no longer generate stacks outside of Inspector.
static void addMessageToConsole(Page*, MessageSource, MessageType, MessageLevel, const String& message, PassRefPtr<ScriptCallStack>, unsigned long requestIdentifier = 0);
@@ -422,8 +422,8 @@
static void didRunJavaScriptDialogImpl(const InspectorInstrumentationCookie&);
static void willDestroyCachedResourceImpl(CachedResource*);
- static InspectorInstrumentationCookie willWriteHTMLImpl(InstrumentingAgents*, unsigned int length, unsigned int startLine, Frame*);
- static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned int endLine);
+ static InspectorInstrumentationCookie willWriteHTMLImpl(InstrumentingAgents*, unsigned startLine, Frame*);
+ static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned endLine);
static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, ScriptState*, PassRefPtr<ScriptArguments>, unsigned long requestIdentifier);
static void addMessageToConsoleImpl(InstrumentingAgents*, MessageSource, MessageType, MessageLevel, const String& message, const String& scriptId, unsigned lineNumber, ScriptState*, unsigned long requestIdentifier);
@@ -1737,12 +1737,12 @@
#endif
}
-inline InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTML(Document* document, unsigned int length, unsigned int startLine)
+inline InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTML(Document* document, unsigned startLine)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
- return willWriteHTMLImpl(instrumentingAgents, length, startLine, document->frame());
+ return willWriteHTMLImpl(instrumentingAgents, startLine, document->frame());
#else
UNUSED_PARAM(document);
UNUSED_PARAM(length);
@@ -1751,7 +1751,7 @@
return InspectorInstrumentationCookie();
}
-inline void InspectorInstrumentation::didWriteHTML(const InspectorInstrumentationCookie& cookie, unsigned int endLine)
+inline void InspectorInstrumentation::didWriteHTML(const InspectorInstrumentationCookie& cookie, unsigned endLine)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(void());
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (144755 => 144756)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2013-03-05 14:09:20 UTC (rev 144756)
@@ -346,12 +346,12 @@
didCompleteCurrentRecord(TimelineRecordType::CompositeLayers);
}
-void InspectorTimelineAgent::willWriteHTML(unsigned int length, unsigned int startLine, Frame* frame)
+void InspectorTimelineAgent::willWriteHTML(unsigned startLine, Frame* frame)
{
- pushCurrentRecord(TimelineRecordFactory::createParseHTMLData(length, startLine), TimelineRecordType::ParseHTML, true, frame);
+ pushCurrentRecord(TimelineRecordFactory::createParseHTMLData(startLine), TimelineRecordType::ParseHTML, true, frame);
}
-void InspectorTimelineAgent::didWriteHTML(unsigned int endLine)
+void InspectorTimelineAgent::didWriteHTML(unsigned endLine)
{
if (!m_recordStack.isEmpty()) {
TimelineRecordEntry entry = m_recordStack.last();
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (144755 => 144756)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2013-03-05 14:09:20 UTC (rev 144756)
@@ -125,10 +125,8 @@
void willComposite();
void didComposite();
- // FIXME: |length| should be passed in didWrite instead willWrite
- // as the parser can not know how much it will process until it tries.
- void willWriteHTML(unsigned int length, unsigned int startLine, Frame*);
- void didWriteHTML(unsigned int endLine);
+ void willWriteHTML(unsigned startLine, Frame*);
+ void didWriteHTML(unsigned endLine);
void didInstallTimer(int timerId, int timeout, bool singleShot, Frame*);
void didRemoveTimer(int timerId, Frame*);
Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp (144755 => 144756)
--- trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp 2013-03-05 14:09:20 UTC (rev 144756)
@@ -191,10 +191,9 @@
return data.release();
}
-PassRefPtr<InspectorObject> TimelineRecordFactory::createParseHTMLData(unsigned int length, unsigned int startLine)
+PassRefPtr<InspectorObject> TimelineRecordFactory::createParseHTMLData(unsigned startLine)
{
RefPtr<InspectorObject> data = ""
- data->setNumber("length", length);
data->setNumber("startLine", startLine);
return data.release();
}
Modified: trunk/Source/WebCore/inspector/TimelineRecordFactory.h (144755 => 144756)
--- trunk/Source/WebCore/inspector/TimelineRecordFactory.h 2013-03-05 14:06:28 UTC (rev 144755)
+++ trunk/Source/WebCore/inspector/TimelineRecordFactory.h 2013-03-05 14:09:20 UTC (rev 144756)
@@ -86,7 +86,7 @@
static PassRefPtr<InspectorObject> createMarkData(bool isMainFrame);
- static PassRefPtr<InspectorObject> createParseHTMLData(unsigned int length, unsigned int startLine);
+ static PassRefPtr<InspectorObject> createParseHTMLData(unsigned startLine);
static PassRefPtr<InspectorObject> createAnimationFrameData(int callbackId);