| OLD | NEW |
| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 if (event.handled) | 472 if (event.handled) |
| 473 return; | 473 return; |
| 474 | 474 |
| 475 var target = event.deepActiveElement(); | 475 var target = event.deepActiveElement(); |
| 476 if (target) { | 476 if (target) { |
| 477 var anchor = target.enclosingNodeOrSelfWithNodeName("a"); | 477 var anchor = target.enclosingNodeOrSelfWithNodeName("a"); |
| 478 if (anchor && anchor.preventFollow) | 478 if (anchor && anchor.preventFollow) |
| 479 event.preventDefault(); | 479 event.preventDefault(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 if (!WebInspector.Dialog.hasInstance() && WebInspector.inspectorView.cur
rentPanel()) { | 482 if (!WebInspector.Dialog.hasInstance() && WebInspector.inspectorView.cur
rentPanelDeprecated()) { |
| 483 WebInspector.inspectorView.currentPanel().handleShortcut(event); | 483 WebInspector.inspectorView.currentPanelDeprecated().handleShortcut(e
vent); |
| 484 if (event.handled) { | 484 if (event.handled) { |
| 485 event.consume(true); | 485 event.consume(true); |
| 486 return; | 486 return; |
| 487 } | 487 } |
| 488 } | 488 } |
| 489 | 489 |
| 490 WebInspector.shortcutRegistry.handleShortcut(event); | 490 WebInspector.shortcutRegistry.handleShortcut(event); |
| 491 }, | 491 }, |
| 492 | 492 |
| 493 /** | 493 /** |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 662 |
| 663 WebInspector.Main.SearchActionDelegate.prototype = { | 663 WebInspector.Main.SearchActionDelegate.prototype = { |
| 664 /** | 664 /** |
| 665 * @override | 665 * @override |
| 666 * @param {!WebInspector.Context} context | 666 * @param {!WebInspector.Context} context |
| 667 * @param {string} actionId | 667 * @param {string} actionId |
| 668 * @return {boolean} | 668 * @return {boolean} |
| 669 */ | 669 */ |
| 670 handleAction: function(context, actionId) | 670 handleAction: function(context, actionId) |
| 671 { | 671 { |
| 672 var searchableView = WebInspector.SearchableView.fromElement(WebInspecto
r.currentFocusElement()) || WebInspector.inspectorView.currentPanel().searchable
View(); | 672 var searchableView = WebInspector.SearchableView.fromElement(WebInspecto
r.currentFocusElement()) || WebInspector.inspectorView.currentPanelDeprecated().
searchableView(); |
| 673 if (!searchableView) | 673 if (!searchableView) |
| 674 return false; | 674 return false; |
| 675 switch (actionId) { | 675 switch (actionId) { |
| 676 case "main.search-in-panel.find": | 676 case "main.search-in-panel.find": |
| 677 return searchableView.handleFindShortcut(); | 677 return searchableView.handleFindShortcut(); |
| 678 case "main.search-in-panel.cancel": | 678 case "main.search-in-panel.cancel": |
| 679 return searchableView.handleCancelSearchShortcut(); | 679 return searchableView.handleCancelSearchShortcut(); |
| 680 case "main.search-in-panel.find-next": | 680 case "main.search-in-panel.find-next": |
| 681 return searchableView.handleFindNextShortcut(); | 681 return searchableView.handleFindNextShortcut(); |
| 682 case "main.search-in-panel.find-previous": | 682 case "main.search-in-panel.find-previous": |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 * @override | 1109 * @override |
| 1110 * @return {?Element} | 1110 * @return {?Element} |
| 1111 */ | 1111 */ |
| 1112 settingElement: function() | 1112 settingElement: function() |
| 1113 { | 1113 { |
| 1114 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri
ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); | 1114 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri
ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); |
| 1115 } | 1115 } |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 new WebInspector.Main(); | 1118 new WebInspector.Main(); |
| OLD | NEW |