[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Wed Apr 7 23:07:54 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit b02616c8955c811effcee8280c74bc3914a1a7d6
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 27 03:24:05 2009 +0000
2009-10-26 Kelly Norton <knorton at google.com>
Reviewed by Timothy Hatcher.
Renames TimelineItem to TimelineRecord and updates all call sites.
https://bugs.webkit.org/show_bug.cgi?id=30785
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorFrontend.cpp:
(WebCore::InspectorFrontend::addRecordToTimeline):
* inspector/InspectorFrontend.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
(WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
(WebCore::InspectorTimelineAgent::willLayout):
(WebCore::InspectorTimelineAgent::didLayout):
(WebCore::InspectorTimelineAgent::willRecalculateStyle):
(WebCore::InspectorTimelineAgent::didRecalculateStyle):
(WebCore::InspectorTimelineAgent::willPaint):
(WebCore::InspectorTimelineAgent::didPaint):
(WebCore::InspectorTimelineAgent::willWriteHTML):
(WebCore::InspectorTimelineAgent::didWriteHTML):
(WebCore::InspectorTimelineAgent::didInstallTimer):
(WebCore::InspectorTimelineAgent::didRemoveTimer):
(WebCore::InspectorTimelineAgent::willFireTimer):
(WebCore::InspectorTimelineAgent::didFireTimer):
(WebCore::InspectorTimelineAgent::reset):
(WebCore::InspectorTimelineAgent::addRecordToTimeline):
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
* inspector/InspectorTimelineAgent.h:
(WebCore::):
(WebCore::InspectorTimelineAgent::RecordEntry::RecordEntry):
* inspector/TimelineItemFactory.cpp: Removed.
* inspector/TimelineItemFactory.h: Removed.
* inspector/TimelineRecordFactory.cpp: Added.
(WebCore::TimelineRecordFactory::createGenericRecord):
(WebCore::TimelineRecordFactory::createDOMDispatchRecord):
(WebCore::TimelineRecordFactory::createGenericTimerRecord):
(WebCore::TimelineRecordFactory::createTimerInstallRecord):
* inspector/TimelineRecordFactory.h: Added.
(WebCore::TimelineRecordFactory::TimelineRecordFactory):
* inspector/front-end/TimelineAgent.js:
(WebInspector.addRecordToTimeline):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.addRecordToTimeline):
(WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
(WebInspector.TimelinePanel.prototype.getRecordTypeName):
(WebInspector.TimelineRecordTreeElement.prototype.onattach):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3745704..bc65512 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,56 @@
+2009-10-26 Kelly Norton <knorton at google.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Renames TimelineItem to TimelineRecord and updates all call sites.
+ https://bugs.webkit.org/show_bug.cgi?id=30785
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addRecordToTimeline):
+ * inspector/InspectorFrontend.h:
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::didDispatchDOMEvent):
+ (WebCore::InspectorTimelineAgent::willLayout):
+ (WebCore::InspectorTimelineAgent::didLayout):
+ (WebCore::InspectorTimelineAgent::willRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::didRecalculateStyle):
+ (WebCore::InspectorTimelineAgent::willPaint):
+ (WebCore::InspectorTimelineAgent::didPaint):
+ (WebCore::InspectorTimelineAgent::willWriteHTML):
+ (WebCore::InspectorTimelineAgent::didWriteHTML):
+ (WebCore::InspectorTimelineAgent::didInstallTimer):
+ (WebCore::InspectorTimelineAgent::didRemoveTimer):
+ (WebCore::InspectorTimelineAgent::willFireTimer):
+ (WebCore::InspectorTimelineAgent::didFireTimer):
+ (WebCore::InspectorTimelineAgent::reset):
+ (WebCore::InspectorTimelineAgent::addRecordToTimeline):
+ (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
+ (WebCore::InspectorTimelineAgent::pushCurrentRecord):
+ * inspector/InspectorTimelineAgent.h:
+ (WebCore::):
+ (WebCore::InspectorTimelineAgent::RecordEntry::RecordEntry):
+ * inspector/TimelineItemFactory.cpp: Removed.
+ * inspector/TimelineItemFactory.h: Removed.
+ * inspector/TimelineRecordFactory.cpp: Added.
+ (WebCore::TimelineRecordFactory::createGenericRecord):
+ (WebCore::TimelineRecordFactory::createDOMDispatchRecord):
+ (WebCore::TimelineRecordFactory::createGenericTimerRecord):
+ (WebCore::TimelineRecordFactory::createTimerInstallRecord):
+ * inspector/TimelineRecordFactory.h: Added.
+ (WebCore::TimelineRecordFactory::TimelineRecordFactory):
+ * inspector/front-end/TimelineAgent.js:
+ (WebInspector.addRecordToTimeline):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype.getRecordTypeName):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+
2009-10-26 Girish Ramakrishnan <girish at forwardbias.in>
Reviewed by Antti Koivisto.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index fe04f89..c4560ab 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1190,8 +1190,8 @@ webcore_sources += \
WebCore/inspector/JavaScriptProfile.h \
WebCore/inspector/JavaScriptProfileNode.cpp \
WebCore/inspector/JavaScriptProfileNode.h \
- WebCore/inspector/TimelineItemFactory.cpp \
- WebCore/inspector/TimelineItemFactory.h \
+ WebCore/inspector/TimelineRecordFactory.cpp \
+ WebCore/inspector/TimelineRecordFactory.h \
WebCore/loader/Cache.cpp \
WebCore/loader/Cache.h \
WebCore/loader/CachePolicy.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index a790a8c..a563ca0 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1538,8 +1538,8 @@
'inspector/JavaScriptProfile.h',
'inspector/JavaScriptProfileNode.cpp',
'inspector/JavaScriptProfileNode.h',
- 'inspector/TimelineItemFactory.cpp',
- 'inspector/TimelineItemFactory.h',
+ 'inspector/TimelineRecordFactory.cpp',
+ 'inspector/TimelineRecordFactory.h',
'loader/appcache/ApplicationCache.cpp',
'loader/appcache/ApplicationCache.h',
'loader/appcache/ApplicationCacheGroup.cpp',
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 89e35e6..4dad604 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -36259,11 +36259,11 @@
>
</File>
<File
- RelativePath="..\inspector\TimelineItemFactory.cpp"
+ RelativePath="..\inspector\TimelineRecordFactory.cpp"
>
</File>
<File
- RelativePath="..\inspector\TimelineItemFactory.h"
+ RelativePath="..\inspector\TimelineRecordFactory.h"
>
</File>
<Filter
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 0a4bd0a..7f8f811 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1193,8 +1193,8 @@
72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 72626E010EF022FE00A07E20 /* FontFastPath.cpp */; };
754133A8102E00E800075D00 /* InspectorTimelineAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 754133A7102E00E800075D00 /* InspectorTimelineAgent.h */; };
754133AA102E00F400075D00 /* InspectorTimelineAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */; };
- 7553CFE8108F473F00EA281E /* TimelineItemFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553CFE6108F473F00EA281E /* TimelineItemFactory.h */; };
- 7553CFE9108F473F00EA281E /* TimelineItemFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7553CFE7108F473F00EA281E /* TimelineItemFactory.cpp */; };
+ 7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */; };
+ 7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */; };
75793E830D0CE0B3007FC0AC /* MessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */; };
75793E840D0CE0B3007FC0AC /* MessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793E810D0CE0B3007FC0AC /* MessageEvent.h */; };
75793EC80D0CE72D007FC0AC /* JSMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75793EC60D0CE72D007FC0AC /* JSMessageEvent.cpp */; };
@@ -6483,8 +6483,8 @@
72626E010EF022FE00A07E20 /* FontFastPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFastPath.cpp; sourceTree = "<group>"; };
754133A7102E00E800075D00 /* InspectorTimelineAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorTimelineAgent.h; sourceTree = "<group>"; };
754133A9102E00F400075D00 /* InspectorTimelineAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorTimelineAgent.cpp; sourceTree = "<group>"; };
- 7553CFE6108F473F00EA281E /* TimelineItemFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineItemFactory.h; sourceTree = "<group>"; };
- 7553CFE7108F473F00EA281E /* TimelineItemFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineItemFactory.cpp; sourceTree = "<group>"; };
+ 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineRecordFactory.h; sourceTree = "<group>"; };
+ 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimelineRecordFactory.cpp; sourceTree = "<group>"; };
75793E800D0CE0B3007FC0AC /* MessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MessageEvent.cpp; path = dom/MessageEvent.cpp; sourceTree = SOURCE_ROOT; };
75793E810D0CE0B3007FC0AC /* MessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = MessageEvent.h; path = dom/MessageEvent.h; sourceTree = SOURCE_ROOT; };
75793E820D0CE0B3007FC0AC /* MessageEvent.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = MessageEvent.idl; path = dom/MessageEvent.idl; sourceTree = SOURCE_ROOT; };
@@ -10388,8 +10388,8 @@
1C81B9FC0E9733CB00266E07 /* JavaScriptProfileNode.cpp */,
1C81B9FB0E9733CB00266E07 /* JavaScriptProfileNode.h */,
BCC64F5F0DCFB84E0081EF3B /* localizedStrings.js */,
- 7553CFE6108F473F00EA281E /* TimelineItemFactory.h */,
- 7553CFE7108F473F00EA281E /* TimelineItemFactory.cpp */,
+ 7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
+ 7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
);
path = inspector;
sourceTree = "<group>";
@@ -18065,7 +18065,7 @@
3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
973E325710883B7C005BC493 /* ResourceLoadNotifier.h in Headers */,
84801955108BAFB300CB2B1F /* FEGaussianBlur.h in Headers */,
- 7553CFE8108F473F00EA281E /* TimelineItemFactory.h in Headers */,
+ 7553CFE8108F473F00EA281E /* TimelineRecordFactory.h in Headers */,
BC97E23A109144950010D361 /* HTMLAllCollection.h in Headers */,
BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */,
);
@@ -20199,7 +20199,7 @@
3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */,
973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */,
- 7553CFE9108F473F00EA281E /* TimelineItemFactory.cpp in Sources */,
+ 7553CFE9108F473F00EA281E /* TimelineRecordFactory.cpp in Sources */,
BC97E23B109144950010D361 /* HTMLAllCollection.cpp in Sources */,
BC97E412109154FA0010D361 /* JSHTMLAllCollection.cpp in Sources */,
BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */,
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index 7ee95a3..2c422ac 100644
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -214,10 +214,10 @@ void InspectorFrontend::timelineProfilerWasStopped()
callSimpleFunction("timelineProfilerWasStopped");
}
-void InspectorFrontend::addItemToTimeline(const ScriptObject& itemObj)
+void InspectorFrontend::addRecordToTimeline(const ScriptObject& record)
{
- OwnPtr<ScriptFunctionCall> function(newFunctionCall("addItemToTimeline"));
- function->appendArgument(itemObj);
+ OwnPtr<ScriptFunctionCall> function(newFunctionCall("addRecordToTimeline"));
+ function->appendArgument(record);
function->call();
}
diff --git a/WebCore/inspector/InspectorFrontend.h b/WebCore/inspector/InspectorFrontend.h
index bb76984..3cb9b8c 100644
--- a/WebCore/inspector/InspectorFrontend.h
+++ b/WebCore/inspector/InspectorFrontend.h
@@ -127,7 +127,7 @@ namespace WebCore {
void timelineProfilerWasStarted();
void timelineProfilerWasStopped();
- void addItemToTimeline(const ScriptObject& itemObj);
+ void addRecordToTimeline(const ScriptObject&);
void didGetCookies(int callId, const ScriptArray& cookies, const String& cookiesString);
void didDispatchOnInjectedScript(int callId, const String& result, bool isException);
diff --git a/WebCore/inspector/InspectorTimelineAgent.cpp b/WebCore/inspector/InspectorTimelineAgent.cpp
index 4a3409e..9220824 100644
--- a/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -35,7 +35,7 @@
#include "Event.h"
#include "InspectorFrontend.h"
-#include "TimelineItemFactory.h"
+#include "TimelineRecordFactory.h"
#include <wtf/CurrentTime.h>
@@ -53,102 +53,102 @@ InspectorTimelineAgent::~InspectorTimelineAgent()
void InspectorTimelineAgent::willDispatchDOMEvent(const Event& event)
{
- pushCurrentTimelineItem(TimelineItemFactory::createDOMDispatchTimelineItem(m_frontend, currentTimeInMilliseconds(), event), DOMDispatchTimelineItemType);
+ pushCurrentRecord(TimelineRecordFactory::createDOMDispatchRecord(m_frontend, currentTimeInMilliseconds(), event), DOMDispatchTimelineRecordType);
}
void InspectorTimelineAgent::didDispatchDOMEvent()
{
- didCompleteCurrentTimelineItem(DOMDispatchTimelineItemType);
+ didCompleteCurrentRecord(DOMDispatchTimelineRecordType);
}
void InspectorTimelineAgent::willLayout()
{
- pushCurrentTimelineItem(TimelineItemFactory::createGenericTimelineItem(m_frontend, currentTimeInMilliseconds()), LayoutTimelineItemType);
+ pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), LayoutTimelineRecordType);
}
void InspectorTimelineAgent::didLayout()
{
- didCompleteCurrentTimelineItem(LayoutTimelineItemType);
+ didCompleteCurrentRecord(LayoutTimelineRecordType);
}
void InspectorTimelineAgent::willRecalculateStyle()
{
- pushCurrentTimelineItem(TimelineItemFactory::createGenericTimelineItem(m_frontend, currentTimeInMilliseconds()), RecalculateStylesTimelineItemType);
+ pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), RecalculateStylesTimelineRecordType);
}
void InspectorTimelineAgent::didRecalculateStyle()
{
- didCompleteCurrentTimelineItem(RecalculateStylesTimelineItemType);
+ didCompleteCurrentRecord(RecalculateStylesTimelineRecordType);
}
void InspectorTimelineAgent::willPaint()
{
- pushCurrentTimelineItem(TimelineItemFactory::createGenericTimelineItem(m_frontend, currentTimeInMilliseconds()), PaintTimelineItemType);
+ pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), PaintTimelineRecordType);
}
void InspectorTimelineAgent::didPaint()
{
- didCompleteCurrentTimelineItem(PaintTimelineItemType);
+ didCompleteCurrentRecord(PaintTimelineRecordType);
}
void InspectorTimelineAgent::willWriteHTML()
{
- pushCurrentTimelineItem(TimelineItemFactory::createGenericTimelineItem(m_frontend, currentTimeInMilliseconds()), ParseHTMLTimelineItemType);
+ pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), ParseHTMLTimelineRecordType);
}
void InspectorTimelineAgent::didWriteHTML()
{
- didCompleteCurrentTimelineItem(ParseHTMLTimelineItemType);
+ didCompleteCurrentRecord(ParseHTMLTimelineRecordType);
}
void InspectorTimelineAgent::didInstallTimer(int timerId, int timeout, bool singleShot)
{
- addItemToTimeline(TimelineItemFactory::createTimerInstallTimelineItem(m_frontend, currentTimeInMilliseconds(), timerId,
- timeout, singleShot), TimerInstallTimelineItemType);
+ addRecordToTimeline(TimelineRecordFactory::createTimerInstallRecord(m_frontend, currentTimeInMilliseconds(), timerId,
+ timeout, singleShot), TimerInstallTimelineRecordType);
}
void InspectorTimelineAgent::didRemoveTimer(int timerId)
{
- addItemToTimeline(TimelineItemFactory::createGenericTimerTimelineItem(m_frontend, currentTimeInMilliseconds(), timerId),
- TimerRemoveTimelineItemType);
+ addRecordToTimeline(TimelineRecordFactory::createGenericTimerRecord(m_frontend, currentTimeInMilliseconds(), timerId),
+ TimerRemoveTimelineRecordType);
}
void InspectorTimelineAgent::willFireTimer(int timerId)
{
- pushCurrentTimelineItem(TimelineItemFactory::createGenericTimerTimelineItem(m_frontend, currentTimeInMilliseconds(), timerId),
- TimerFireTimelineItemType);
+ pushCurrentRecord(TimelineRecordFactory::createGenericTimerRecord(m_frontend, currentTimeInMilliseconds(), timerId),
+ TimerFireTimelineRecordType);
}
void InspectorTimelineAgent::didFireTimer()
{
- didCompleteCurrentTimelineItem(TimerFireTimelineItemType);
+ didCompleteCurrentRecord(TimerFireTimelineRecordType);
}
void InspectorTimelineAgent::reset()
{
- m_itemStack.clear();
+ m_recordStack.clear();
}
-void InspectorTimelineAgent::addItemToTimeline(ScriptObject item, TimelineItemType type)
+void InspectorTimelineAgent::addRecordToTimeline(ScriptObject record, TimelineRecordType type)
{
- item.set("type", type);
- if (m_itemStack.isEmpty())
- m_frontend->addItemToTimeline(item);
+ record.set("type", type);
+ if (m_recordStack.isEmpty())
+ m_frontend->addRecordToTimeline(record);
else {
- TimelineItemEntry parent = m_itemStack.last();
- parent.children.set(parent.children.length(), item);
+ TimelineRecordEntry parent = m_recordStack.last();
+ parent.children.set(parent.children.length(), record);
}
}
-void InspectorTimelineAgent::didCompleteCurrentTimelineItem(TimelineItemType type)
+void InspectorTimelineAgent::didCompleteCurrentRecord(TimelineRecordType type)
{
- ASSERT(!m_itemStack.isEmpty());
- TimelineItemEntry entry = m_itemStack.last();
- m_itemStack.removeLast();
+ ASSERT(!m_recordStack.isEmpty());
+ TimelineRecordEntry entry = m_recordStack.last();
+ m_recordStack.removeLast();
ASSERT(entry.type == type);
- entry.item.set("children", entry.children);
- entry.item.set("endTime", currentTimeInMilliseconds());
- addItemToTimeline(entry.item, type);
+ entry.record.set("children", entry.children);
+ entry.record.set("endTime", currentTimeInMilliseconds());
+ addRecordToTimeline(entry.record, type);
}
double InspectorTimelineAgent::currentTimeInMilliseconds()
@@ -156,9 +156,9 @@ double InspectorTimelineAgent::currentTimeInMilliseconds()
return currentTime() * 1000.0;
}
-void InspectorTimelineAgent::pushCurrentTimelineItem(ScriptObject item, TimelineItemType type)
+void InspectorTimelineAgent::pushCurrentRecord(ScriptObject record, TimelineRecordType type)
{
- m_itemStack.append(TimelineItemEntry(item, m_frontend->newScriptArray(), type));
+ m_recordStack.append(TimelineRecordEntry(record, m_frontend->newScriptArray(), type));
}
} // namespace WebCore
diff --git a/WebCore/inspector/InspectorTimelineAgent.h b/WebCore/inspector/InspectorTimelineAgent.h
index 0bf3965..a5f8511 100644
--- a/WebCore/inspector/InspectorTimelineAgent.h
+++ b/WebCore/inspector/InspectorTimelineAgent.h
@@ -42,15 +42,15 @@ namespace WebCore {
class InspectorFrontend;
// Must be kept in sync with TimelineAgent.js
- enum TimelineItemType {
- DOMDispatchTimelineItemType = 0,
- LayoutTimelineItemType = 1,
- RecalculateStylesTimelineItemType = 2,
- PaintTimelineItemType = 3,
- ParseHTMLTimelineItemType = 4,
- TimerInstallTimelineItemType = 5,
- TimerRemoveTimelineItemType = 6,
- TimerFireTimelineItemType = 7,
+ enum TimelineRecordType {
+ DOMDispatchTimelineRecordType = 0,
+ LayoutTimelineRecordType = 1,
+ RecalculateStylesTimelineRecordType = 2,
+ PaintTimelineRecordType = 3,
+ ParseHTMLTimelineRecordType = 4,
+ TimerInstallTimelineRecordType = 5,
+ TimerRemoveTimelineRecordType = 6,
+ TimerFireTimelineRecordType = 7,
};
class InspectorTimelineAgent {
@@ -83,24 +83,24 @@ namespace WebCore {
static InspectorTimelineAgent* retrieve(ScriptExecutionContext*);
private:
- struct TimelineItemEntry {
- TimelineItemEntry(ScriptObject item, ScriptArray children, TimelineItemType type) : item(item), children(children), type(type) { }
- ScriptObject item;
+ struct TimelineRecordEntry {
+ TimelineRecordEntry(ScriptObject record, ScriptArray children, TimelineRecordType type) : record(record), children(children), type(type) { }
+ ScriptObject record;
ScriptArray children;
- TimelineItemType type;
+ TimelineRecordType type;
};
- void pushCurrentTimelineItem(ScriptObject, TimelineItemType);
+ void pushCurrentRecord(ScriptObject, TimelineRecordType);
static double currentTimeInMilliseconds();
- void didCompleteCurrentTimelineItem(TimelineItemType);
+ void didCompleteCurrentRecord(TimelineRecordType);
- void addItemToTimeline(ScriptObject, TimelineItemType);
+ void addRecordToTimeline(ScriptObject, TimelineRecordType);
InspectorFrontend* m_frontend;
- Vector< TimelineItemEntry > m_itemStack;
+ Vector< TimelineRecordEntry > m_recordStack;
};
inline InspectorTimelineAgent* InspectorTimelineAgent::retrieve(ScriptExecutionContext* context)
diff --git a/WebCore/inspector/TimelineItemFactory.cpp b/WebCore/inspector/TimelineItemFactory.cpp
deleted file mode 100644
index 3255e78..0000000
--- a/WebCore/inspector/TimelineItemFactory.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "TimelineItemFactory.h"
-
-#if ENABLE(INSPECTOR)
-
-#include "Event.h"
-#include "InspectorFrontend.h"
-#include "ScriptArray.h"
-#include "ScriptObject.h"
-namespace WebCore {
-
-// static
-ScriptObject TimelineItemFactory::createGenericTimelineItem(InspectorFrontend* frontend, double startTime)
-{
- ScriptObject item = frontend->newScriptObject();
- item.set("startTime", startTime);
- return item;
-}
-
-// static
-ScriptObject TimelineItemFactory::createDOMDispatchTimelineItem(InspectorFrontend* frontend, double startTime, const Event& event)
-{
- ScriptObject item = createGenericTimelineItem(frontend, startTime);
- ScriptObject data = frontend->newScriptObject();
- data.set("type", event.type().string());
- item.set("data", data);
- return item;
-}
-
-// static
-ScriptObject TimelineItemFactory::createGenericTimerTimelineItem(InspectorFrontend* frontend, double startTime, int timerId)
-{
- ScriptObject item = createGenericTimelineItem(frontend, startTime);
- ScriptObject data = frontend->newScriptObject();
- data.set("timerId", timerId);
- item.set("data", data);
- return item;
-}
-
-// static
-ScriptObject TimelineItemFactory::createTimerInstallTimelineItem(InspectorFrontend* frontend, double startTime, int timerId, int timeout, bool singleShot)
-{
- ScriptObject item = createGenericTimelineItem(frontend, startTime);
- ScriptObject data = frontend->newScriptObject();
- data.set("timerId", timerId);
- data.set("timeout", timeout);
- data.set("singleShot", singleShot);
- item.set("data", data);
- return item;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/TimelineItemFactory.h b/WebCore/inspector/TimelineItemFactory.h
deleted file mode 100644
index b41f769..0000000
--- a/WebCore/inspector/TimelineItemFactory.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TimelineItemFactory_h
-#define TimelineItemFactory_h
-
-namespace WebCore {
-
- class Event;
- class InspectorFrontend;
- class ScriptObject;
-
- class TimelineItemFactory {
- public:
- static ScriptObject createGenericTimelineItem(InspectorFrontend*, double startTime);
-
- static ScriptObject createDOMDispatchTimelineItem(InspectorFrontend*, double startTime, const Event&);
-
- static ScriptObject createGenericTimerTimelineItem(InspectorFrontend*, double startTime, int timerId);
-
- static ScriptObject createTimerInstallTimelineItem(InspectorFrontend*, double startTime, int timerId, int timeout, bool singleShot);
-
- private:
- TimelineItemFactory() { }
- };
-
-} // namespace WebCore
-
-#endif // !defined(TimelineItemFactory_h)
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
new file mode 100644
index 0000000..64f7559
--- /dev/null
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "TimelineRecordFactory.h"
+
+#if ENABLE(INSPECTOR)
+
+#include "Event.h"
+#include "InspectorFrontend.h"
+#include "ScriptArray.h"
+#include "ScriptObject.h"
+namespace WebCore {
+
+// static
+ScriptObject TimelineRecordFactory::createGenericRecord(InspectorFrontend* frontend, double startTime)
+{
+ ScriptObject record = frontend->newScriptObject();
+ record.set("startTime", startTime);
+ return record;
+}
+
+// static
+ScriptObject TimelineRecordFactory::createDOMDispatchRecord(InspectorFrontend* frontend, double startTime, const Event& event)
+{
+ ScriptObject record = createGenericRecord(frontend, startTime);
+ ScriptObject data = frontend->newScriptObject();
+ data.set("type", event.type().string());
+ record.set("data", data);
+ return record;
+}
+
+// static
+ScriptObject TimelineRecordFactory::createGenericTimerRecord(InspectorFrontend* frontend, double startTime, int timerId)
+{
+ ScriptObject record = createGenericRecord(frontend, startTime);
+ ScriptObject data = frontend->newScriptObject();
+ data.set("timerId", timerId);
+ record.set("data", data);
+ return record;
+}
+
+// static
+ScriptObject TimelineRecordFactory::createTimerInstallRecord(InspectorFrontend* frontend, double startTime, int timerId, int timeout, bool singleShot)
+{
+ ScriptObject record = createGenericRecord(frontend, startTime);
+ ScriptObject data = frontend->newScriptObject();
+ data.set("timerId", timerId);
+ data.set("timeout", timeout);
+ data.set("singleShot", singleShot);
+ record.set("data", data);
+ return record;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/TimelineRecordFactory.h b/WebCore/inspector/TimelineRecordFactory.h
new file mode 100644
index 0000000..cad4172
--- /dev/null
+++ b/WebCore/inspector/TimelineRecordFactory.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef TimelineRecordFactory_h
+#define TimelineRecordFactory_h
+
+namespace WebCore {
+
+ class Event;
+ class InspectorFrontend;
+ class ScriptObject;
+
+ class TimelineRecordFactory {
+ public:
+ static ScriptObject createGenericRecord(InspectorFrontend*, double startTime);
+
+ static ScriptObject createDOMDispatchRecord(InspectorFrontend*, double startTime, const Event&);
+
+ static ScriptObject createGenericTimerRecord(InspectorFrontend*, double startTime, int timerId);
+
+ static ScriptObject createTimerInstallRecord(InspectorFrontend*, double startTime, int timerId, int timeout, bool singleShot);
+
+ private:
+ TimelineRecordFactory() { }
+ };
+
+} // namespace WebCore
+
+#endif // !defined(TimelineRecordFactory_h)
diff --git a/WebCore/inspector/front-end/TimelineAgent.js b/WebCore/inspector/front-end/TimelineAgent.js
index edd97a9..fcaad5d 100644
--- a/WebCore/inspector/front-end/TimelineAgent.js
+++ b/WebCore/inspector/front-end/TimelineAgent.js
@@ -33,7 +33,7 @@ WebInspector.TimelineAgent = function() {
}
// Must be kept in sync with TimelineItem.h
-WebInspector.TimelineAgent.ItemType = {
+WebInspector.TimelineAgent.RecordType = {
DOMDispatch : 0,
Layout : 1,
RecalculateStyles : 2,
@@ -44,9 +44,9 @@ WebInspector.TimelineAgent.ItemType = {
TimerFire : 7,
};
-WebInspector.addItemToTimeline = function(record) {
+WebInspector.addRecordToTimeline = function(record) {
if (WebInspector.panels.timeline)
- WebInspector.panels.timeline.addItemToTimeline(record);
+ WebInspector.panels.timeline.addRecordToTimeline(record);
}
WebInspector.timelineProfilerWasStarted = function() {
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index 9338de0..72f1594 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -71,19 +71,19 @@ WebInspector.TimelinePanel.prototype = {
this.toggleTimelineButton.toggled = false;
},
- addItemToTimeline: function(record)
+ addRecordToTimeline: function(record)
{
- this._innerAddItemToTimeline(this.recordsTreeElement, record);
+ this._innerAddRecordToTimeline(this.recordsTreeElement, record);
},
- _innerAddItemToTimeline: function(parentElement, record)
+ _innerAddRecordToTimeline: function(parentElement, record)
{
var treeItem = new WebInspector.TimelineRecordTreeElement(this, record);
parentElement.appendChild(treeItem);
if (record.children)
parentElement.expanded = true;
for (var i = 0; i < record.children.length; ++i)
- this._innerAddItemToTimeline(treeItem, record.children[i]);
+ this._innerAddRecordToTimeline(treeItem, record.children[i]);
},
_toggleTimelineButton: function()
@@ -99,17 +99,17 @@ WebInspector.TimelinePanel.prototype = {
this.timelineView.style.left = width + "px";
},
- getItemTypeName: function(record)
+ getRecordTypeName: function(record)
{
- if (!this._itemTypeNames) {
- this._itemTypeNames = {};
- var itemTypes = WebInspector.TimelineAgent.ItemType;
- this._itemTypeNames[itemTypes.DOMDispatch] = WebInspector.UIString("DOM Event");
- this._itemTypeNames[itemTypes.Layout] = WebInspector.UIString("Layout");
- this._itemTypeNames[itemTypes.RecalculateStyles] = WebInspector.UIString("Recalculate Style");
- this._itemTypeNames[itemTypes.Paint] = WebInspector.UIString("Paint");
- this._itemTypeNames[itemTypes.Layout] = WebInspector.UIString("Layout");
- this._itemTypeNames[itemTypes.ParseHTML] = WebInspector.UIString("Parse");
+ if (!this._recordTypeNames) {
+ this._recordTypeNames = {};
+ var recordTypes = WebInspector.TimelineAgent.RecordType;
+ this._recordTypeNames[recordTypes.DOMDispatch] = WebInspector.UIString("DOM Event");
+ this._recordTypeNames[recordTypes.Layout] = WebInspector.UIString("Layout");
+ this._recordTypeNames[recordTypes.RecalculateStyles] = WebInspector.UIString("Recalculate Style");
+ this._recordTypeNames[recordTypes.Paint] = WebInspector.UIString("Paint");
+ this._recordTypeNames[recordTypes.Layout] = WebInspector.UIString("Layout");
+ this._recordTypeNames[recordTypes.ParseHTML] = WebInspector.UIString("Parse");
}
return this._itemTypeNames[record.type];
}
@@ -135,7 +135,7 @@ WebInspector.TimelineRecordTreeElement.prototype = {
var typeElement = document.createElement("span");
typeElement.className = "type";
- typeElement.textContent = this._panel.getItemTypeName(this._record);
+ typeElement.textContent = this._panel.getRecordTypeName(this._record);
this.listItemElement.appendChild(typeElement);
if (this._record.data) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list