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

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: Address patch comments Created 4 years, 6 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 if (this._drawer.hasFocus())
413 return this._drawer.defaultFocusedElement();
412 return this._currentPanel ? this._currentPanel.defaultFocusedElement() : null; 414 return this._currentPanel ? this._currentPanel.defaultFocusedElement() : null;
413 }, 415 },
414 416
415 _keyPress: function(event) 417 _keyPress: function(event)
416 { 418 {
417 // BUG 104250: Windows 7 posts a WM_CHAR message upon the Ctrl+']' keypr ess. 419 // 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. 420 // Any charCode < 32 is not going to be a valid keypress.
419 if (event.charCode < 32 && WebInspector.isWin()) 421 if (event.charCode < 32 && WebInspector.isWin())
420 return; 422 return;
421 clearTimeout(this._keyDownTimer); 423 clearTimeout(this._keyDownTimer);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 */ 602 */
601 handleAction: function(context, actionId) 603 handleAction: function(context, actionId)
602 { 604 {
603 if (WebInspector.inspectorView.drawerVisible()) 605 if (WebInspector.inspectorView.drawerVisible())
604 WebInspector.inspectorView.closeDrawer(); 606 WebInspector.inspectorView.closeDrawer();
605 else 607 else
606 WebInspector.inspectorView.showDrawer(); 608 WebInspector.inspectorView.showDrawer();
607 return true; 609 return true;
608 } 610 }
609 } 611 }
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