| Index: Source/devtools/front_end/components/InspectElementModeController.js
|
| diff --git a/Source/devtools/front_end/components/InspectElementModeController.js b/Source/devtools/front_end/components/InspectElementModeController.js
|
| index 87ef22f29ca9906747d771339adc647aae8ef8f3..4c953cdd56d1315f62f3c12cd45f72a3d5db6d89 100644
|
| --- a/Source/devtools/front_end/components/InspectElementModeController.js
|
| +++ b/Source/devtools/front_end/components/InspectElementModeController.js
|
| @@ -55,10 +55,10 @@ WebInspector.InspectElementModeController.prototype = {
|
| {
|
| // When DevTools are opening in the inspect element mode, the first target comes in
|
| // much later than the InspectorFrontendAPI.enterInspectElementMode event.
|
| - if (!this.enabled())
|
| + if (!this.started())
|
| return;
|
| var domModel = WebInspector.DOMModel.fromTarget(target);
|
| - domModel.setInspectModeEnabled(true, WebInspector.moduleSetting("showUAShadowDOM").get());
|
| + domModel.setInspectModeEnabled(true, WebInspector.moduleSetting("showUAShadowDOM").get() ? "showUAShadowDOM" : null);
|
| },
|
|
|
| /**
|
| @@ -72,24 +72,35 @@ WebInspector.InspectElementModeController.prototype = {
|
| /**
|
| * @return {boolean}
|
| */
|
| - enabled: function()
|
| + started: function()
|
| {
|
| return this._toggleSearchButton.toggled();
|
| },
|
|
|
| - disable: function()
|
| + stop: function()
|
| {
|
| - if (this.enabled())
|
| + if (this.started())
|
| this._toggleSearch();
|
| },
|
|
|
| + disable: function()
|
| + {
|
| + this.stop();
|
| + this._toggleSearchButton.setEnabled(false);
|
| + },
|
| +
|
| + enable: function()
|
| + {
|
| + this._toggleSearchButton.setEnabled(true);
|
| + },
|
| +
|
| _toggleSearch: function()
|
| {
|
| - var enabled = !this.enabled();
|
| + var enabled = !this.started();
|
| this._toggleSearchButton.setToggled(enabled);
|
|
|
| for (var domModel of WebInspector.DOMModel.instances())
|
| - domModel.setInspectModeEnabled(enabled, WebInspector.moduleSetting("showUAShadowDOM").get());
|
| + domModel.setInspectModeEnabled(enabled, WebInspector.moduleSetting("showUAShadowDOM").get() ? "showUAShadowDOM" : null);
|
| },
|
|
|
| _suspendStateChanged: function()
|
|
|