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

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

Issue 2649153005: DevTools: convert datagrid and network waterfall sort icons to UI.Icon (Closed)
Patch Set: rebaseline Created 3 years, 10 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
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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698