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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 var shadowRoot = WebInspector.createShadowRootWithCoreStyles(element, "compo nents/domUtils.css"); | 228 var shadowRoot = WebInspector.createShadowRootWithCoreStyles(element, "compo nents/domUtils.css"); |
229 var contentElement = shadowRoot.createChild("table", "stack-preview-containe r"); | 229 var contentElement = shadowRoot.createChild("table", "stack-preview-containe r"); |
230 | 230 |
231 /** | 231 /** |
232 * @param {!RuntimeAgent.StackTrace} stackTrace | 232 * @param {!RuntimeAgent.StackTrace} stackTrace |
233 */ | 233 */ |
234 function appendStackTrace(stackTrace) | 234 function appendStackTrace(stackTrace) |
235 { | 235 { |
236 for (var stackFrame of stackTrace.callFrames) { | 236 for (var stackFrame of stackTrace.callFrames) { |
237 var row = createElement("tr"); | 237 var row = createElement("tr"); |
238 row.createChild("td").textContent = "\n"; | |
dgozman
2016/08/24 18:57:09
Does this change things visually? Screenshot?
luoe
2016/08/24 20:31:01
No visual change. Screenshot (normal trace on top
| |
238 row.createChild("td", "function-name").textContent = WebInspector.be autifyFunctionName(stackFrame.functionName); | 239 row.createChild("td", "function-name").textContent = WebInspector.be autifyFunctionName(stackFrame.functionName); |
239 var link = linkifier.maybeLinkifyConsoleCallFrame(target, stackFrame ); | 240 var link = linkifier.maybeLinkifyConsoleCallFrame(target, stackFrame ); |
240 if (link) { | 241 if (link) { |
241 row.createChild("td").textContent = " @ "; | 242 row.createChild("td").textContent = " @ "; |
242 row.createChild("td").appendChild(link); | 243 row.createChild("td").appendChild(link); |
243 } | 244 } |
244 contentElement.appendChild(row); | 245 contentElement.appendChild(row); |
245 } | 246 } |
246 } | 247 } |
247 | 248 |
248 if (!stackTrace) | 249 if (!stackTrace) |
249 return element; | 250 return element; |
250 | 251 |
251 appendStackTrace(stackTrace); | 252 appendStackTrace(stackTrace); |
252 | 253 |
253 var asyncStackTrace = stackTrace.parent; | 254 var asyncStackTrace = stackTrace.parent; |
254 while (asyncStackTrace) { | 255 while (asyncStackTrace) { |
255 if (!asyncStackTrace.callFrames.length) { | 256 if (!asyncStackTrace.callFrames.length) { |
256 asyncStackTrace = asyncStackTrace.parent; | 257 asyncStackTrace = asyncStackTrace.parent; |
257 continue; | 258 continue; |
258 } | 259 } |
259 var row = contentElement.createChild("tr"); | 260 var row = contentElement.createChild("tr"); |
261 row.createChild("td").textContent = "\n"; | |
260 row.createChild("td", "stack-preview-async-description").textContent = W ebInspector.asyncStackTraceLabel(asyncStackTrace.description); | 262 row.createChild("td", "stack-preview-async-description").textContent = W ebInspector.asyncStackTraceLabel(asyncStackTrace.description); |
261 row.createChild("td"); | 263 row.createChild("td"); |
262 row.createChild("td"); | 264 row.createChild("td"); |
263 appendStackTrace(asyncStackTrace); | 265 appendStackTrace(asyncStackTrace); |
264 asyncStackTrace = asyncStackTrace.parent; | 266 asyncStackTrace = asyncStackTrace.parent; |
265 } | 267 } |
266 | 268 |
267 return element; | 269 return element; |
268 } | 270 } |
269 | 271 |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
653 /** | 655 /** |
654 * @override | 656 * @override |
655 * @param {!WebInspector.DOMNode} node | 657 * @param {!WebInspector.DOMNode} node |
656 * @return {?{title: string, color: string}} | 658 * @return {?{title: string, color: string}} |
657 */ | 659 */ |
658 decorate: function(node) | 660 decorate: function(node) |
659 { | 661 { |
660 return { title: this._title, color: this._color }; | 662 return { title: this._title, color: this._color }; |
661 } | 663 } |
662 } | 664 } |
OLD | NEW |