Title: [186119] trunk/Source/WebInspectorUI
- Revision
- 186119
- Author
- [email protected]
- Date
- 2015-06-30 10:16:05 -0700 (Tue, 30 Jun 2015)
Log Message
Web Inspector: Misc. Timeline cleanup
https://bugs.webkit.org/show_bug.cgi?id=146430
Patch by Joseph Pecoraro <[email protected]> on 2015-06-30
Reviewed by Timothy Hatcher.
* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.reset):
Nobody listens for this event. Just remove it.
* UserInterface/Models/TimelineRecording.js:
Avoiding doing multiple lookups.
* UserInterface/Views/TimelineDataGridNode.js:
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.updateLayout):
Eliminate some unnecessary deletes.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (186118 => 186119)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-06-30 17:12:00 UTC (rev 186118)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-06-30 17:16:05 UTC (rev 186119)
@@ -1,3 +1,24 @@
+2015-06-30 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Misc. Timeline cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=146430
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Models/Timeline.js:
+ (WebInspector.Timeline.prototype.reset):
+ Nobody listens for this event. Just remove it.
+
+ * UserInterface/Models/TimelineRecording.js:
+ Avoiding doing multiple lookups.
+
+ * UserInterface/Views/TimelineDataGridNode.js:
+ * UserInterface/Views/TimelineRecordingContentView.js:
+ (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
+ * UserInterface/Views/TimelineView.js:
+ (WebInspector.TimelineView.prototype.updateLayout):
+ Eliminate some unnecessary deletes.
+
2015-06-29 Nikita Vasilyev <[email protected]>
Web Inspector: Unable to select the text of an inline error message
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js (186118 => 186119)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js 2015-06-30 17:12:00 UTC (rev 186118)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Timeline.js 2015-06-30 17:16:05 UTC (rev 186119)
@@ -106,10 +106,8 @@
this._startTime = NaN;
this._endTime = NaN;
- if (!suppressEvents) {
- this.dispatchEventToListeners(WebInspector.Timeline.Event.Reset);
+ if (!suppressEvents)
this.dispatchEventToListeners(WebInspector.Timeline.Event.TimesUpdated);
- }
}
addRecord(record)
@@ -156,7 +154,6 @@
};
WebInspector.Timeline.Event = {
- Reset: "timeline-reset",
RecordAdded: "timeline-record-added",
TimesUpdated: "timeline-times-updated"
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js (186118 => 186119)
--- trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js 2015-06-30 17:12:00 UTC (rev 186118)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js 2015-06-30 17:16:05 UTC (rev 186119)
@@ -155,13 +155,13 @@
addRecord(record)
{
- var hasCorrespondingTimeline = this._timelines.has(record.type);
- console.assert(hasCorrespondingTimeline, record, this._timelines);
- if (!hasCorrespondingTimeline)
+ var timeline = this._timelines.get(record.type);
+ console.assert(timeline, record, this._timelines);
+ if (!timeline)
return;
// Add the record to the global timeline by type.
- this._timelines.get(record.type).addRecord(record);
+ timeline.addRecord(record);
// Network and RenderingFrame records don't have source code timelines.
if (record.type === WebInspector.TimelineRecord.Type.Network || record.type === WebInspector.TimelineRecord.Type.RenderingFrame)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js (186118 => 186119)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2015-06-30 17:12:00 UTC (rev 186118)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGridNode.js 2015-06-30 17:16:05 UTC (rev 186119)
@@ -228,7 +228,7 @@
if (this._scheduledGraphRefreshIdentifier) {
cancelAnimationFrame(this._scheduledGraphRefreshIdentifier);
- delete this._scheduledGraphRefreshIdentifier;
+ this._scheduledGraphRefreshIdentifier = undefined;
}
// We are not visible, but an ancestor will draw our graph.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (186118 => 186119)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2015-06-30 17:12:00 UTC (rev 186118)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2015-06-30 17:16:05 UTC (rev 186119)
@@ -417,7 +417,7 @@
for (var timelineView of this._timelineViewMap.values())
timelineView.zeroTime = startTime;
- delete this._startTimeNeedsReset;
+ this._startTimeNeedsReset = false;
}
this._linearTimelineOverview.endTime = Math.max(endTime, currentTime);
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (186118 => 186119)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js 2015-06-30 17:12:00 UTC (rev 186118)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js 2015-06-30 17:16:05 UTC (rev 186119)
@@ -172,7 +172,7 @@
{
if (this._scheduledLayoutUpdateIdentifier) {
cancelAnimationFrame(this._scheduledLayoutUpdateIdentifier);
- delete this._scheduledLayoutUpdateIdentifier;
+ this._scheduledLayoutUpdateIdentifier = undefined;
}
// Implemented by sub-classes if needed.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes