- Revision
- 191764
- Author
- [email protected]
- Date
- 2015-10-29 16:52:16 -0700 (Thu, 29 Oct 2015)
Log Message
Web Inspector: Display console.timeStamp(title) title in timeline markers
https://bugs.webkit.org/show_bug.cgi?id=150691
Patch by Joseph Pecoraro <[email protected]> on 2015-10-29
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._processEvent):
Detect unused timeline records.
* UserInterface/Models/TimelineMarker.js:
(WebInspector.TimelineMarker):
(WebInspector.TimelineMarker.prototype.get details):
Give markers an optional details argument.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.addMarker):
When a marker is a TimeStamp, use the details title in
the tooltip if one is available.
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.prototype._refreshFrameSelectionChart):
Used \u in localized string. Kept this an endash since it is a range.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (191763 => 191764)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-10-29 23:43:42 UTC (rev 191763)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-10-29 23:52:16 UTC (rev 191764)
@@ -1,3 +1,30 @@
+2015-10-29 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Display console.timeStamp(title) title in timeline markers
+ https://bugs.webkit.org/show_bug.cgi?id=150691
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager.prototype._processRecord):
+ (WebInspector.TimelineManager.prototype._processEvent):
+ Detect unused timeline records.
+
+ * UserInterface/Models/TimelineMarker.js:
+ (WebInspector.TimelineMarker):
+ (WebInspector.TimelineMarker.prototype.get details):
+ Give markers an optional details argument.
+
+ * UserInterface/Views/TimelineRuler.js:
+ (WebInspector.TimelineRuler.prototype.addMarker):
+ When a marker is a TimeStamp, use the details title in
+ the tooltip if one is available.
+
+ * UserInterface/Views/TimelineSidebarPanel.js:
+ (WebInspector.TimelineSidebarPanel.prototype._refreshFrameSelectionChart):
+ Used \u in localized string. Kept this an endash since it is a range.
+
2015-10-29 Timothy Hatcher <[email protected]>
Web Inspector: Navigation bar icons are missing
Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (191763 => 191764)
--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-10-29 23:43:42 UTC (rev 191763)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js 2015-10-29 23:52:16 UTC (rev 191764)
@@ -30,6 +30,7 @@
localizedStrings["%s (hidden)"] = "%s (hidden)";
localizedStrings["%s Event Dispatched"] = "%s Event Dispatched";
localizedStrings["%s Prototype"] = "%s Prototype";
+localizedStrings["%s \u2014 %s"] = "%s \u2014 %s";
localizedStrings["(Index)"] = "(Index)";
localizedStrings["(anonymous function)"] = "(anonymous function)";
localizedStrings["(many)"] = "(many)";
@@ -168,7 +169,7 @@
localizedStrings["Current"] = "Current";
localizedStrings["Cursor"] = "Cursor";
localizedStrings["Custom"] = "Custom";
-localizedStrings["DOMContentLoaded %s"] = "DOMContentLoaded %s";
+localizedStrings["DOMContentLoaded \u2014 %s"] = "DOMContentLoaded \u2014 %s";
localizedStrings["Data"] = "Data";
localizedStrings["Data returned from the database is too large."] = "Data returned from the database is too large.";
localizedStrings["Database no longer has expected version."] = "Database no longer has expected version.";
@@ -291,9 +292,9 @@
localizedStrings["Fragment"] = "Fragment";
localizedStrings["Frame %d"] = "Frame %d";
localizedStrings["Frame URL"] = "Frame URL";
-localizedStrings["Frame: %d (%s %s)"] = "Frame: %d (%s %s)";
+localizedStrings["Frame: %d (%s \u2013 %s)"] = "Frame: %d (%s \u2013 %s)";
localizedStrings["Frames"] = "Frames";
-localizedStrings["Frames: %d %d (%s %s)"] = "Frames: %d %d (%s %s)";
+localizedStrings["Frames: %d \u2013 %d (%s \u2013 %s)"] = "Frames: %d \u2013 %d (%s \u2013 %s)";
localizedStrings["Frames: None Selected"] = "Frames: None Selected";
localizedStrings["Full Garbage Collection"] = "Full Garbage Collection";
localizedStrings["Full URL"] = "Full URL";
@@ -359,7 +360,7 @@
localizedStrings["Line Number"] = "Line Number";
localizedStrings["Linear Gradient"] = "Linear Gradient";
localizedStrings["Live"] = "Live";
-localizedStrings["Load %s"] = "Load %s";
+localizedStrings["Load \u2014 %s"] = "Load \u2014 %s";
localizedStrings["Local File"] = "Local File";
localizedStrings["Local Storage"] = "Local Storage";
localizedStrings["Local Variables"] = "Local Variables";
@@ -602,7 +603,7 @@
localizedStrings["Timer Fired"] = "Timer Fired";
localizedStrings["Timer Installed"] = "Timer Installed";
localizedStrings["Timer Removed"] = "Timer Removed";
-localizedStrings["Timestamp %s"] = "Timestamp %s";
+localizedStrings["Timestamp \u2014 %s"] = "Timestamp \u2014 %s";
localizedStrings["Timing"] = "Timing";
localizedStrings["Top"] = "Top";
localizedStrings["Total Time"] = "Total Time";
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (191763 => 191764)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2015-10-29 23:43:42 UTC (rev 191763)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2015-10-29 23:52:16 UTC (rev 191764)
@@ -313,6 +313,10 @@
return new WebInspector.RenderingFrameTimelineRecord(startTime, endTime);
+ case TimelineAgent.EventType.ParseHTML:
+ // FIXME: <https://webkit.org/b/150689> Web Inspector: Handle or Remove ParseHTML Timeline Event Records
+ return null;
+
case TimelineAgent.EventType.EvaluateScript:
if (!sourceCodeLocation) {
var mainFrame = WebInspector.frameResourceManager.mainFrame;
@@ -342,6 +346,12 @@
console.assert(profileData);
return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.ConsoleProfileRecorded, startTime, endTime, callFrames, sourceCodeLocation, recordPayload.data.title, profileData);
+ case TimelineAgent.EventType.TimerFire:
+ case TimelineAgent.EventType.EventDispatch:
+ case TimelineAgent.EventType.FireAnimationFrame:
+ // These are handled when the parent of FunctionCall or EvaluateScript.
+ break;
+
case TimelineAgent.EventType.FunctionCall:
// FunctionCall always happens as a child of another record, and since the FunctionCall record
// has useful info we just make the timeline record here (combining the data from both records).
@@ -404,6 +414,9 @@
// Pass the startTime as the endTime since this record type has no duration.
return new WebInspector.ScriptTimelineRecord(WebInspector.ScriptTimelineRecord.EventType.AnimationFrameCanceled, startTime, startTime, callFrames, sourceCodeLocation, recordPayload.data.id);
+
+ default:
+ console.error("Missing handling of Timeline Event Type: " + recordPayload.type);
}
return null;
@@ -413,12 +426,17 @@
{
switch (recordPayload.type) {
case TimelineAgent.EventType.TimeStamp:
- // FIXME: Make use of "message" payload properties.
var timestamp = this.activeRecording.computeElapsedTime(recordPayload.startTime);
- var eventMarker = new WebInspector.TimelineMarker(timestamp, WebInspector.TimelineMarker.Type.TimeStamp);
+ var eventMarker = new WebInspector.TimelineMarker(timestamp, WebInspector.TimelineMarker.Type.TimeStamp, recordPayload.data.message);
this._activeRecording.addEventMarker(eventMarker);
break;
+ case TimelineAgent.EventType.Time:
+ case TimelineAgent.EventType.TimeEnd:
+ // FIXME: <https://webkit.org/b/150690> Web Inspector: Show console.time/timeEnd ranges in Timeline
+ // FIXME: Make use of "message" payload properties.
+ break;
+
default:
return this._processRecord(recordPayload, parentRecordPayload);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/TimelineMarker.js (191763 => 191764)
--- trunk/Source/WebInspectorUI/UserInterface/Models/TimelineMarker.js 2015-10-29 23:43:42 UTC (rev 191763)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/TimelineMarker.js 2015-10-29 23:52:16 UTC (rev 191764)
@@ -25,7 +25,7 @@
WebInspector.TimelineMarker = class TimelineMarker extends WebInspector.Object
{
- constructor(time, type)
+ constructor(time, type, details)
{
super();
@@ -33,6 +33,7 @@
this._time = time || 0;
this._type = type;
+ this._details = details || null;
}
// Public
@@ -56,6 +57,11 @@
{
return this._type;
}
+
+ get details()
+ {
+ return this._details;
+ }
};
WebInspector.TimelineMarker.Event = {
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js (191763 => 191764)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js 2015-10-29 23:43:42 UTC (rev 191763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js 2015-10-29 23:52:16 UTC (rev 191764)
@@ -311,13 +311,16 @@
switch (marker.type) {
case WebInspector.TimelineMarker.Type.LoadEvent:
- markerElement.title = WebInspector.UIString("Load – %s").format(Number.secondsToString(marker.time));
+ markerElement.title = WebInspector.UIString("Load \u2014 %s").format(Number.secondsToString(marker.time));
break;
case WebInspector.TimelineMarker.Type.DOMContentEvent:
- markerElement.title = WebInspector.UIString("DOMContentLoaded – %s").format(Number.secondsToString(marker.time));
+ markerElement.title = WebInspector.UIString("DOMContentLoaded \u2014 %s").format(Number.secondsToString(marker.time));
break;
case WebInspector.TimelineMarker.Type.TimeStamp:
- markerElement.title = WebInspector.UIString("Timestamp – %s").format(Number.secondsToString(marker.time));
+ if (marker.details)
+ markerElement.title = WebInspector.UIString("%s \u2014 %s").format(marker.details, Number.secondsToString(marker.time));
+ else
+ markerElement.title = WebInspector.UIString("Timestamp \u2014 %s").format(Number.secondsToString(marker.time));
break;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (191763 => 191764)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js 2015-10-29 23:43:42 UTC (rev 191763)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js 2015-10-29 23:52:16 UTC (rev 191764)
@@ -921,10 +921,10 @@
var lastRecord = records.lastValue;
if (records.length > 1) {
- this._frameSelectionChartRow.title = WebInspector.UIString("Frames: %d – %d (%s – %s)").format(firstRecord.frameNumber, lastRecord.frameNumber,
+ this._frameSelectionChartRow.title = WebInspector.UIString("Frames: %d \u2013 %d (%s \u2013 %s)").format(firstRecord.frameNumber, lastRecord.frameNumber,
Number.secondsToString(firstRecord.startTime), Number.secondsToString(lastRecord.endTime));
} else {
- this._frameSelectionChartRow.title = WebInspector.UIString("Frame: %d (%s – %s)").format(firstRecord.frameNumber,
+ this._frameSelectionChartRow.title = WebInspector.UIString("Frame: %d (%s \u2013 %s)").format(firstRecord.frameNumber,
Number.secondsToString(firstRecord.startTime), Number.secondsToString(lastRecord.endTime));
}
}