| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 * @param {!Array.<!ConsoleAgent.CallFrame>=} stackTrace | 217 * @param {!Array.<!ConsoleAgent.CallFrame>=} stackTrace |
| 218 * @param {!ConsoleAgent.AsyncStackTrace=} asyncStackTrace | 218 * @param {!ConsoleAgent.AsyncStackTrace=} asyncStackTrace |
| 219 * @return {!Element} | 219 * @return {!Element} |
| 220 */ | 220 */ |
| 221 WebInspector.DOMPresentationUtils.buildStackTracePreviewContents = function(targ
et, linkifier, stackTrace, asyncStackTrace) | 221 WebInspector.DOMPresentationUtils.buildStackTracePreviewContents = function(targ
et, linkifier, stackTrace, asyncStackTrace) |
| 222 { | 222 { |
| 223 var element = createElement("span"); | 223 var element = createElement("span"); |
| 224 element.style.display = "inline-block"; | 224 element.style.display = "inline-block"; |
| 225 var shadowRoot = WebInspector.createShadowRootWithCoreStyles(element, "compo
nents/domUtils.css"); | 225 var shadowRoot = WebInspector.createShadowRootWithCoreStyles(element, "compo
nents/domUtils.css"); |
| 226 var contentElement = shadowRoot.createChild("table", "stack-preview-containe
r"); | 226 var contentElement = shadowRoot.createChild("table", "stack-preview-containe
r"); |
| 227 contentElement.setAttribute("cellSpacing", "0"); |
| 227 | 228 |
| 228 /** | 229 /** |
| 229 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace | 230 * @param {!Array.<!ConsoleAgent.CallFrame>} stackTrace |
| 230 */ | 231 */ |
| 231 function appendStackTrace(stackTrace) | 232 function appendStackTrace(stackTrace) |
| 232 { | 233 { |
| 233 for (var stackFrame of stackTrace) { | 234 for (var stackFrame of stackTrace) { |
| 234 var row = createElement("tr"); | 235 var row = createElement("tr"); |
| 235 row.createChild("td").textContent = WebInspector.beautifyFunctionNam
e(stackFrame.functionName); | 236 row.createChild("td").textContent = WebInspector.beautifyFunctionNam
e(stackFrame.functionName); |
| 236 row.createChild("td").textContent = " @ "; | |
| 237 row.createChild("td").appendChild(linkifier.linkifyConsoleCallFrame(
target, stackFrame)); | 237 row.createChild("td").appendChild(linkifier.linkifyConsoleCallFrame(
target, stackFrame)); |
| 238 contentElement.appendChild(row); | 238 contentElement.appendChild(row); |
| 239 } | 239 } |
| 240 } | 240 } |
| 241 | 241 |
| 242 if (stackTrace) | 242 if (stackTrace) |
| 243 appendStackTrace(stackTrace); | 243 appendStackTrace(stackTrace); |
| 244 | 244 |
| 245 while (asyncStackTrace) { | 245 while (asyncStackTrace) { |
| 246 var callFrames = asyncStackTrace.callFrames; | 246 var callFrames = asyncStackTrace.callFrames; |
| 247 if (!callFrames || !callFrames.length) | 247 if (!callFrames || !callFrames.length) |
| 248 break; | 248 break; |
| 249 var row = contentElement.createChild("tr"); | 249 var row = contentElement.createChild("tr"); |
| 250 row.createChild("td", "stack-preview-async-description").textContent = W
ebInspector.asyncStackTraceLabel(asyncStackTrace.description); | 250 row.createChild("td", "stack-preview-async-description").textContent = W
ebInspector.asyncStackTraceLabel(asyncStackTrace.description); |
| 251 row.createChild("td"); | 251 row.createChild("td"); |
| 252 row.createChild("td"); | |
| 253 appendStackTrace(callFrames); | 252 appendStackTrace(callFrames); |
| 254 asyncStackTrace = asyncStackTrace.asyncStackTrace; | 253 asyncStackTrace = asyncStackTrace.asyncStackTrace; |
| 255 } | 254 } |
| 256 | 255 |
| 257 return element; | 256 return element; |
| 258 } | 257 } |
| 259 | 258 |
| 260 /** | 259 /** |
| 261 * @param {!WebInspector.DOMNode} node | 260 * @param {!WebInspector.DOMNode} node |
| 262 * @param {boolean=} justSelector | 261 * @param {boolean=} justSelector |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 /** | 645 /** |
| 647 * @override | 646 * @override |
| 648 * @param {!WebInspector.DOMNode} node | 647 * @param {!WebInspector.DOMNode} node |
| 649 * @return {?{title: string, color: string}} | 648 * @return {?{title: string, color: string}} |
| 650 */ | 649 */ |
| 651 decorate: function(node) | 650 decorate: function(node) |
| 652 { | 651 { |
| 653 return { title: this._title, color: this._color }; | 652 return { title: this._title, color: this._color }; |
| 654 } | 653 } |
| 655 } | 654 } |
| OLD | NEW |