| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2013 Google Inc. All rights reserved. | 2  * Copyright (C) 2013 Google Inc. All rights reserved. | 
| 3  * Copyright (C) 2012 Intel Inc. All rights reserved. | 3  * Copyright (C) 2012 Intel Inc. All rights reserved. | 
| 4  * | 4  * | 
| 5  * Redistribution and use in source and binary forms, with or without | 5  * Redistribution and use in source and binary forms, with or without | 
| 6  * modification, are permitted provided that the following conditions are | 6  * modification, are permitted provided that the following conditions are | 
| 7  * met: | 7  * met: | 
| 8  * | 8  * | 
| 9  *     * Redistributions of source code must retain the above copyright | 9  *     * Redistributions of source code must retain the above copyright | 
| 10  * notice, this list of conditions and the following disclaimer. | 10  * notice, this list of conditions and the following disclaimer. | 
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 222         eventDivider.title = title; | 222         eventDivider.title = title; | 
| 223 | 223 | 
| 224     return eventDivider; | 224     return eventDivider; | 
| 225 } | 225 } | 
| 226 | 226 | 
| 227 WebInspector.TimelinePresentationModel._hiddenRecords = { } | 227 WebInspector.TimelinePresentationModel._hiddenRecords = { } | 
| 228 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.MarkDOMContent] = 1; | 228 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.MarkDOMContent] = 1; | 
| 229 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.MarkLoad] = 1; | 229 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.MarkLoad] = 1; | 
| 230 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.ScheduleStyleRecalculation] = 1; | 230 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.ScheduleStyleRecalculation] = 1; | 
| 231 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.InvalidateLayout] = 1; | 231 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.InvalidateLayout] = 1; | 
|  | 232 WebInspector.TimelinePresentationModel._hiddenRecords[WebInspector.TimelineModel
      .RecordType.GPUTask] = 1; | 
| 232 | 233 | 
| 233 WebInspector.TimelinePresentationModel.prototype = { | 234 WebInspector.TimelinePresentationModel.prototype = { | 
| 234     /** | 235     /** | 
| 235      * @param {!WebInspector.TimelinePresentationModel.Filter} filter | 236      * @param {!WebInspector.TimelinePresentationModel.Filter} filter | 
| 236      */ | 237      */ | 
| 237     addFilter: function(filter) | 238     addFilter: function(filter) | 
| 238     { | 239     { | 
| 239         this._filters.push(filter); | 240         this._filters.push(filter); | 
| 240     }, | 241     }, | 
| 241 | 242 | 
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 656 | 657 | 
| 657         for (var i = firstTaskIndex; i <= lastTaskIndex; ++i) { | 658         for (var i = firstTaskIndex; i <= lastTaskIndex; ++i) { | 
| 658             var task = tasks[i]; | 659             var task = tasks[i]; | 
| 659             cpuTime += task.endTime - task.startTime; | 660             cpuTime += task.endTime - task.startTime; | 
| 660         } | 661         } | 
| 661         var startTime = tasks[firstTaskIndex].startTime; | 662         var startTime = tasks[firstTaskIndex].startTime; | 
| 662         var endTime = tasks[lastTaskIndex].endTime; | 663         var endTime = tasks[lastTaskIndex].endTime; | 
| 663         var duration = endTime - startTime; | 664         var duration = endTime - startTime; | 
| 664         var offset = this._minimumRecordTime; | 665         var offset = this._minimumRecordTime; | 
| 665 | 666 | 
| 666         var contentHelper = new WebInspector.PopoverContentHelper(WebInspector.U
      IString("CPU")); | 667         var contentHelper = new WebInspector.PopoverContentHelper(info.name); | 
| 667         var durationText = WebInspector.UIString("%s (at %s)", Number.secondsToS
      tring(duration, true), | 668         var durationText = WebInspector.UIString("%s (at %s)", Number.secondsToS
      tring(duration, true), | 
| 668             Number.secondsToString(startTime - offset, true)); | 669             Number.secondsToString(startTime - offset, true)); | 
| 669         contentHelper.appendTextRow(WebInspector.UIString("Duration"), durationT
      ext); | 670         contentHelper.appendTextRow(WebInspector.UIString("Duration"), durationT
      ext); | 
| 670         contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.se
      condsToString(cpuTime, true)); | 671         contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.se
      condsToString(cpuTime, true)); | 
| 671         contentHelper.appendTextRow(WebInspector.UIString("Message Count"), mess
      ageCount); | 672         contentHelper.appendTextRow(WebInspector.UIString("Message Count"), mess
      ageCount); | 
|  | 673         if (tasks[firstTaskIndex].pid) | 
|  | 674             contentHelper.appendTextRow(WebInspector.UIString("PId"), tasks[firs
      tTaskIndex].pid); | 
