[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
pfeldman at chromium.org
pfeldman at chromium.org
Thu Dec 3 13:22:08 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 169e1558a45589952681ff060b6d6132f99f93fa
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 28 23:19:11 2009 +0000
2009-10-28 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Glue subsequent timeline records with same category
and title together. Enable Timeline Panel!!!
https://bugs.webkit.org/show_bug.cgi?id=30885
* English.lproj/localizedStrings.js:
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.addRecordToTimeline):
(WebInspector.TimelinePanel.prototype._formatRecord):
(WebInspector.TimelineRecordTreeElement.prototype.onattach):
(WebInspector.TimelineRecordTreeElement.prototype.refresh):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50246 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a6ad901..8c02b32 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-28 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Glue subsequent timeline records with same category
+ and title together.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30885
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
+ (WebInspector.TimelinePanel.prototype._formatRecord):
+ (WebInspector.TimelineRecordTreeElement.prototype.onattach):
+ (WebInspector.TimelineRecordTreeElement.prototype.refresh):
+
2009-10-28 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
Reviewed by Xan Lopez.
diff --git a/WebCore/English.lproj/localizedStrings.js b/WebCore/English.lproj/localizedStrings.js
index e9b08b4..0e150f0 100644
Binary files a/WebCore/English.lproj/localizedStrings.js and b/WebCore/English.lproj/localizedStrings.js differ
diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js
index 268f10f..df63a0b 100644
--- a/WebCore/inspector/front-end/TimelinePanel.js
+++ b/WebCore/inspector/front-end/TimelinePanel.js
@@ -99,10 +99,23 @@ WebInspector.TimelinePanel.prototype = {
addRecordToTimeline: function(record)
{
- this.addItem(this._formatRecord(record));
-
- for (var i = 0; record.children && i < record.children.length; ++i)
- this.addRecordToTimeline(record.children[i]);
+ var formattedRecord = this._formatRecord(record);
+ // Glue subsequent records with same category and title together if they are closer than 100ms to each other.
+ if (this._lastRecord && (!record.children || !record.children.length) &&
+ this._lastRecord.category == formattedRecord.category &&
+ this._lastRecord.title == formattedRecord.title &&
+ this._lastRecord.details == formattedRecord.details &&
+ formattedRecord.startTime - this._lastRecord.endTime < 0.1) {
+ this._lastRecord.endTime = formattedRecord.endTime;
+ this._lastRecord.count++;
+ this.refreshItem(this._lastRecord);
+ } else {
+ this.addItem(formattedRecord);
+
+ for (var i = 0; record.children && i < record.children.length; ++i)
+ this.addRecordToTimeline(record.children[i]);
+ this._lastRecord = record.children && record.children.length ? null : formattedRecord;
+ }
},
createItemTreeElement: function(item)
@@ -138,6 +151,7 @@ WebInspector.TimelinePanel.prototype = {
this._recordStyles[recordTypes.TimerFire] = { title: WebInspector.UIString("Timer Fired"), category: this.categories.scripting };
this._recordStyles[recordTypes.XHRReadyStateChange] = { title: WebInspector.UIString("XHR Ready State Change"), category: this.categories.scripting };
this._recordStyles[recordTypes.XHRLoad] = { title: WebInspector.UIString("XHR Load"), category: this.categories.scripting };
+ this._recordStyles[recordTypes.EvaluateScriptTag] = { title: WebInspector.UIString("Evaluate Script"), category: this.categories.scripting };
this._recordStyles["Other"] = { title: WebInspector.UIString("Other"), icon: 0, category: this.categories.other };
}
@@ -150,8 +164,35 @@ WebInspector.TimelinePanel.prototype = {
formattedRecord.title = style.title;
formattedRecord.startTime = record.startTime / 1000;
formattedRecord.data = record.data;
+ formattedRecord.count = 1;
+ formattedRecord.type = record.type;
+ formattedRecord.details = this._getRecordDetails(record);
formattedRecord.endTime = (typeof record.endTime !== "undefined") ? record.endTime / 1000 : formattedRecord.startTime;
return formattedRecord;
+ },
+
+ _getRecordDetails: function(record)
+ {
+ switch (record.type) {
+ case WebInspector.TimelineAgent.RecordType.DOMDispatch:
+ return record.data.type;
+ case WebInspector.TimelineAgent.RecordType.TimerInstall:
+ case WebInspector.TimelineAgent.RecordType.TimerRemove:
+ case WebInspector.TimelineAgent.RecordType.TimerFire:
+ return record.data.timerId;
+ case WebInspector.TimelineAgent.RecordType.XHRReadyStateChange:
+ case WebInspector.TimelineAgent.RecordType.XHRLoad:
+ case WebInspector.TimelineAgent.RecordType.EvaluateScriptTag:
+ return record.data.url;
+ default:
+ return "";
+ }
+ },
+
+ reset: function()
+ {
+ WebInspector.AbstractTimelinePanel.prototype.reset.call(this);
+ this._lastRecord = null;
}
}
@@ -188,23 +229,29 @@ WebInspector.TimelineRecordTreeElement.prototype = {
iconElement.className = "timeline-tree-icon";
this.listItemElement.appendChild(iconElement);
- var typeElement = document.createElement("span");
- typeElement.className = "type";
- typeElement.textContent = this._record.title;
- this.listItemElement.appendChild(typeElement);
+ this.typeElement = document.createElement("span");
+ this.typeElement.className = "type";
+ this.typeElement.textContent = this._record.title;
+ this.listItemElement.appendChild(this.typeElement);
- if (this._record.data && this._record.data.type) {
+ if (this._record.details) {
var separatorElement = document.createElement("span");
separatorElement.className = "separator";
separatorElement.textContent = " ";
var dataElement = document.createElement("span");
dataElement.className = "data";
- dataElement.textContent = "(" + this._record.data.type + ")";
+ dataElement.textContent = "(" + this._record.details + ")";
dataElement.addStyleClass("dimmed");
this.listItemElement.appendChild(separatorElement);
this.listItemElement.appendChild(dataElement);
}
+ },
+
+ refresh: function()
+ {
+ if (this._record.count > 1)
+ this.typeElement.textContent = this._record.title + " x " + this._record.count;
}
}
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index d696f03..c24d589 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -143,10 +143,8 @@ var WebInspector = {
this.panels.profiles = new WebInspector.ProfilesPanel();
this.panels.profiles.registerProfileType(new WebInspector.CPUProfileType());
}
-
- // Uncomment this when timeline is ready.
- // if (hiddenPanels.indexOf("timeline") === -1 && hiddenPanels.indexOf("timeline") === -1)
- // this.panels.timeline = new WebInspector.TimelinePanel();
+ if (hiddenPanels.indexOf("timeline") === -1 && hiddenPanels.indexOf("timeline") === -1)
+ this.panels.timeline = new WebInspector.TimelinePanel();
if (hiddenPanels.indexOf("storage") === -1 && hiddenPanels.indexOf("databases") === -1)
this.panels.storage = new WebInspector.StoragePanel();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list