Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 2189223002: [DevTools] Show stack for console.warn messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/console/console-tests-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 } 222 }
223 223
224 this._formattedMessage.appendChild(this._messageElement); 224 this._formattedMessage.appendChild(this._messageElement);
225 if (this._anchorElement) { 225 if (this._anchorElement) {
226 // Append a space to prevent the anchor text from being glued to the console message when the user selects and copies the console messages. 226 // Append a space to prevent the anchor text from being glued to the console message when the user selects and copies the console messages.
227 this._anchorElement.appendChild(createTextNode(" ")); 227 this._anchorElement.appendChild(createTextNode(" "));
228 this._formattedMessage.insertBefore(this._anchorElement, this._forma ttedMessage.firstChild); 228 this._formattedMessage.insertBefore(this._anchorElement, this._forma ttedMessage.firstChild);
229 } 229 }
230 230
231 var dumpStackTrace = !!consoleMessage.stackTrace && (consoleMessage.sour ce === WebInspector.ConsoleMessage.MessageSource.Network || consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel.Error || consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel.RevokedError || consoleMessage.type === WebInspector.ConsoleMessage.MessageType.Trace); 231 var dumpStackTrace = !!consoleMessage.stackTrace && (consoleMessage.sour ce === WebInspector.ConsoleMessage.MessageSource.Network || consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel.Error || consoleMessage.level === WebInspector.ConsoleMessage.MessageLevel.RevokedError || consoleMessage.type === WebInspector.ConsoleMessage.MessageType.Trace || consoleMessage.level === WebIn spector.ConsoleMessage.MessageLevel.Warning);
232 if (dumpStackTrace) { 232 if (dumpStackTrace) {
233 var treeOutline = new TreeOutline(); 233 var treeOutline = new TreeOutline();
234 treeOutline.element.classList.add("outline-disclosure", "outline-dis closure-no-padding"); 234 treeOutline.element.classList.add("outline-disclosure", "outline-dis closure-no-padding");
235 var content = this._formattedMessage; 235 var content = this._formattedMessage;
236 var root = new TreeElement(content); 236 var root = new TreeElement(content);
237 root.toggleOnClick = true; 237 root.toggleOnClick = true;
238 root.selectable = false; 238 root.selectable = false;
239 content.treeElementForTest = root; 239 content.treeElementForTest = root;
240 treeOutline.appendChild(root); 240 treeOutline.appendChild(root);
241 if (consoleMessage.type === WebInspector.ConsoleMessage.MessageType. Trace) 241 if (consoleMessage.type === WebInspector.ConsoleMessage.MessageType. Trace)
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 { 1357 {
1358 if (!this._wrapperElement) { 1358 if (!this._wrapperElement) {
1359 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1359 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1360 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1360 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1361 } 1361 }
1362 return this._wrapperElement; 1362 return this._wrapperElement;
1363 }, 1363 },
1364 1364
1365 __proto__: WebInspector.ConsoleViewMessage.prototype 1365 __proto__: WebInspector.ConsoleViewMessage.prototype
1366 } 1366 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/console/console-tests-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698