| 672         return contentHelper.contentTable(); | 675         return contentHelper.contentTable(); | 
| 673     }, | 676     }, | 
| 674 | 677 | 
| 675     __proto__: WebInspector.Object.prototype | 678     __proto__: WebInspector.Object.prototype | 
| 676 } | 679 } | 
| 677 | 680 | 
| 678 /** | 681 /** | 
| 679  * @constructor | 682  * @constructor | 
| 680  * @param {WebInspector.TimelinePresentationModel} presentationModel | 683  * @param {WebInspector.TimelinePresentationModel} presentationModel | 
| 681  * @param {Object} record | 684  * @param {Object} record | 
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 871     WebInspector.TimelinePresentationModel.insertRetrospectiveRecord(newParent, 
      record); | 874     WebInspector.TimelinePresentationModel.insertRetrospectiveRecord(newParent, 
      record); | 
| 872     record.parent = newParent; | 875     record.parent = newParent; | 
| 873 } | 876 } | 
| 874 | 877 | 
| 875 WebInspector.TimelinePresentationModel.insertRetrospectiveRecord = function(pare
      nt, record) | 878 WebInspector.TimelinePresentationModel.insertRetrospectiveRecord = function(pare
      nt, record) | 
| 876 { | 879 { | 
| 877     function compareStartTime(value, record) | 880     function compareStartTime(value, record) | 
| 878     { | 881     { | 
| 879         return value < record.startTime ? -1 : 1; | 882         return value < record.startTime ? -1 : 1; | 
| 880     } | 883     } | 
| 881 | 884 | 
| 882     parent.children.splice(insertionIndexForObjectInListSortedByFunction(record.
      startTime, parent.children, compareStartTime), 0, record); | 885     parent.children.splice(insertionIndexForObjectInListSortedByFunction(record.
      startTime, parent.children, compareStartTime), 0, record); | 
| 883 } | 886 } | 
| 884 | 887 | 
| 885 WebInspector.TimelinePresentationModel.Record.prototype = { | 888 WebInspector.TimelinePresentationModel.Record.prototype = { | 
| 886     get lastChildEndTime() | 889     get lastChildEndTime() | 
| 887     { | 890     { | 
| 888         return this._lastChildEndTime; | 891         return this._lastChildEndTime; | 
| 889     }, | 892     }, | 
| 890 | 893 | 
| 891     set lastChildEndTime(time) | 894     set lastChildEndTime(time) | 
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1207                 break; | 1210                 break; | 
| 1208             case recordTypes.WebSocketCreate: | 1211             case recordTypes.WebSocketCreate: | 
| 1209             case recordTypes.WebSocketSendHandshakeRequest: | 1212             case recordTypes.WebSocketSendHandshakeRequest: | 
| 1210             case recordTypes.WebSocketReceiveHandshakeResponse: | 1213             case recordTypes.WebSocketReceiveHandshakeResponse: | 
| 1211             case recordTypes.WebSocketDestroy: | 1214             case recordTypes.WebSocketDestroy: | 
| 1212                 if (typeof this.webSocketURL !== "undefined") | 1215                 if (typeof this.webSocketURL !== "undefined") | 
| 1213                     contentHelper.appendTextRow(WebInspector.UIString("URL"), th
      is.webSocketURL); | 1216                     contentHelper.appendTextRow(WebInspector.UIString("URL"), th
      is.webSocketURL); | 
| 1214                 if (typeof this.webSocketProtocol !== "undefined") | 1217                 if (typeof this.webSocketProtocol !== "undefined") | 
| 1215                     contentHelper.appendTextRow(WebInspector.UIString("WebSocket
       Protocol"), this.webSocketProtocol); | 1218                     contentHelper.appendTextRow(WebInspector.UIString("WebSocket
       Protocol"), this.webSocketProtocol); | 
| 1216                 if (typeof this.data["message"] !== "undefined") | 1219                 if (typeof this.data["message"] !== "undefined") | 
| 1217                     contentHelper.appendTextRow(WebInspector.UIString("Message")
      , this.data["message"]) | 1220                     contentHelper.appendTextRow(WebInspector.UIString("Message")
      , this.data["message"]); | 
| 1218                     break; | 1221                 break; | 
| 1219             default: | 1222             default: | 
| 1220                 if (this.detailsNode()) | 1223                 if (this.detailsNode()) | 
| 1221                     contentHelper.appendElementRow(WebInspector.UIString("Detail
      s"), this.detailsNode().childNodes[1].cloneNode()); | 1224                     contentHelper.appendElementRow(WebInspector.UIString("Detail
      s"), this.detailsNode().childNodes[1].cloneNode()); | 
| 1222                 break; | 1225                 break; | 
| 1223         } | 1226         } | 
| 1224 | 1227 | 
| 1225         if (this._relatedNode) | 1228         if (this._relatedNode) | 
| 1226             contentHelper.appendElementRow(relatedNodeLabel || WebInspector.UISt
      ring("Related node"), this._createNodeAnchor(this._relatedNode)); | 1229             contentHelper.appendElementRow(relatedNodeLabel || WebInspector.UISt
      ring("Related node"), this._createNodeAnchor(this._relatedNode)); | 
| 1227 | 1230 | 
| 1228         if (this.scriptName && this.type !== recordTypes.FunctionCall) | 1231         if (this.scriptName && this.type !== recordTypes.FunctionCall) | 
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1671     }, | 1674     }, | 
| 1672 | 1675 | 
| 1673     set hidden(hidden) | 1676     set hidden(hidden) | 
| 1674     { | 1677     { | 
| 1675         this._hidden = hidden; | 1678         this._hidden = hidden; | 
| 1676         this.dispatchEventToListeners(WebInspector.TimelineCategory.Events.Visib
      ilityChanged, this); | 1679         this.dispatchEventToListeners(WebInspector.TimelineCategory.Events.Visib
      ilityChanged, this); | 
| 1677     }, | 1680     }, | 
| 1678 | 1681 | 
| 1679     __proto__: WebInspector.Object.prototype | 1682     __proto__: WebInspector.Object.prototype | 
| 1680 } | 1683 } | 
| OLD | NEW | 
|---|