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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js

Issue 2574823002: DevTools: do not make main panel unconditionally focused by default. (Closed)
Patch Set: fixed the test Created 4 years 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 | « third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js ('k') | no next file » | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
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 * 10 *
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 this.suspendInvalidations(); 136 this.suspendInvalidations();
137 if (this._mainWidget) 137 if (this._mainWidget)
138 this._mainWidget.detach(); 138 this._mainWidget.detach();
139 this._mainWidget = widget; 139 this._mainWidget = widget;
140 if (widget) { 140 if (widget) {
141 widget.element.classList.add('insertion-point-main'); 141 widget.element.classList.add('insertion-point-main');
142 widget.element.classList.remove('insertion-point-sidebar'); 142 widget.element.classList.remove('insertion-point-sidebar');
143 widget.attach(this); 143 widget.attach(this);
144 if (this._showMode === UI.SplitWidget.ShowMode.OnlyMain || this._showMode === UI.SplitWidget.ShowMode.Both) 144 if (this._showMode === UI.SplitWidget.ShowMode.OnlyMain || this._showMode === UI.SplitWidget.ShowMode.Both)
145 widget.showWidget(this.element); 145 widget.showWidget(this.element);
146 this.setDefaultFocusedChild(widget);
147 } 146 }
148 this.resumeInvalidations(); 147 this.resumeInvalidations();
149 } 148 }
150 149
151 /** 150 /**
152 * @param {!UI.Widget} widget 151 * @param {!UI.Widget} widget
153 */ 152 */
154 setSidebarWidget(widget) { 153 setSidebarWidget(widget) {
155 if (this._sidebarWidget === widget) 154 if (this._sidebarWidget === widget)
156 return; 155 return;
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 OnlySidebar: 'OnlySidebar' 878 OnlySidebar: 'OnlySidebar'
880 }; 879 };
881 880
882 /** @enum {symbol} */ 881 /** @enum {symbol} */
883 UI.SplitWidget.Events = { 882 UI.SplitWidget.Events = {
884 SidebarSizeChanged: Symbol('SidebarSizeChanged'), 883 SidebarSizeChanged: Symbol('SidebarSizeChanged'),
885 ShowModeChanged: Symbol('ShowModeChanged') 884 ShowModeChanged: Symbol('ShowModeChanged')
886 }; 885 };
887 886
888 UI.SplitWidget.MinPadding = 20; 887 UI.SplitWidget.MinPadding = 20;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698