| 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 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 * @param {!Element} parentElement | 1299 * @param {!Element} parentElement |
| 1300 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations | 1300 * @param {!Array.<!WebInspector.InvalidationTrackingEvent>} invalidations |
| 1301 */ | 1301 */ |
| 1302 _appendTruncatedNodeList: function(parentElement, invalidations) | 1302 _appendTruncatedNodeList: function(parentElement, invalidations) |
| 1303 { | 1303 { |
| 1304 var invalidationNodes = []; | 1304 var invalidationNodes = []; |
| 1305 var invalidationNodeIdMap = {}; | 1305 var invalidationNodeIdMap = {}; |
| 1306 for (var i = 0; i < invalidations.length; i++) { | 1306 for (var i = 0; i < invalidations.length; i++) { |
| 1307 var invalidation = invalidations[i]; | 1307 var invalidation = invalidations[i]; |
| 1308 var invalidationNode = this._createInvalidationNode(invalidation, fa
lse); | 1308 var invalidationNode = this._createInvalidationNode(invalidation, fa
lse); |
| 1309 invalidationNode.addEventListener("click", consumeEvent, false); | 1309 invalidationNode.addEventListener("click", (e) => e.consume(), false
); |
| 1310 if (invalidationNode && !invalidationNodeIdMap[invalidation.nodeId])
{ | 1310 if (invalidationNode && !invalidationNodeIdMap[invalidation.nodeId])
{ |
| 1311 invalidationNodes.push(invalidationNode); | 1311 invalidationNodes.push(invalidationNode); |
| 1312 invalidationNodeIdMap[invalidation.nodeId] = true; | 1312 invalidationNodeIdMap[invalidation.nodeId] = true; |
| 1313 } | 1313 } |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 if (invalidationNodes.length === 1) { | 1316 if (invalidationNodes.length === 1) { |
| 1317 parentElement.appendChild(invalidationNodes[0]); | 1317 parentElement.appendChild(invalidationNodes[0]); |
| 1318 } else if (invalidationNodes.length === 2) { | 1318 } else if (invalidationNodes.length === 2) { |
| 1319 parentElement.appendChild(invalidationNodes[0]); | 1319 parentElement.appendChild(invalidationNodes[0]); |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2145 case warnings.V8Deopt: | 2145 case warnings.V8Deopt: |
| 2146 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl
eChrome/devtools-docs/issues/53", | 2146 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl
eChrome/devtools-docs/issues/53", |
| 2147 WebInspector.UIString("Not optimized"), undefined, true)); | 2147 WebInspector.UIString("Not optimized"), undefined, true)); |
| 2148 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso
n"])); | 2148 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso
n"])); |
| 2149 break; | 2149 break; |
| 2150 default: | 2150 default: |
| 2151 console.assert(false, "Unhandled TimelineModel.WarningType"); | 2151 console.assert(false, "Unhandled TimelineModel.WarningType"); |
| 2152 } | 2152 } |
| 2153 return span; | 2153 return span; |
| 2154 } | 2154 } |
| OLD | NEW |