| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 var stackTraceElement = contentElement.createChild('div'); | 323 var stackTraceElement = contentElement.createChild('div'); |
| 324 var stackTracePreview = | 324 var stackTracePreview = |
| 325 Components.DOMPresentationUtils.buildStackTracePreviewContents(target, l
inkifier, consoleMessage.stackTrace); | 325 Components.DOMPresentationUtils.buildStackTracePreviewContents(target, l
inkifier, consoleMessage.stackTrace); |
| 326 stackTraceElement.appendChild(stackTracePreview); | 326 stackTraceElement.appendChild(stackTracePreview); |
| 327 stackTraceElement.classList.add('hidden'); | 327 stackTraceElement.classList.add('hidden'); |
| 328 | 328 |
| 329 /** | 329 /** |
| 330 * @param {boolean} expand | 330 * @param {boolean} expand |
| 331 */ | 331 */ |
| 332 function expandStackTrace(expand) { | 332 function expandStackTrace(expand) { |
| 333 icon.setIconType(expand ? 'smallicon-triangle-bottom' : 'smallicon-triangl
e-right'); | 333 icon.setIconType(expand ? 'smallicon-triangle-down' : 'smallicon-triangle-
right'); |
| 334 stackTraceElement.classList.toggle('hidden', !expand); | 334 stackTraceElement.classList.toggle('hidden', !expand); |
| 335 } | 335 } |
| 336 | 336 |
| 337 /** | 337 /** |
| 338 * @param {?Event} event | 338 * @param {?Event} event |
| 339 */ | 339 */ |
| 340 function toggleStackTrace(event) { | 340 function toggleStackTrace(event) { |
| 341 if (event.target.hasSelection()) | 341 if (event.target.hasSelection()) |
| 342 return; | 342 return; |
| 343 expandStackTrace(stackTraceElement.classList.contains('hidden')); | 343 expandStackTrace(stackTraceElement.classList.contains('hidden')); |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 /** @type {?UI.Icon} */ | 1172 /** @type {?UI.Icon} */ |
| 1173 this._expandGroupIcon = null; | 1173 this._expandGroupIcon = null; |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 /** | 1176 /** |
| 1177 * @param {boolean} collapsed | 1177 * @param {boolean} collapsed |
| 1178 */ | 1178 */ |
| 1179 setCollapsed(collapsed) { | 1179 setCollapsed(collapsed) { |
| 1180 this._collapsed = collapsed; | 1180 this._collapsed = collapsed; |
| 1181 if (this._expandGroupIcon) | 1181 if (this._expandGroupIcon) |
| 1182 this._expandGroupIcon.setIconType(this._collapsed ? 'smallicon-triangle-ri
ght' : 'smallicon-triangle-bottom'); | 1182 this._expandGroupIcon.setIconType(this._collapsed ? 'smallicon-triangle-ri
ght' : 'smallicon-triangle-down'); |
| 1183 } | 1183 } |
| 1184 | 1184 |
| 1185 /** | 1185 /** |
| 1186 * @return {boolean} | 1186 * @return {boolean} |
| 1187 */ | 1187 */ |
| 1188 collapsed() { | 1188 collapsed() { |
| 1189 return this._collapsed; | 1189 return this._collapsed; |
| 1190 } | 1190 } |
| 1191 | 1191 |
| 1192 /** | 1192 /** |
| 1193 * @override | 1193 * @override |
| 1194 * @return {!Element} | 1194 * @return {!Element} |
| 1195 */ | 1195 */ |
| 1196 toMessageElement() { | 1196 toMessageElement() { |
| 1197 if (!this._element) { | 1197 if (!this._element) { |
| 1198 super.toMessageElement(); | 1198 super.toMessageElement(); |
| 1199 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); | 1199 this._expandGroupIcon = UI.Icon.create('', 'expand-group-icon'); |
| 1200 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); | 1200 this._contentElement.insertBefore(this._expandGroupIcon, this._contentElem
ent.firstChild); |
| 1201 this.setCollapsed(this._collapsed); | 1201 this.setCollapsed(this._collapsed); |
| 1202 } | 1202 } |
| 1203 return this._element; | 1203 return this._element; |
| 1204 } | 1204 } |
| 1205 }; | 1205 }; |
| OLD | NEW |