| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 else | 612 else |
| 613 parentRecord.children.push(this); | 613 parentRecord.children.push(this); |
| 614 } | 614 } |
| 615 if (origin) | 615 if (origin) |
| 616 this._origin = origin; | 616 this._origin = origin; |
| 617 | 617 |
| 618 this._selfTime = this.endTime - this.startTime; | 618 this._selfTime = this.endTime - this.startTime; |
| 619 this._lastChildEndTime = this.endTime; | 619 this._lastChildEndTime = this.endTime; |
| 620 this._startTimeOffset = this.startTime - presentationModel._minimumRecordTim
e; | 620 this._startTimeOffset = this.startTime - presentationModel._minimumRecordTim
e; |
| 621 | 621 |
| 622 if (record.data && record.data["url"]) | 622 if (record.data) { |
| 623 this.url = record.data["url"]; | 623 if (record.data["url"]) |
| 624 this.url = record.data["url"]; |
| 625 if (record.data["layerRootNode"]) |
| 626 this._relatedBackendNodeId = record.data["layerRootNode"]; |
| 627 } |
| 624 if (scriptDetails) { | 628 if (scriptDetails) { |
| 625 this.scriptName = scriptDetails.scriptName; | 629 this.scriptName = scriptDetails.scriptName; |
| 626 this.scriptLine = scriptDetails.scriptLine; | 630 this.scriptLine = scriptDetails.scriptLine; |
| 627 } | 631 } |
| 628 if (parentRecord && parentRecord.callSiteStackTrace) | 632 if (parentRecord && parentRecord.callSiteStackTrace) |
| 629 this.callSiteStackTrace = parentRecord.callSiteStackTrace; | 633 this.callSiteStackTrace = parentRecord.callSiteStackTrace; |
| 630 | 634 |
| 631 var recordTypes = WebInspector.TimelineModel.RecordType; | 635 var recordTypes = WebInspector.TimelineModel.RecordType; |
| 632 switch (record.type) { | 636 switch (record.type) { |
| 633 case recordTypes.ResourceSendRequest: | 637 case recordTypes.ResourceSendRequest: |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 this.callSiteStackTrace = layoutInvalidateStack; | 752 this.callSiteStackTrace = layoutInvalidateStack; |
| 749 if (this.stackTrace) | 753 if (this.stackTrace) |
| 750 this.setHasWarning(); | 754 this.setHasWarning(); |
| 751 presentationModel._layoutInvalidateStack[this.frameId] = null; | 755 presentationModel._layoutInvalidateStack[this.frameId] = null; |
| 752 this.highlightQuad = record.data.root || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); | 756 this.highlightQuad = record.data.root || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); |
| 753 this._relatedBackendNodeId = record.data["rootNode"]; | 757 this._relatedBackendNodeId = record.data["rootNode"]; |
| 754 break; | 758 break; |
| 755 | 759 |
| 756 case recordTypes.Paint: | 760 case recordTypes.Paint: |
| 757 this.highlightQuad = record.data.clip || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); | 761 this.highlightQuad = record.data.clip || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); |
| 758 this._relatedBackendNodeId = record.data["layerRootNode"]; | |
| 759 break; | 762 break; |
| 760 | 763 |
| 761 case recordTypes.WebSocketCreate: | 764 case recordTypes.WebSocketCreate: |
| 762 this.webSocketURL = record.data["url"]; | 765 this.webSocketURL = record.data["url"]; |
| 763 if (typeof record.data["webSocketProtocol"] !== "undefined") | 766 if (typeof record.data["webSocketProtocol"] !== "undefined") |
| 764 this.webSocketProtocol = record.data["webSocketProtocol"]; | 767 this.webSocketProtocol = record.data["webSocketProtocol"]; |
| 765 presentationModel._webSocketCreateRecords[record.data["identifier"]] = t
his; | 768 presentationModel._webSocketCreateRecords[record.data["identifier"]] = t
his; |
| 766 break; | 769 break; |
| 767 | 770 |
| 768 case recordTypes.WebSocketSendHandshakeRequest: | 771 case recordTypes.WebSocketSendHandshakeRequest: |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 var clipWidth = WebInspector.TimelinePresentationModel.quadW
idth(clip); | 1073 var clipWidth = WebInspector.TimelinePresentationModel.quadW
idth(clip); |
| 1071 var clipHeight = WebInspector.TimelinePresentationModel.quad
Height(clip); | 1074 var clipHeight = WebInspector.TimelinePresentationModel.quad
Height(clip); |
| 1072 contentHelper.appendTextRow(WebInspector.UIString("Dimension
s"), WebInspector.UIString("%d × %d", clipWidth, clipHeight)); | 1075 contentHelper.appendTextRow(WebInspector.UIString("Dimension
s"), WebInspector.UIString("%d × %d", clipWidth, clipHeight)); |
| 1073 } else { | 1076 } else { |
| 1074 // Backward compatibility: older version used x, y, width, h
eight fields directly in data. | 1077 // Backward compatibility: older version used x, y, width, h
eight fields directly in data. |
| 1075 if (typeof this.data["x"] !== "undefined" && typeof this.dat
a["y"] !== "undefined") | 1078 if (typeof this.data["x"] !== "undefined" && typeof this.dat
a["y"] !== "undefined") |
| 1076 contentHelper.appendTextRow(WebInspector.UIString("Locat
ion"), WebInspector.UIString("(%d, %d)", this.data["x"], this.data["y"])); | 1079 contentHelper.appendTextRow(WebInspector.UIString("Locat
ion"), WebInspector.UIString("(%d, %d)", this.data["x"], this.data["y"])); |
| 1077 if (typeof this.data["width"] !== "undefined" && typeof this
.data["height"] !== "undefined") | 1080 if (typeof this.data["width"] !== "undefined" && typeof this
.data["height"] !== "undefined") |
| 1078 contentHelper.appendTextRow(WebInspector.UIString("Dimen
sions"), WebInspector.UIString("%d\u2009\u00d7\u2009%d", this.data["width"], thi
s.data["height"])); | 1081 contentHelper.appendTextRow(WebInspector.UIString("Dimen
sions"), WebInspector.UIString("%d\u2009\u00d7\u2009%d", this.data["width"], thi
s.data["height"])); |
| 1079 } | 1082 } |
| 1083 // Fall-through intended. |
| 1084 |
| 1085 case recordTypes.Rasterize: |
| 1080 if (this._relatedNode) | 1086 if (this._relatedNode) |
| 1081 contentHelper.appendElementRow(WebInspector.UIString("Layer
root"), this._createNodeAnchor(this._relatedNode)); | 1087 contentHelper.appendElementRow(WebInspector.UIString("Layer
root"), this._createNodeAnchor(this._relatedNode)); |
| 1082 break; | 1088 break; |
| 1083 case recordTypes.RecalculateStyles: // We don't want to see default
details. | 1089 case recordTypes.RecalculateStyles: // We don't want to see default
details. |
| 1084 if (this.data["elementCount"]) | 1090 if (this.data["elementCount"]) |
| 1085 contentHelper.appendTextRow(WebInspector.UIString("Elements
affected"), this.data["elementCount"]); | 1091 contentHelper.appendTextRow(WebInspector.UIString("Elements
affected"), this.data["elementCount"]); |
| 1086 callStackLabel = WebInspector.UIString("Styles recalculation for
ced"); | 1092 callStackLabel = WebInspector.UIString("Styles recalculation for
ced"); |
| 1087 break; | 1093 break; |
| 1088 case recordTypes.Layout: | 1094 case recordTypes.Layout: |
| 1089 if (this.data["dirtyObjects"]) | 1095 if (this.data["dirtyObjects"]) |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 }, | 1534 }, |
| 1529 | 1535 |
| 1530 set hidden(hidden) | 1536 set hidden(hidden) |
| 1531 { | 1537 { |
| 1532 this._hidden = hidden; | 1538 this._hidden = hidden; |
| 1533 this.dispatchEventToListeners(WebInspector.TimelineCategory.Events.Visib
ilityChanged, this); | 1539 this.dispatchEventToListeners(WebInspector.TimelineCategory.Events.Visib
ilityChanged, this); |
| 1534 }, | 1540 }, |
| 1535 | 1541 |
| 1536 __proto__: WebInspector.Object.prototype | 1542 __proto__: WebInspector.Object.prototype |
| 1537 } | 1543 } |
| OLD | NEW |