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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js

Issue 2685333006: DevTools: Fix toolbar layout glitches on memory panel (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/profiler/profilesPanel.css » ('j') | 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 this.registerRequiredCSS('profiler/profilesPanel.css'); 41 this.registerRequiredCSS('profiler/profilesPanel.css');
42 this.registerRequiredCSS('components/objectValue.css'); 42 this.registerRequiredCSS('components/objectValue.css');
43 43
44 var mainContainer = new UI.VBox(); 44 var mainContainer = new UI.VBox();
45 this.splitWidget().setMainWidget(mainContainer); 45 this.splitWidget().setMainWidget(mainContainer);
46 46
47 this.profilesItemTreeElement = new Profiler.ProfilesSidebarTreeElement(this) ; 47 this.profilesItemTreeElement = new Profiler.ProfilesSidebarTreeElement(this) ;
48 48
49 this._sidebarTree = new UI.TreeOutlineInShadow(); 49 this._sidebarTree = new UI.TreeOutlineInShadow();
50 this._sidebarTree.registerRequiredCSS('profiler/profilesSidebarTree.css'); 50 this._sidebarTree.registerRequiredCSS('profiler/profilesSidebarTree.css');
51 this._sidebarTree.element.classList.add('profiles-sidebar-tree-box');
51 this.panelSidebarElement().appendChild(this._sidebarTree.element); 52 this.panelSidebarElement().appendChild(this._sidebarTree.element);
52 53
53 this._sidebarTree.appendChild(this.profilesItemTreeElement); 54 this._sidebarTree.appendChild(this.profilesItemTreeElement);
54 55
55 this.profileViews = createElement('div'); 56 this.profileViews = createElement('div');
56 this.profileViews.id = 'profile-views'; 57 this.profileViews.id = 'profile-views';
57 this.profileViews.classList.add('vbox'); 58 this.profileViews.classList.add('vbox');
58 mainContainer.element.appendChild(this.profileViews); 59 mainContainer.element.appendChild(this.profileViews);
59 60
60 this._toolbarElement = createElementWithClass('div', 'profiles-toolbar'); 61 this._toolbarElement = createElementWithClass('div', 'profiles-toolbar');
61 mainContainer.element.insertBefore(this._toolbarElement, mainContainer.eleme nt.firstChild); 62 mainContainer.element.insertBefore(this._toolbarElement, mainContainer.eleme nt.firstChild);
62 63
63 this.panelSidebarElement().classList.add('profiles-sidebar-tree-box'); 64 this.panelSidebarElement().classList.add('profiles-tree-sidebar');
64 var toolbarContainerLeft = createElementWithClass('div', 'profiles-toolbar') ; 65 var toolbarContainerLeft = createElementWithClass('div', 'profiles-toolbar') ;
65 this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSide barElement().firstChild); 66 this.panelSidebarElement().insertBefore(toolbarContainerLeft, this.panelSide barElement().firstChild);
66 var toolbar = new UI.Toolbar('', toolbarContainerLeft); 67 var toolbar = new UI.Toolbar('', toolbarContainerLeft);
67 68
68 this._toggleRecordAction = 69 this._toggleRecordAction =
69 /** @type {!UI.Action }*/ (UI.actionRegistry.action(recordingActionId)); 70 /** @type {!UI.Action }*/ (UI.actionRegistry.action(recordingActionId));
70 this._toggleRecordButton = UI.Toolbar.createActionButton(this._toggleRecordA ction); 71 this._toggleRecordButton = UI.Toolbar.createActionButton(this._toggleRecordA ction);
71 toolbar.appendToolbarItem(this._toggleRecordButton); 72 toolbar.appendToolbarItem(this._toggleRecordButton);
72 73
73 this.clearResultsButton = new UI.ToolbarButton(Common.UIString('Clear all pr ofiles'), 'largeicon-clear'); 74 this.clearResultsButton = new UI.ToolbarButton(Common.UIString('Clear all pr ofiles'), 'largeicon-clear');
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 * @param {string} actionId 814 * @param {string} actionId
814 * @return {boolean} 815 * @return {boolean}
815 */ 816 */
816 handleAction(context, actionId) { 817 handleAction(context, actionId) {
817 var panel = UI.context.flavor(Profiler.JSProfilerPanel); 818 var panel = UI.context.flavor(Profiler.JSProfilerPanel);
818 console.assert(panel && panel instanceof Profiler.JSProfilerPanel); 819 console.assert(panel && panel instanceof Profiler.JSProfilerPanel);
819 panel.toggleRecord(); 820 panel.toggleRecord();
820 return true; 821 return true;
821 } 822 }
822 }; 823 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/profiler/profilesPanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698