| 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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 paddingLeft += 12 / (Math.max(1, step++)); | 1025 paddingLeft += 12 / (Math.max(1, step++)); |
| 1026 this.element.style.paddingLeft = paddingLeft + "px"; | 1026 this.element.style.paddingLeft = paddingLeft + "px"; |
| 1027 if (record.thread) | 1027 if (record.thread) |
| 1028 this.element.classList.add("background"); | 1028 this.element.classList.add("background"); |
| 1029 | 1029 |
| 1030 this._typeElement.textContent = record.title(); | 1030 this._typeElement.textContent = record.title(); |
| 1031 | 1031 |
| 1032 if (this._dataElement.firstChild) | 1032 if (this._dataElement.firstChild) |
| 1033 this._dataElement.removeChildren(); | 1033 this._dataElement.removeChildren(); |
| 1034 | 1034 |
| 1035 this._warningElement.enableStyleClass("hidden", !presentationRecord.hasW
arnings() && !presentationRecord.childHasWarnings()); | 1035 this._warningElement.classList.toggle("hidden", !presentationRecord.hasW
arnings() && !presentationRecord.childHasWarnings()); |
| 1036 this._warningElement.enableStyleClass("timeline-tree-item-child-warning"
, presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings()); | 1036 this._warningElement.classList.toggle("timeline-tree-item-child-warning"
, presentationRecord.childHasWarnings() && !presentationRecord.hasWarnings()); |
| 1037 | 1037 |
| 1038 if (presentationRecord.coalesced()) { | 1038 if (presentationRecord.coalesced()) { |
| 1039 this._dataElement.createTextChild(WebInspector.UIString("× %d", pres
entationRecord.presentationChildren().length)); | 1039 this._dataElement.createTextChild(WebInspector.UIString("× %d", pres
entationRecord.presentationChildren().length)); |
| 1040 } else { | 1040 } else { |
| 1041 var detailsNode = WebInspector.TimelineUIUtils.buildDetailsNode(reco
rd, this._linkifier); | 1041 var detailsNode = WebInspector.TimelineUIUtils.buildDetailsNode(reco
rd, this._linkifier); |
| 1042 if (detailsNode) { | 1042 if (detailsNode) { |
| 1043 this._dataElement.appendChild(document.createTextNode("(")); | 1043 this._dataElement.appendChild(document.createTextNode("(")); |
| 1044 this._dataElement.appendChild(detailsNode); | 1044 this._dataElement.appendChild(detailsNode); |
| 1045 this._dataElement.appendChild(document.createTextNode(")")); | 1045 this._dataElement.appendChild(document.createTextNode(")")); |
| 1046 } | 1046 } |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 this._expandArrowElement.enableStyleClass("parent", presentationRecord.h
asPresentationChildren()); | 1049 this._expandArrowElement.classList.toggle("parent", presentationRecord.h
asPresentationChildren()); |
| 1050 this._expandArrowElement.enableStyleClass("expanded", !!presentationReco
rd.visibleChildrenCount()); | 1050 this._expandArrowElement.classList.toggle("expanded", !!presentationReco
rd.visibleChildrenCount()); |
| 1051 this._record.setListRow(this); | 1051 this._record.setListRow(this); |
| 1052 }, | 1052 }, |
| 1053 | 1053 |
| 1054 highlight: function(regExp, domChanges) | 1054 highlight: function(regExp, domChanges) |
| 1055 { | 1055 { |
| 1056 var matchInfo = this.element.textContent.match(regExp); | 1056 var matchInfo = this.element.textContent.match(regExp); |
| 1057 if (matchInfo) | 1057 if (matchInfo) |
| 1058 WebInspector.highlightSearchResult(this.element, matchInfo.index, ma
tchInfo[0].length, domChanges); | 1058 WebInspector.highlightSearchResult(this.element, matchInfo.index, ma
tchInfo[0].length, domChanges); |
| 1059 }, | 1059 }, |
| 1060 | 1060 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1079 _onClick: function(event) | 1079 _onClick: function(event) |
| 1080 { | 1080 { |
| 1081 this._selectRecord(this._record); | 1081 this._selectRecord(this._record); |
| 1082 }, | 1082 }, |
| 1083 | 1083 |
| 1084 /** | 1084 /** |
| 1085 * @param {boolean} selected | 1085 * @param {boolean} selected |
| 1086 */ | 1086 */ |
| 1087 renderAsSelected: function(selected) | 1087 renderAsSelected: function(selected) |
| 1088 { | 1088 { |
| 1089 this.element.enableStyleClass("selected", selected); | 1089 this.element.classList.toggle("selected", selected); |
| 1090 }, | 1090 }, |
| 1091 | 1091 |
| 1092 /** | 1092 /** |
| 1093 * @param {?Event} event | 1093 * @param {?Event} event |
| 1094 */ | 1094 */ |
| 1095 _onMouseOver: function(event) | 1095 _onMouseOver: function(event) |
| 1096 { | 1096 { |
| 1097 this.element.classList.add("hovered"); | 1097 this.element.classList.add("hovered"); |
| 1098 if (this._record.graphRow()) | 1098 if (this._record.graphRow()) |
| 1099 this._record.graphRow().element.classList.add("hovered"); | 1099 this._record.graphRow().element.classList.add("hovered"); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 if (this._expandElement._arrow.containsEventPoint(event)) | 1183 if (this._expandElement._arrow.containsEventPoint(event)) |
| 1184 this._expand(); | 1184 this._expand(); |
| 1185 this._selectRecord(this._record); | 1185 this._selectRecord(this._record); |
| 1186 }, | 1186 }, |
| 1187 | 1187 |
| 1188 /** | 1188 /** |
| 1189 * @param {boolean} selected | 1189 * @param {boolean} selected |
| 1190 */ | 1190 */ |
| 1191 renderAsSelected: function(selected) | 1191 renderAsSelected: function(selected) |
| 1192 { | 1192 { |
| 1193 this.element.enableStyleClass("selected", selected); | 1193 this.element.classList.toggle("selected", selected); |
| 1194 }, | 1194 }, |
| 1195 | 1195 |
| 1196 _expand: function() | 1196 _expand: function() |
| 1197 { | 1197 { |
| 1198 this._record.setCollapsed(!this._record.collapsed()); | 1198 this._record.setCollapsed(!this._record.collapsed()); |
| 1199 this._scheduleRefresh(); | 1199 this._scheduleRefresh(); |
| 1200 }, | 1200 }, |
| 1201 | 1201 |
| 1202 /** | 1202 /** |
| 1203 * @param {?Event} event | 1203 * @param {?Event} event |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 this._element.classList.remove("hidden"); | 1259 this._element.classList.remove("hidden"); |
| 1260 } else | 1260 } else |
| 1261 this._element.classList.add("hidden"); | 1261 this._element.classList.add("hidden"); |
| 1262 }, | 1262 }, |
| 1263 | 1263 |
| 1264 _dispose: function() | 1264 _dispose: function() |
| 1265 { | 1265 { |
| 1266 this._element.remove(); | 1266 this._element.remove(); |
| 1267 } | 1267 } |
| 1268 } | 1268 } |
| OLD | NEW |