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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2377193004: [DevTools] Rework some focus code. (Closed)
Patch Set: fixes Created 4 years, 2 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) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 WebInspector.Main.SearchActionDelegate = function() 656 WebInspector.Main.SearchActionDelegate = function()
657 { 657 {
658 } 658 }
659 659
660 WebInspector.Main.SearchActionDelegate.prototype = { 660 WebInspector.Main.SearchActionDelegate.prototype = {
661 /** 661 /**
662 * @override 662 * @override
663 * @param {!WebInspector.Context} context 663 * @param {!WebInspector.Context} context
664 * @param {string} actionId 664 * @param {string} actionId
665 * @return {boolean} 665 * @return {boolean}
666 * @suppressGlobalPropertiesCheck
666 */ 667 */
667 handleAction: function(context, actionId) 668 handleAction: function(context, actionId)
668 { 669 {
669 var searchableView = WebInspector.SearchableView.fromElement(WebInspecto r.currentFocusElement()) || WebInspector.inspectorView.currentPanel().searchable View(); 670 var searchableView = WebInspector.SearchableView.fromElement(document.de epActiveElement()) || WebInspector.inspectorView.currentPanel().searchableView() ;
pfeldman 2016/09/30 22:29:03 which document?
670 if (!searchableView) 671 if (!searchableView)
671 return false; 672 return false;
672 switch (actionId) { 673 switch (actionId) {
673 case "main.search-in-panel.find": 674 case "main.search-in-panel.find":
674 return searchableView.handleFindShortcut(); 675 return searchableView.handleFindShortcut();
675 case "main.search-in-panel.cancel": 676 case "main.search-in-panel.cancel":
676 return searchableView.handleCancelSearchShortcut(); 677 return searchableView.handleCancelSearchShortcut();
677 case "main.search-in-panel.find-next": 678 case "main.search-in-panel.find-next":
678 return searchableView.handleFindNextShortcut(); 679 return searchableView.handleFindNextShortcut();
679 case "main.search-in-panel.find-previous": 680 case "main.search-in-panel.find-previous":
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 * @override 1107 * @override
1107 * @return {?Element} 1108 * @return {?Element}
1108 */ 1109 */
1109 settingElement: function() 1110 settingElement: function()
1110 { 1111 {
1111 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); 1112 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers"));
1112 } 1113 }
1113 } 1114 }
1114 1115
1115 new WebInspector.Main(); 1116 new WebInspector.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698