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

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

Issue 2002803002: DevTools: allow focus to be restored to the drawer when dialog closes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Drawer.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) 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
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
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 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Drawer.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698