| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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; |
| OLD | NEW |