| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 4 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 5 * Copyright (C) 2009 Joseph Pecoraro | 5 * Copyright (C) 2009 Joseph Pecoraro |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * | 10 * |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 var shadowRoot = WebInspector.createShadowRootWithCoreStyles(element, "compo
nents/domUtils.css"); | 233 var shadowRoot = WebInspector.createShadowRootWithCoreStyles(element, "compo
nents/domUtils.css"); |
| 234 var contentElement = shadowRoot.createChild("table", "stack-preview-containe
r"); | 234 var contentElement = shadowRoot.createChild("table", "stack-preview-containe
r"); |
| 235 | 235 |
| 236 /** | 236 /** |
| 237 * @param {!RuntimeAgent.StackTrace} stackTrace | 237 * @param {!RuntimeAgent.StackTrace} stackTrace |
| 238 */ | 238 */ |
| 239 function appendStackTrace(stackTrace) | 239 function appendStackTrace(stackTrace) |
| 240 { | 240 { |
| 241 for (var stackFrame of stackTrace.callFrames) { | 241 for (var stackFrame of stackTrace.callFrames) { |
| 242 var row = createElement("tr"); | 242 var row = createElement("tr"); |
| 243 row.createChild("td").textContent = "\n"; |
| 243 row.createChild("td", "function-name").textContent = WebInspector.be
autifyFunctionName(stackFrame.functionName); | 244 row.createChild("td", "function-name").textContent = WebInspector.be
autifyFunctionName(stackFrame.functionName); |
| 244 var link = linkifier.maybeLinkifyConsoleCallFrame(target, stackFrame
); | 245 var link = linkifier.maybeLinkifyConsoleCallFrame(target, stackFrame
); |
| 245 if (link) { | 246 if (link) { |
| 246 row.createChild("td").textContent = " @ "; | 247 row.createChild("td").textContent = " @ "; |
| 247 row.createChild("td").appendChild(link); | 248 row.createChild("td").appendChild(link); |
| 248 } | 249 } |
| 249 contentElement.appendChild(row); | 250 contentElement.appendChild(row); |
| 250 } | 251 } |
| 251 } | 252 } |
| 252 | 253 |
| 253 if (!stackTrace) | 254 if (!stackTrace) |
| 254 return element; | 255 return element; |
| 255 | 256 |
| 256 appendStackTrace(stackTrace); | 257 appendStackTrace(stackTrace); |
| 257 | 258 |
| 258 var asyncStackTrace = stackTrace.parent; | 259 var asyncStackTrace = stackTrace.parent; |
| 259 while (asyncStackTrace) { | 260 while (asyncStackTrace) { |
| 260 if (!asyncStackTrace.callFrames.length) { | 261 if (!asyncStackTrace.callFrames.length) { |
| 261 asyncStackTrace = asyncStackTrace.parent; | 262 asyncStackTrace = asyncStackTrace.parent; |
| 262 continue; | 263 continue; |
| 263 } | 264 } |
| 264 var row = contentElement.createChild("tr"); | 265 var row = contentElement.createChild("tr"); |
| 266 row.createChild("td").textContent = "\n"; |
| 265 row.createChild("td", "stack-preview-async-description").textContent = W
ebInspector.asyncStackTraceLabel(asyncStackTrace.description); | 267 row.createChild("td", "stack-preview-async-description").textContent = W
ebInspector.asyncStackTraceLabel(asyncStackTrace.description); |
| 266 row.createChild("td"); | 268 row.createChild("td"); |
| 267 row.createChild("td"); | 269 row.createChild("td"); |
| 268 appendStackTrace(asyncStackTrace); | 270 appendStackTrace(asyncStackTrace); |
| 269 asyncStackTrace = asyncStackTrace.parent; | 271 asyncStackTrace = asyncStackTrace.parent; |
| 270 } | 272 } |
| 271 | 273 |
| 272 return element; | 274 return element; |
| 273 } | 275 } |
| 274 | 276 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 /** | 660 /** |
| 659 * @override | 661 * @override |
| 660 * @param {!WebInspector.DOMNode} node | 662 * @param {!WebInspector.DOMNode} node |
| 661 * @return {?{title: string, color: string}} | 663 * @return {?{title: string, color: string}} |
| 662 */ | 664 */ |
| 663 decorate: function(node) | 665 decorate: function(node) |
| 664 { | 666 { |
| 665 return { title: this._title, color: this._color }; | 667 return { title: this._title, color: this._color }; |
| 666 } | 668 } |
| 667 } | 669 } |
| OLD | NEW |