Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 /** | 32 /** |
| 33 * @constructor | 33 * @constructor |
| 34 * @extends {WebInspector.Object} | 34 * @extends {WebInspector.Object} |
| 35 * @param {!WebInspector.TimelineModel} model | |
| 35 */ | 36 */ |
| 36 WebInspector.TimelinePresentationModel = function() | 37 WebInspector.TimelinePresentationModel = function(model) |
| 37 { | 38 { |
| 39 this._model = model; | |
| 38 this._filters = []; | 40 this._filters = []; |
| 41 this._bindings = new WebInspector.TimelinePresentationModel.InterRecordBindi ngs(); | |
| 39 this.reset(); | 42 this.reset(); |
| 40 } | 43 } |
| 41 | 44 |
| 42 /** | 45 /** |
| 43 * @param {!Array.<*>} recordsArray | 46 * @param {!Array.<*>} recordsArray |
| 44 * @param {?function(*)|?function(*,number)} preOrderCallback | 47 * @param {?function(*)|?function(*,number)} preOrderCallback |
| 45 * @param {function(*)|function(*,number)=} postOrderCallback | 48 * @param {function(*)|function(*,number)=} postOrderCallback |
| 46 */ | 49 */ |
| 47 WebInspector.TimelinePresentationModel.forAllRecords = function(recordsArray, pr eOrderCallback, postOrderCallback) | 50 WebInspector.TimelinePresentationModel.forAllRecords = function(recordsArray, pr eOrderCallback, postOrderCallback) |
| 48 { | 51 { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 /** | 110 /** |
| 108 * @return {!WebInspector.TimelinePresentationModel.Record} | 111 * @return {!WebInspector.TimelinePresentationModel.Record} |
| 109 */ | 112 */ |
| 110 rootRecord: function() | 113 rootRecord: function() |
| 111 { | 114 { |
| 112 return this._rootRecord; | 115 return this._rootRecord; |
| 113 }, | 116 }, |
| 114 | 117 |
| 115 reset: function() | 118 reset: function() |
| 116 { | 119 { |
| 117 this._rootRecord = new WebInspector.TimelinePresentationModel.Record(thi s, { type: WebInspector.TimelineModel.RecordType.Root }, null); | 120 var rootPayload = { type: WebInspector.TimelineModel.RecordType.Root }; |
| 118 this._sendRequestRecords = {}; | 121 this._rootRecord = new WebInspector.TimelinePresentationModel.Record(thi s._model, this._bindings, /** @type {!TimelineAgent.TimelineEvent} */ (rootPaylo ad), null); |
| 119 this._timerRecords = {}; | |
| 120 this._requestAnimationFrameRecords = {}; | |
| 121 this._eventDividerRecords = []; | 122 this._eventDividerRecords = []; |
| 122 this._minimumRecordTime = -1; | 123 this._minimumRecordTime = -1; |
| 123 this._layoutInvalidateStack = {}; | |
| 124 this._lastScheduleStyleRecalculation = {}; | |
| 125 this._webSocketCreateRecords = {}; | |
| 126 this._coalescingBuckets = {}; | 124 this._coalescingBuckets = {}; |
| 127 this._mergingBuffer = new WebInspector.TimelineMergingRecordBuffer(); | 125 this._mergingBuffer = new WebInspector.TimelineMergingRecordBuffer(); |
| 128 | 126 |
| 129 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ | 127 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ |
| 130 this._mainThreadTasks = ([]); | 128 this._mainThreadTasks = ([]); |
| 131 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ | 129 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ |
| 132 this._gpuThreadTasks = ([]); | 130 this._gpuThreadTasks = ([]); |
| 131 | |
| 132 this._bindings._reset(); | |
| 133 }, | 133 }, |
| 134 | 134 |
| 135 /** | 135 /** |
| 136 * @return {number} | 136 * @return {number} |
| 137 */ | 137 */ |
| 138 minimumRecordTime: function() | 138 minimumRecordTime: function() |
| 139 { | 139 { |
| 140 return this._minimumRecordTime; | 140 return this._minimumRecordTime; |
| 141 }, | 141 }, |
| 142 | 142 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 // On main thread, only coalesce if the last event is of same type. | 214 // On main thread, only coalesce if the last event is of same type. |
| 215 if (parentRecord === this._rootRecord) | 215 if (parentRecord === this._rootRecord) |
| 216 coalescingBucket = record.thread ? record.type : "mainThread"; | 216 coalescingBucket = record.thread ? record.type : "mainThread"; |
| 217 var coalescedRecord = this._findCoalescedParent(record, parentRecord, co alescingBucket); | 217 var coalescedRecord = this._findCoalescedParent(record, parentRecord, co alescingBucket); |
| 218 if (coalescedRecord) | 218 if (coalescedRecord) |
| 219 parentRecord = coalescedRecord; | 219 parentRecord = coalescedRecord; |
| 220 | 220 |
| 221 if (WebInspector.TimelineUIUtils.isEventDivider(record)) | 221 if (WebInspector.TimelineUIUtils.isEventDivider(record)) |
| 222 this._eventDividerRecords.push(record); | 222 this._eventDividerRecords.push(record); |
| 223 | 223 |
| 224 var formattedRecord = new WebInspector.TimelinePresentationModel.Record( this, record, parentRecord); | 224 var formattedRecord = new WebInspector.TimelinePresentationModel.Record( this._model, this._bindings, record, parentRecord); |
| 225 if (record.type in WebInspector.TimelinePresentationModel._hiddenRecords ) { | 225 if (record.type in WebInspector.TimelinePresentationModel._hiddenRecords ) { |
| 226 parentRecord.children.pop(); | 226 parentRecord.children.pop(); |
| 227 return null; | 227 return null; |
| 228 } | 228 } |
| 229 | 229 |
| 230 formattedRecord.collapsed = parentRecord === this._rootRecord; | 230 formattedRecord.collapsed = parentRecord === this._rootRecord; |
| 231 if (coalescingBucket) | 231 if (coalescingBucket) |
| 232 this._coalescingBuckets[coalescingBucket] = formattedRecord; | 232 this._coalescingBuckets[coalescingBucket] = formattedRecord; |
| 233 | 233 |
| 234 for (var i = 0; record.children && i < record.children.length; ++i) | 234 for (var i = 0; record.children && i < record.children.length; ++i) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 282 type: record._record.type, | 282 type: record._record.type, |
| 283 startTime: record._record.startTime, | 283 startTime: record._record.startTime, |
| 284 endTime: record._record.endTime, | 284 endTime: record._record.endTime, |
| 285 data: { } | 285 data: { } |
| 286 }; | 286 }; |
| 287 if (record._record.thread) | 287 if (record._record.thread) |
| 288 rawRecord.thread = "aggregated"; | 288 rawRecord.thread = "aggregated"; |
| 289 if (record.type === WebInspector.TimelineModel.RecordType.TimeStamp) | 289 if (record.type === WebInspector.TimelineModel.RecordType.TimeStamp) |
| 290 rawRecord.data.message = record.data.message; | 290 rawRecord.data.message = record.data.message; |
| 291 | 291 |
| 292 var coalescedRecord = new WebInspector.TimelinePresentationModel.Record( this, rawRecord, null); | 292 var coalescedRecord = new WebInspector.TimelinePresentationModel.Record( this._model, this._bindings, rawRecord, null); |
| 293 var parent = record.parent; | 293 var parent = record.parent; |
| 294 | 294 |
| 295 coalescedRecord.coalesced = true; | 295 coalescedRecord.coalesced = true; |
| 296 coalescedRecord.collapsed = true; | 296 coalescedRecord.collapsed = true; |
| 297 coalescedRecord._children.push(record); | 297 coalescedRecord._children.push(record); |
| 298 record.parent = coalescedRecord; | 298 record.parent = coalescedRecord; |
| 299 if (record.hasWarnings() || record.childHasWarnings()) | 299 if (record.hasWarnings() || record.childHasWarnings()) |
| 300 coalescedRecord._childHasWarnings = true; | 300 coalescedRecord._childHasWarnings = true; |
| 301 | 301 |
| 302 coalescedRecord.parent = parent; | 302 coalescedRecord.parent = parent; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 return false; | 406 return false; |
| 407 } | 407 } |
| 408 return !this._searchFilter || this._searchFilter.accept(record); | 408 return !this._searchFilter || this._searchFilter.accept(record); |
| 409 }, | 409 }, |
| 410 | 410 |
| 411 __proto__: WebInspector.Object.prototype | 411 __proto__: WebInspector.Object.prototype |
| 412 } | 412 } |
| 413 | 413 |
| 414 /** | 414 /** |
| 415 * @constructor | 415 * @constructor |
| 416 * @param {!WebInspector.TimelinePresentationModel} presentationModel | 416 */ |
| 417 * @param {!Object} record | 417 WebInspector.TimelinePresentationModel.InterRecordBindings = function() { |
|
caseq
2014/03/03 08:22:36
style: { => next line
| |
| 418 this._reset(); | |
| 419 } | |
| 420 | |
| 421 WebInspector.TimelinePresentationModel.InterRecordBindings.prototype = { | |
| 422 _reset: function() | |
| 423 { | |
| 424 this._sendRequestRecords = {}; | |
| 425 this._timerRecords = {}; | |
| 426 this._requestAnimationFrameRecords = {}; | |
| 427 this._layoutInvalidateStack = {}; | |
| 428 this._lastScheduleStyleRecalculation = {}; | |
| 429 this._webSocketCreateRecords = {}; | |
| 430 } | |
| 431 } | |
| 432 | |
| 433 /** | |
| 434 * @constructor | |
| 435 * @param {!WebInspector.TimelineModel} model | |
| 436 * @param {!WebInspector.TimelinePresentationModel.InterRecordBindings} bindings | |
| 437 * @param {!TimelineAgent.TimelineEvent} record | |
| 418 * @param {?WebInspector.TimelinePresentationModel.Record} parentRecord | 438 * @param {?WebInspector.TimelinePresentationModel.Record} parentRecord |
| 419 */ | 439 */ |
| 420 WebInspector.TimelinePresentationModel.Record = function(presentationModel, reco rd, parentRecord) | 440 WebInspector.TimelinePresentationModel.Record = function(model, bindings, record , parentRecord) |
| 421 { | 441 { |
| 422 this._presentationModel = presentationModel; | 442 this._model = model; |
| 423 this._aggregatedStats = {}; | 443 this._aggregatedStats = {}; |
| 424 this._record = /** @type {!TimelineAgent.TimelineEvent} */ (record); | 444 this._record = /** @type {!TimelineAgent.TimelineEvent} */ (record); |
| 425 this._children = []; | 445 this._children = []; |
| 426 if (parentRecord) { | 446 if (parentRecord) { |
| 427 this.parent = parentRecord; | 447 this.parent = parentRecord; |
| 428 parentRecord.children.push(this); | 448 parentRecord.children.push(this); |
| 429 } | 449 } |
| 430 | 450 |
| 431 this._selfTime = this.endTime - this.startTime; | 451 this._selfTime = this.endTime - this.startTime; |
| 432 this._lastChildEndTime = this.endTime; | 452 this._lastChildEndTime = this.endTime; |
| 433 this._startTimeOffset = this.startTime - presentationModel._minimumRecordTim e; | 453 this._startTimeOffset = this.startTime - model.minimumRecordTime(); |
| 434 | 454 |
| 435 if (record.data) { | 455 if (record.data) { |
| 436 if (record.data["url"]) | 456 if (record.data["url"]) |
| 437 this.url = record.data["url"]; | 457 this.url = record.data["url"]; |
| 438 if (record.data["rootNode"]) | 458 if (record.data["rootNode"]) |
| 439 this._relatedBackendNodeId = record.data["rootNode"]; | 459 this._relatedBackendNodeId = record.data["rootNode"]; |
| 440 else if (record.data["elementId"]) | 460 else if (record.data["elementId"]) |
| 441 this._relatedBackendNodeId = record.data["elementId"]; | 461 this._relatedBackendNodeId = record.data["elementId"]; |
| 442 if (record.data["scriptName"]) { | 462 if (record.data["scriptName"]) { |
| 443 this.scriptName = record.data["scriptName"]; | 463 this.scriptName = record.data["scriptName"]; |
| 444 this.scriptLine = record.data["scriptLine"]; | 464 this.scriptLine = record.data["scriptLine"]; |
| 445 } | 465 } |
| 446 } | 466 } |
| 447 | 467 |
| 448 if (parentRecord && parentRecord.callSiteStackTrace) | 468 if (parentRecord && parentRecord.callSiteStackTrace) |
| 449 this.callSiteStackTrace = parentRecord.callSiteStackTrace; | 469 this.callSiteStackTrace = parentRecord.callSiteStackTrace; |
| 450 | 470 |
| 451 var recordTypes = WebInspector.TimelineModel.RecordType; | 471 var recordTypes = WebInspector.TimelineModel.RecordType; |
| 452 switch (record.type) { | 472 switch (record.type) { |
| 453 case recordTypes.ResourceSendRequest: | 473 case recordTypes.ResourceSendRequest: |
| 454 // Make resource receive record last since request was sent; make finish record last since response received. | 474 // Make resource receive record last since request was sent; make finish record last since response received. |
| 455 presentationModel._sendRequestRecords[record.data["requestId"]] = this; | 475 bindings._sendRequestRecords[record.data["requestId"]] = this; |
| 456 break; | 476 break; |
| 457 | 477 |
| 458 case recordTypes.ResourceReceiveResponse: | 478 case recordTypes.ResourceReceiveResponse: |
| 459 var sendRequestRecord = presentationModel._sendRequestRecords[record.dat a["requestId"]]; | 479 var sendRequestRecord = bindings._sendRequestRecords[record.data["reques tId"]]; |
| 460 if (sendRequestRecord) // False if we started instrumentation in the mid dle of request. | 480 if (sendRequestRecord) // False if we started instrumentation in the mid dle of request. |
| 461 this.url = sendRequestRecord.url; | 481 this.url = sendRequestRecord.url; |
| 462 break; | 482 break; |
| 463 | 483 |
| 464 case recordTypes.ResourceReceivedData: | 484 case recordTypes.ResourceReceivedData: |
| 465 case recordTypes.ResourceFinish: | 485 case recordTypes.ResourceFinish: |
| 466 var sendRequestRecord = presentationModel._sendRequestRecords[record.dat a["requestId"]]; | 486 var sendRequestRecord = bindings._sendRequestRecords[record.data["reques tId"]]; |
| 467 if (sendRequestRecord) // False for main resource. | 487 if (sendRequestRecord) // False for main resource. |
| 468 this.url = sendRequestRecord.url; | 488 this.url = sendRequestRecord.url; |
| 469 break; | 489 break; |
| 470 | 490 |
| 471 case recordTypes.TimerInstall: | 491 case recordTypes.TimerInstall: |
| 472 this.timeout = record.data["timeout"]; | 492 this.timeout = record.data["timeout"]; |
| 473 this.singleShot = record.data["singleShot"]; | 493 this.singleShot = record.data["singleShot"]; |
| 474 presentationModel._timerRecords[record.data["timerId"]] = this; | 494 bindings._timerRecords[record.data["timerId"]] = this; |
| 475 break; | 495 break; |
| 476 | 496 |
| 477 case recordTypes.TimerFire: | 497 case recordTypes.TimerFire: |
| 478 var timerInstalledRecord = presentationModel._timerRecords[record.data[" timerId"]]; | 498 var timerInstalledRecord = bindings._timerRecords[record.data["timerId"] ]; |
| 479 if (timerInstalledRecord) { | 499 if (timerInstalledRecord) { |
| 480 this.callSiteStackTrace = timerInstalledRecord.stackTrace; | 500 this.callSiteStackTrace = timerInstalledRecord.stackTrace; |
| 481 this.timeout = timerInstalledRecord.timeout; | 501 this.timeout = timerInstalledRecord.timeout; |
| 482 this.singleShot = timerInstalledRecord.singleShot; | 502 this.singleShot = timerInstalledRecord.singleShot; |
| 483 } | 503 } |
| 484 break; | 504 break; |
| 485 | 505 |
| 486 case recordTypes.RequestAnimationFrame: | 506 case recordTypes.RequestAnimationFrame: |
| 487 presentationModel._requestAnimationFrameRecords[record.data["id"]] = thi s; | 507 bindings._requestAnimationFrameRecords[record.data["id"]] = this; |
| 488 break; | 508 break; |
| 489 | 509 |
| 490 case recordTypes.FireAnimationFrame: | 510 case recordTypes.FireAnimationFrame: |
| 491 var requestAnimationRecord = presentationModel._requestAnimationFrameRec ords[record.data["id"]]; | 511 var requestAnimationRecord = bindings._requestAnimationFrameRecords[reco rd.data["id"]]; |
| 492 if (requestAnimationRecord) | 512 if (requestAnimationRecord) |
| 493 this.callSiteStackTrace = requestAnimationRecord.stackTrace; | 513 this.callSiteStackTrace = requestAnimationRecord.stackTrace; |
| 494 break; | 514 break; |
| 495 | 515 |
| 496 case recordTypes.ConsoleTime: | 516 case recordTypes.ConsoleTime: |
| 497 var message = record.data["message"]; | 517 var message = record.data["message"]; |
| 498 break; | 518 break; |
| 499 | 519 |
| 500 case recordTypes.ScheduleStyleRecalculation: | 520 case recordTypes.ScheduleStyleRecalculation: |
| 501 presentationModel._lastScheduleStyleRecalculation[this.frameId] = this; | 521 bindings._lastScheduleStyleRecalculation[this.frameId] = this; |
| 502 break; | 522 break; |
| 503 | 523 |
| 504 case recordTypes.RecalculateStyles: | 524 case recordTypes.RecalculateStyles: |
| 505 var scheduleStyleRecalculationRecord = presentationModel._lastScheduleSt yleRecalculation[this.frameId]; | 525 var scheduleStyleRecalculationRecord = bindings._lastScheduleStyleRecalc ulation[this.frameId]; |
| 506 if (!scheduleStyleRecalculationRecord) | 526 if (!scheduleStyleRecalculationRecord) |
| 507 break; | 527 break; |
| 508 this.callSiteStackTrace = scheduleStyleRecalculationRecord.stackTrace; | 528 this.callSiteStackTrace = scheduleStyleRecalculationRecord.stackTrace; |
| 509 break; | 529 break; |
| 510 | 530 |
| 511 case recordTypes.InvalidateLayout: | 531 case recordTypes.InvalidateLayout: |
| 512 // Consider style recalculation as a reason for layout invalidation, | 532 // Consider style recalculation as a reason for layout invalidation, |
| 513 // but only if we had no earlier layout invalidation records. | 533 // but only if we had no earlier layout invalidation records. |
| 514 var styleRecalcStack; | 534 var styleRecalcStack; |
| 515 if (!presentationModel._layoutInvalidateStack[this.frameId]) { | 535 if (!bindings._layoutInvalidateStack[this.frameId]) { |
| 516 for (var outerRecord = parentRecord; outerRecord; outerRecord = reco rd.parent) { | 536 if (parentRecord.type === recordTypes.RecalculateStyles) |
| 517 if (outerRecord.type === recordTypes.RecalculateStyles) { | 537 styleRecalcStack = parentRecord.callSiteStackTrace; |
| 518 styleRecalcStack = outerRecord.callSiteStackTrace; | |
| 519 break; | |
| 520 } | |
| 521 } | |
| 522 } | 538 } |
| 523 presentationModel._layoutInvalidateStack[this.frameId] = styleRecalcStac k || this.stackTrace; | 539 bindings._layoutInvalidateStack[this.frameId] = styleRecalcStack || this .stackTrace; |
| 524 break; | 540 break; |
| 525 | 541 |
| 526 case recordTypes.Layout: | 542 case recordTypes.Layout: |
| 527 var layoutInvalidateStack = presentationModel._layoutInvalidateStack[thi s.frameId]; | 543 var layoutInvalidateStack = bindings._layoutInvalidateStack[this.frameId ]; |
| 528 if (layoutInvalidateStack) | 544 if (layoutInvalidateStack) |
| 529 this.callSiteStackTrace = layoutInvalidateStack; | 545 this.callSiteStackTrace = layoutInvalidateStack; |
| 530 if (this.stackTrace) | 546 if (this.stackTrace) |
| 531 this.addWarning(WebInspector.UIString("Forced synchronous layout is a possible performance bottleneck.")); | 547 this.addWarning(WebInspector.UIString("Forced synchronous layout is a possible performance bottleneck.")); |
| 532 | 548 |
| 533 presentationModel._layoutInvalidateStack[this.frameId] = null; | 549 bindings._layoutInvalidateStack[this.frameId] = null; |
| 534 this.highlightQuad = record.data.root || WebInspector.TimelinePresentati onModel.quadFromRectData(record.data); | 550 this.highlightQuad = record.data.root || WebInspector.TimelinePresentati onModel.quadFromRectData(record.data); |
| 535 this._relatedBackendNodeId = record.data["rootNode"]; | 551 this._relatedBackendNodeId = record.data["rootNode"]; |
| 536 break; | 552 break; |
| 537 | 553 |
| 538 case recordTypes.AutosizeText: | 554 case recordTypes.AutosizeText: |
| 539 if (record.data.needsRelayout && parentRecord.type === recordTypes.Layou t) | 555 if (record.data.needsRelayout && parentRecord.type === recordTypes.Layou t) |
| 540 parentRecord.addWarning(WebInspector.UIString("Layout required two p asses due to text autosizing, consider setting viewport.")); | 556 parentRecord.addWarning(WebInspector.UIString("Layout required two p asses due to text autosizing, consider setting viewport.")); |
| 541 break; | 557 break; |
| 542 | 558 |
| 543 case recordTypes.Paint: | 559 case recordTypes.Paint: |
| 544 this.highlightQuad = record.data.clip || WebInspector.TimelinePresentati onModel.quadFromRectData(record.data); | 560 this.highlightQuad = record.data.clip || WebInspector.TimelinePresentati onModel.quadFromRectData(record.data); |
| 545 break; | 561 break; |
| 546 | 562 |
| 547 case recordTypes.WebSocketCreate: | 563 case recordTypes.WebSocketCreate: |
| 548 this.webSocketURL = record.data["url"]; | 564 this.webSocketURL = record.data["url"]; |
| 549 if (typeof record.data["webSocketProtocol"] !== "undefined") | 565 if (typeof record.data["webSocketProtocol"] !== "undefined") |
| 550 this.webSocketProtocol = record.data["webSocketProtocol"]; | 566 this.webSocketProtocol = record.data["webSocketProtocol"]; |
| 551 presentationModel._webSocketCreateRecords[record.data["identifier"]] = t his; | 567 bindings._webSocketCreateRecords[record.data["identifier"]] = this; |
| 552 break; | 568 break; |
| 553 | 569 |
| 554 case recordTypes.WebSocketSendHandshakeRequest: | 570 case recordTypes.WebSocketSendHandshakeRequest: |
| 555 case recordTypes.WebSocketReceiveHandshakeResponse: | 571 case recordTypes.WebSocketReceiveHandshakeResponse: |
| 556 case recordTypes.WebSocketDestroy: | 572 case recordTypes.WebSocketDestroy: |
| 557 var webSocketCreateRecord = presentationModel._webSocketCreateRecords[re cord.data["identifier"]]; | 573 var webSocketCreateRecord = bindings._webSocketCreateRecords[record.data ["identifier"]]; |
| 558 if (webSocketCreateRecord) { // False if we started instrumentation in t he middle of request. | 574 if (webSocketCreateRecord) { // False if we started instrumentation in t he middle of request. |
| 559 this.webSocketURL = webSocketCreateRecord.webSocketURL; | 575 this.webSocketURL = webSocketCreateRecord.webSocketURL; |
| 560 if (typeof webSocketCreateRecord.webSocketProtocol !== "undefined") | 576 if (typeof webSocketCreateRecord.webSocketProtocol !== "undefined") |
| 561 this.webSocketProtocol = webSocketCreateRecord.webSocketProtocol ; | 577 this.webSocketProtocol = webSocketCreateRecord.webSocketProtocol ; |
| 562 } | 578 } |
| 563 break; | 579 break; |
| 564 | 580 |
| 565 case recordTypes.EmbedderCallback: | 581 case recordTypes.EmbedderCallback: |
| 566 this.embedderCallbackName = record.data["callbackName"]; | 582 this.embedderCallbackName = record.data["callbackName"]; |
| 567 break; | 583 break; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 627 get category() | 643 get category() |
| 628 { | 644 { |
| 629 return WebInspector.TimelineUIUtils.categoryForRecord(this._record); | 645 return WebInspector.TimelineUIUtils.categoryForRecord(this._record); |
| 630 }, | 646 }, |
| 631 | 647 |
| 632 /** | 648 /** |
| 633 * @return {string} | 649 * @return {string} |
| 634 */ | 650 */ |
| 635 title: function() | 651 title: function() |
| 636 { | 652 { |
| 637 return WebInspector.TimelineUIUtils.recordTitle(this._presentationModel, this._record); | 653 return WebInspector.TimelineUIUtils.recordTitle(this._model, this._recor d); |
| 638 }, | 654 }, |
| 639 | 655 |
| 640 /** | 656 /** |
| 641 * @return {number} | 657 * @return {number} |
| 642 */ | 658 */ |
| 643 get startTime() | 659 get startTime() |
| 644 { | 660 { |
| 645 return this._record.startTime; | 661 return this._record.startTime; |
| 646 }, | 662 }, |
| 647 | 663 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1200 { | 1216 { |
| 1201 } | 1217 } |
| 1202 | 1218 |
| 1203 WebInspector.TimelinePresentationModel.Filter.prototype = { | 1219 WebInspector.TimelinePresentationModel.Filter.prototype = { |
| 1204 /** | 1220 /** |
| 1205 * @param {!WebInspector.TimelinePresentationModel.Record} record | 1221 * @param {!WebInspector.TimelinePresentationModel.Record} record |
| 1206 * @return {boolean} | 1222 * @return {boolean} |
| 1207 */ | 1223 */ |
| 1208 accept: function(record) { return false; } | 1224 accept: function(record) { return false; } |
| 1209 } | 1225 } |
| OLD | NEW |