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

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

Issue 2319523004: DevTools: Remember the last focused widget. (Closed)
Patch Set: Fix test Created 4 years, 3 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) 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 this.suspendInvalidations(); 156 this.suspendInvalidations();
157 if (this._mainWidget) 157 if (this._mainWidget)
158 this._mainWidget.detach(); 158 this._mainWidget.detach();
159 this._mainWidget = widget; 159 this._mainWidget = widget;
160 if (widget) { 160 if (widget) {
161 widget.element.classList.add("insertion-point-main"); 161 widget.element.classList.add("insertion-point-main");
162 widget.element.classList.remove("insertion-point-sidebar"); 162 widget.element.classList.remove("insertion-point-sidebar");
163 widget.attach(this); 163 widget.attach(this);
164 if (this._showMode === WebInspector.SplitWidget.ShowMode.OnlyMain || this._showMode === WebInspector.SplitWidget.ShowMode.Both) 164 if (this._showMode === WebInspector.SplitWidget.ShowMode.OnlyMain || this._showMode === WebInspector.SplitWidget.ShowMode.Both)
165 widget.showWidget(this.element); 165 widget.showWidget(this.element);
166 this.setDefaultFocusedChild(widget);
166 } 167 }
167 this.resumeInvalidations(); 168 this.resumeInvalidations();
168 }, 169 },
169 170
170 /** 171 /**
171 * @param {!WebInspector.Widget} widget 172 * @param {!WebInspector.Widget} widget
172 */ 173 */
173 setSidebarWidget: function(widget) 174 setSidebarWidget: function(widget)
174 { 175 {
175 if (this._sidebarWidget === widget) 176 if (this._sidebarWidget === widget)
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 this._showHideSidebarButton.classList.toggle("toggled-hide", !sidebarHid den); 919 this._showHideSidebarButton.classList.toggle("toggled-hide", !sidebarHid den);
919 this._showHideSidebarButton.classList.toggle("top-sidebar-show-hide-butt on", !this.isVertical() && !this.isSidebarSecond()); 920 this._showHideSidebarButton.classList.toggle("top-sidebar-show-hide-butt on", !this.isVertical() && !this.isSidebarSecond());
920 this._showHideSidebarButton.classList.toggle("right-sidebar-show-hide-bu tton", this.isVertical() && this.isSidebarSecond()); 921 this._showHideSidebarButton.classList.toggle("right-sidebar-show-hide-bu tton", this.isVertical() && this.isSidebarSecond());
921 this._showHideSidebarButton.classList.toggle("bottom-sidebar-show-hide-b utton", !this.isVertical() && this.isSidebarSecond()); 922 this._showHideSidebarButton.classList.toggle("bottom-sidebar-show-hide-b utton", !this.isVertical() && this.isSidebarSecond());
922 this._showHideSidebarButton.classList.toggle("left-sidebar-show-hide-but ton", this.isVertical() && !this.isSidebarSecond()); 923 this._showHideSidebarButton.classList.toggle("left-sidebar-show-hide-but ton", this.isVertical() && !this.isSidebarSecond());
923 this._showHideSidebarButton.title = sidebarHidden ? WebInspector.UIStrin g("Show %s", this._showHideSidebarButtonTitle) : WebInspector.UIString("Hide %s" , this._showHideSidebarButtonTitle); 924 this._showHideSidebarButton.title = sidebarHidden ? WebInspector.UIStrin g("Show %s", this._showHideSidebarButtonTitle) : WebInspector.UIString("Hide %s" , this._showHideSidebarButtonTitle);
924 }, 925 },
925 926
926 __proto__: WebInspector.Widget.prototype 927 __proto__: WebInspector.Widget.prototype
927 } 928 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698