Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 * @override | 51 * @override |
| 52 * @param {!WebInspector.Target} target | 52 * @param {!WebInspector.Target} target |
| 53 */ | 53 */ |
| 54 targetAdded: function(target) | 54 targetAdded: function(target) |
| 55 { | 55 { |
| 56 // When DevTools are opening in the inspect element mode, the first targ et comes in | 56 // When DevTools are opening in the inspect element mode, the first targ et comes in |
| 57 // much later than the InspectorFrontendAPI.enterInspectElementMode even t. | 57 // much later than the InspectorFrontendAPI.enterInspectElementMode even t. |
| 58 if (!this.enabled()) | 58 if (!this.enabled()) |
| 59 return; | 59 return; |
| 60 var domModel = WebInspector.DOMModel.fromTarget(target); | 60 var domModel = WebInspector.DOMModel.fromTarget(target); |
| 61 domModel.setInspectModeEnabled(true, WebInspector.moduleSetting("showUAS hadowDOM").get()); | 61 domModel.setInspectMode(WebInspector.moduleSetting("showUAShadowDOM").ge t() ? DOMAgent.InspectMode.SearchForUAShadowDOM : DOMAgent.InspectMode.SearchFor Normal); |
| 62 }, | 62 }, |
| 63 | 63 |
| 64 /** | 64 /** |
| 65 * @override | 65 * @override |
| 66 * @param {!WebInspector.Target} target | 66 * @param {!WebInspector.Target} target |
| 67 */ | 67 */ |
| 68 targetRemoved: function(target) | 68 targetRemoved: function(target) |
| 69 { | 69 { |
| 70 }, | 70 }, |
| 71 | 71 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 82 if (this.enabled()) | 82 if (this.enabled()) |
| 83 this._toggleSearch(); | 83 this._toggleSearch(); |
| 84 }, | 84 }, |
| 85 | 85 |
| 86 _toggleSearch: function() | 86 _toggleSearch: function() |
| 87 { | 87 { |
| 88 var enabled = !this.enabled(); | 88 var enabled = !this.enabled(); |
| 89 this._toggleSearchButton.setToggled(enabled); | 89 this._toggleSearchButton.setToggled(enabled); |
| 90 | 90 |
| 91 for (var domModel of WebInspector.DOMModel.instances()) | 91 for (var domModel of WebInspector.DOMModel.instances()) |
| 92 domModel.setInspectModeEnabled(enabled, WebInspector.moduleSetting(" showUAShadowDOM").get()); | 92 domModel.setInspectMode(WebInspector.moduleSetting("showUAShadowDOM" ).get() ? DOMAgent.InspectMode.SearchForUAShadowDOM : DOMAgent.InspectMode.Searc hForNormal); |
|
dgozman
2015/08/29 01:36:40
Where is none?
sergeyv
2015/08/29 02:03:44
Done.
| |
| 93 }, | 93 }, |
| 94 | 94 |
| 95 _suspendStateChanged: function() | 95 _suspendStateChanged: function() |
| 96 { | 96 { |
| 97 if (WebInspector.targetManager.allTargetsSuspended()) | 97 if (WebInspector.targetManager.allTargetsSuspended()) |
| 98 this._toggleSearchButton.setToggled(false); | 98 this._toggleSearchButton.setToggled(false); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 /** | 102 /** |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 { | 138 { |
| 139 if (!WebInspector.inspectElementModeController) | 139 if (!WebInspector.inspectElementModeController) |
| 140 return null; | 140 return null; |
| 141 | 141 |
| 142 return WebInspector.inspectElementModeController._toggleSearchButton; | 142 return WebInspector.inspectElementModeController._toggleSearchButton; |
| 143 } | 143 } |
| 144 } | 144 } |
| 145 | 145 |
| 146 /** @type {?WebInspector.InspectElementModeController} */ | 146 /** @type {?WebInspector.InspectElementModeController} */ |
| 147 WebInspector.inspectElementModeController = null; | 147 WebInspector.inspectElementModeController = null; |
| OLD | NEW |