| 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) 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |