Title: [119485] trunk/Source/WebCore
- Revision
- 119485
- Author
- [email protected]
- Date
- 2012-06-05 07:50:04 -0700 (Tue, 05 Jun 2012)
Log Message
Web Inspector: aggregate all events before first frame into a fake frame
https://bugs.webkit.org/show_bug.cgi?id=88229
- in Timeline's frame mode, start aggregating events by frame even before we get first frame marker.
* inspector/front-end/TimelineFrameController.js:
(WebInspector.TimelineFrameController.prototype._addRecord):
(WebInspector.TimelineFrameController.prototype._flushFrame):
(WebInspector.TimelineFrameController.prototype._createFrame):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (119484 => 119485)
--- trunk/Source/WebCore/ChangeLog 2012-06-05 12:27:44 UTC (rev 119484)
+++ trunk/Source/WebCore/ChangeLog 2012-06-05 14:50:04 UTC (rev 119485)
@@ -1,3 +1,15 @@
+2012-06-05 Andrey Kosyakov <[email protected]>
+
+ Web Inspector: aggregate all events before first frame into a fake frame
+ https://bugs.webkit.org/show_bug.cgi?id=88229
+
+ - in Timeline's frame mode, start aggregating events by frame even before we get first frame marker.
+
+ * inspector/front-end/TimelineFrameController.js:
+ (WebInspector.TimelineFrameController.prototype._addRecord):
+ (WebInspector.TimelineFrameController.prototype._flushFrame):
+ (WebInspector.TimelineFrameController.prototype._createFrame):
+
2012-06-05 Charles Wei <[email protected]>
JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB
Modified: trunk/Source/WebCore/inspector/front-end/TimelineFrameController.js (119484 => 119485)
--- trunk/Source/WebCore/inspector/front-end/TimelineFrameController.js 2012-06-05 12:27:44 UTC (rev 119484)
+++ trunk/Source/WebCore/inspector/front-end/TimelineFrameController.js 2012-06-05 14:50:04 UTC (rev 119485)
@@ -61,40 +61,30 @@
_addRecord: function(record)
{
- if (record.type === WebInspector.TimelineModel.RecordType.BeginFrame)
+ if (record.type === WebInspector.TimelineModel.RecordType.BeginFrame && this._lastFrame)
this._flushFrame(record);
- else if (this._lastFrame) {
+ else {
+ if (!this._lastFrame)
+ this._lastFrame = this._createFrame(record);
WebInspector.TimelineModel.aggregateTimeForRecord(this._lastFrame.timeByCategory, record);
this._lastFrame.cpuTime += WebInspector.TimelineModel.durationInSeconds(record);
- } else {
- // No frame records so far -- generate a synthetic frame per each top-level record, but only
- // dispatch these to the overview.
- this._overviewPane.addFrame(this._createSyntheticFrame(record));
}
},
_flushFrame: function(record)
{
- var frameBeginTime = WebInspector.TimelineModel.startTimeInSeconds(record);
- if (this._lastFrame) {
- this._lastFrame.endTime = frameBeginTime;
- this._lastFrame.duration = this._lastFrame.endTime - this._lastFrame.startTime;
- this._overviewPane.addFrame(this._lastFrame);
- this._presentationModel.addFrame(this._lastFrame);
- }
- this._lastFrame = new WebInspector.TimelineFrame();
- this._lastFrame.startTime = frameBeginTime;
- this._lastFrame.startTimeOffset = this._model.recordOffsetInSeconds(record);
+ this._lastFrame.endTime = WebInspector.TimelineModel.startTimeInSeconds(record);
+ this._lastFrame.duration = this._lastFrame.endTime - this._lastFrame.startTime;
+ this._overviewPane.addFrame(this._lastFrame);
+ this._presentationModel.addFrame(this._lastFrame);
+ this._lastFrame = this._createFrame(record);
},
- _createSyntheticFrame: function(record)
+ _createFrame: function(record)
{
var frame = new WebInspector.TimelineFrame();
frame.startTime = WebInspector.TimelineModel.startTimeInSeconds(record);
frame.startTimeOffset = this._model.recordOffsetInSeconds(record);
- frame.endTime = WebInspector.TimelineModel.endTimeInSeconds(record);
- frame.duration = WebInspector.TimelineModel.durationInSeconds(record);
- frame.cpuTime = frame.duration;
return frame;
},
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes