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

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

Issue 2491213003: DevTools: clicking console messages with traces should check for links (Closed)
Patch Set: Created 4 years, 1 month 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/http/tests/inspector/resources/source3.js ('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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 { 345 {
346 stackTraceElement.classList.toggle("hidden", !expand); 346 stackTraceElement.classList.toggle("hidden", !expand);
347 toggleElement.classList.toggle("expanded", expand); 347 toggleElement.classList.toggle("expanded", expand);
348 } 348 }
349 349
350 /** 350 /**
351 * @param {?Event} event 351 * @param {?Event} event
352 */ 352 */
353 function toggleStackTrace(event) 353 function toggleStackTrace(event)
354 { 354 {
355 if (event.target.hasSelection()) 355 var linkClicked = event.target && event.target.enclosingNodeOrSelfWi thNodeName('a');
356 if (event.target.hasSelection() || linkClicked)
356 return; 357 return;
357 expandStackTrace(stackTraceElement.classList.contains("hidden")); 358 expandStackTrace(stackTraceElement.classList.contains("hidden"));
358 event.consume(); 359 event.consume();
359 } 360 }
360 361
361 clickableElement.addEventListener("click", toggleStackTrace, false); 362 clickableElement.addEventListener("click", toggleStackTrace, false);
362 triangleElement.addEventListener("click", toggleStackTrace, false); 363 triangleElement.addEventListener("click", toggleStackTrace, false);
363 if (consoleMessage.type === WebInspector.ConsoleMessage.MessageType.Trac e) 364 if (consoleMessage.type === WebInspector.ConsoleMessage.MessageType.Trac e)
364 expandStackTrace(true); 365 expandStackTrace(true);
365 366
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 { 1263 {
1263 if (!this._element) { 1264 if (!this._element) {
1264 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1265 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1265 this._element.classList.toggle("collapsed", this._collapsed); 1266 this._element.classList.toggle("collapsed", this._collapsed);
1266 } 1267 }
1267 return this._element; 1268 return this._element;
1268 }, 1269 },
1269 1270
1270 __proto__: WebInspector.ConsoleViewMessage.prototype 1271 __proto__: WebInspector.ConsoleViewMessage.prototype
1271 } 1272 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/resources/source3.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698