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

Side by Side Diff: Source/devtools/front_end/SourcesPanel.js

Issue 214663005: [DevTools] Add preferred size to WebInspector.View. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Constraints Created 6 years, 9 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // Create scripts navigator 78 // Create scripts navigator
79 const initialNavigatorWidth = 225; 79 const initialNavigatorWidth = 225;
80 this.editorView = new WebInspector.SplitView(true, false, "sourcesPanelNavig atorSplitViewState", initialNavigatorWidth); 80 this.editorView = new WebInspector.SplitView(true, false, "sourcesPanelNavig atorSplitViewState", initialNavigatorWidth);
81 this.editorView.enableShowModeSaving(); 81 this.editorView.enableShowModeSaving();
82 this.editorView.element.id = "scripts-editor-split-view"; 82 this.editorView.element.id = "scripts-editor-split-view";
83 this.editorView.element.tabIndex = 0; 83 this.editorView.element.tabIndex = 0;
84 this.editorView.show(this._splitView.mainElement()); 84 this.editorView.show(this._splitView.mainElement());
85 85
86 this._navigator = new WebInspector.SourcesNavigator(this._workspace); 86 this._navigator = new WebInspector.SourcesNavigator(this._workspace);
87 this._navigator.view.setMinimumSize(Preferences.minSidebarWidth, 25); 87 this._navigator.view.setConstraints(Preferences.minSidebarWidth, 25);
88 this._navigator.view.show(this.editorView.sidebarElement()); 88 this._navigator.view.show(this.editorView.sidebarElement());
89 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source Selected, this._sourceSelected, this); 89 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source Selected, this._sourceSelected, this);
90 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source Renamed, this._sourceRenamed, this); 90 this._navigator.addEventListener(WebInspector.SourcesNavigator.Events.Source Renamed, this._sourceRenamed, this);
91 91
92 this._sourcesView = new WebInspector.SourcesView(this._workspace, this); 92 this._sourcesView = new WebInspector.SourcesView(this._workspace, this);
93 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSel ected, this._editorSelected.bind(this)); 93 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSel ected, this._editorSelected.bind(this));
94 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClo sed, this._editorClosed.bind(this)); 94 this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClo sed, this._editorClosed.bind(this));
95 this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this)); 95 this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this));
96 96
97 this._drawerEditorView = new WebInspector.SourcesPanel.DrawerEditorView(); 97 this._drawerEditorView = new WebInspector.SourcesPanel.DrawerEditorView();
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 if (!vertically) 989 if (!vertically)
990 this._splitView.uninstallResizer(this._sourcesView.statusBarContaine rElement()); 990 this._splitView.uninstallResizer(this._sourcesView.statusBarContaine rElement());
991 else 991 else
992 this._splitView.installResizer(this._sourcesView.statusBarContainerE lement()); 992 this._splitView.installResizer(this._sourcesView.statusBarContainerE lement());
993 993
994 // Create vertical box with stack. 994 // Create vertical box with stack.
995 var vbox = new WebInspector.VBox(); 995 var vbox = new WebInspector.VBox();
996 vbox.element.appendChild(this._debugToolbarDrawer); 996 vbox.element.appendChild(this._debugToolbarDrawer);
997 vbox.element.appendChild(this.debugToolbar); 997 vbox.element.appendChild(this.debugToolbar);
998 vbox.element.appendChild(this.threadsToolbar.element); 998 vbox.element.appendChild(this.threadsToolbar.element);
999 vbox.setMinimumSize(WebInspector.SourcesPanel.minToolbarWidth, 25); 999 vbox.setConstraints(25, 25, WebInspector.SourcesPanel.minToolbarWidth, 1 00);
1000 var sidebarPaneStack = new WebInspector.SidebarPaneStack(); 1000 var sidebarPaneStack = new WebInspector.SidebarPaneStack();
1001 sidebarPaneStack.element.classList.add("flex-auto"); 1001 sidebarPaneStack.element.classList.add("flex-auto");
1002 sidebarPaneStack.show(vbox.element); 1002 sidebarPaneStack.show(vbox.element);
1003 1003
1004 if (!vertically) { 1004 if (!vertically) {
1005 // Populate the only stack. 1005 // Populate the only stack.
1006 for (var pane in this.sidebarPanes) 1006 for (var pane in this.sidebarPanes)
1007 sidebarPaneStack.addPane(this.sidebarPanes[pane]); 1007 sidebarPaneStack.addPane(this.sidebarPanes[pane]);
1008 this._extensionSidebarPanesContainer = sidebarPaneStack; 1008 this._extensionSidebarPanesContainer = sidebarPaneStack;
1009 1009
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 WebInspector.SourcesPanel.ShowGoToSourceDialogActionDelegate.prototype = { 1232 WebInspector.SourcesPanel.ShowGoToSourceDialogActionDelegate.prototype = {
1233 /** 1233 /**
1234 * @return {boolean} 1234 * @return {boolean}
1235 */ 1235 */
1236 handleAction: function() 1236 handleAction: function()
1237 { 1237 {
1238 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh owPanel("sources")).showGoToSourceDialog(); 1238 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorView.sh owPanel("sources")).showGoToSourceDialog();
1239 return true; 1239 return true;
1240 } 1240 }
1241 } 1241 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698