Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 { | 402 { |
| 403 return this._drawerSplitWidget.isSidebarMinimized(); | 403 return this._drawerSplitWidget.isSidebarMinimized(); |
| 404 }, | 404 }, |
| 405 | 405 |
| 406 /** | 406 /** |
| 407 * @override | 407 * @override |
| 408 * @return {!Element} | 408 * @return {!Element} |
| 409 */ | 409 */ |
| 410 defaultFocusedElement: function() | 410 defaultFocusedElement: function() |
| 411 { | 411 { |
| 412 return this._currentPanel ? this._currentPanel.defaultFocusedElement() : null; | 412 if (this._drawer.hasFocus()) { |
|
lushnikov
2016/05/23 18:19:24
style 1: the if blocks with return statements shou
luoe
2016/05/23 19:18:41
Done.
| |
| 413 return this._drawer.defaultFocusedElement(); | |
| 414 } else { | |
| 415 return this._currentPanel ? this._currentPanel.defaultFocusedElement () : null; | |
| 416 } | |
| 413 }, | 417 }, |
| 414 | 418 |
| 415 _keyPress: function(event) | 419 _keyPress: function(event) |
| 416 { | 420 { |
| 417 // BUG 104250: Windows 7 posts a WM_CHAR message upon the Ctrl+']' keypr ess. | 421 // BUG 104250: Windows 7 posts a WM_CHAR message upon the Ctrl+']' keypr ess. |
| 418 // Any charCode < 32 is not going to be a valid keypress. | 422 // Any charCode < 32 is not going to be a valid keypress. |
| 419 if (event.charCode < 32 && WebInspector.isWin()) | 423 if (event.charCode < 32 && WebInspector.isWin()) |
| 420 return; | 424 return; |
| 421 clearTimeout(this._keyDownTimer); | 425 clearTimeout(this._keyDownTimer); |
| 422 delete this._keyDownTimer; | 426 delete this._keyDownTimer; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 600 */ | 604 */ |
| 601 handleAction: function(context, actionId) | 605 handleAction: function(context, actionId) |
| 602 { | 606 { |
| 603 if (WebInspector.inspectorView.drawerVisible()) | 607 if (WebInspector.inspectorView.drawerVisible()) |
| 604 WebInspector.inspectorView.closeDrawer(); | 608 WebInspector.inspectorView.closeDrawer(); |
| 605 else | 609 else |
| 606 WebInspector.inspectorView.showDrawer(); | 610 WebInspector.inspectorView.showDrawer(); |
| 607 return true; | 611 return true; |
| 608 } | 612 } |
| 609 } | 613 } |
| OLD | NEW |