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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/InspectElementModeController.js

Issue 2421983002: [DevTools] Remove layout editor experiment. (Closed)
Patch Set: rebased Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/elements/InspectElementModeController.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/InspectElementModeController.js b/third_party/WebKit/Source/devtools/front_end/elements/InspectElementModeController.js
index 719033be136af031e5a0302b41c1814e32f459aa..7f49d4ddea7f7305521cade4af07691be42ef68f 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/InspectElementModeController.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/InspectElementModeController.js
@@ -32,12 +32,6 @@
Elements.InspectElementModeController = class {
constructor() {
this._toggleSearchAction = UI.actionRegistry.action('elements.toggle-element-search');
- if (Runtime.experiments.isEnabled('layoutEditor')) {
- this._layoutEditorButton =
- new UI.ToolbarToggle(Common.UIString('Toggle Layout Editor'), 'largeicon-layout-editor');
- this._layoutEditorButton.addEventListener('click', this._toggleLayoutEditor, this);
- }
-
this._mode = Protocol.DOM.InspectMode.None;
SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChanged, this._suspendStateChanged, this);
SDK.targetManager.observeTargets(this, SDK.Target.Capability.DOM);
@@ -71,23 +65,11 @@ Elements.InspectElementModeController = class {
this._mode === Protocol.DOM.InspectMode.SearchForUAShadowDOM;
}
- /**
- * @return {boolean}
- */
- isInLayoutEditorMode() {
- return this._mode === Protocol.DOM.InspectMode.ShowLayoutEditor;
- }
-
stopInspection() {
if (this._mode && this._mode !== Protocol.DOM.InspectMode.None)
this._toggleInspectMode();
}
- _toggleLayoutEditor() {
- var mode = this.isInLayoutEditorMode() ? Protocol.DOM.InspectMode.None : Protocol.DOM.InspectMode.ShowLayoutEditor;
- this._setMode(mode);
- }
-
_toggleInspectMode() {
if (SDK.targetManager.allTargetsSuspended())
return;
@@ -110,13 +92,6 @@ Elements.InspectElementModeController = class {
this._mode = mode;
for (var domModel of SDK.DOMModel.instances())
domModel.setInspectMode(mode);
-
- if (this._layoutEditorButton) {
- this._layoutEditorButton.setEnabled(!this.isInInspectElementMode());
- this._layoutEditorButton.setToggled(this.isInLayoutEditorMode());
- }
-
- this._toggleSearchAction.setEnabled(!this.isInLayoutEditorMode());
this._toggleSearchAction.setToggled(this.isInInspectElementMode());
}
@@ -126,8 +101,6 @@ Elements.InspectElementModeController = class {
this._mode = Protocol.DOM.InspectMode.None;
this._toggleSearchAction.setToggled(false);
- if (this._layoutEditorButton)
- this._layoutEditorButton.setToggled(false);
}
};
@@ -150,23 +123,6 @@ Elements.InspectElementModeController.ToggleSearchActionDelegate = class {
}
};
-/**
- * @implements {UI.ToolbarItem.Provider}
- * @unrestricted
- */
-Elements.InspectElementModeController.LayoutEditorButtonProvider = class {
- /**
- * @override
- * @return {?UI.ToolbarItem}
- */
- item() {
- if (!Elements.inspectElementModeController)
- return null;
-
- return Elements.inspectElementModeController._layoutEditorButton;
- }
-};
-
/** @type {?Elements.InspectElementModeController} */
Elements.inspectElementModeController =
Runtime.queryParam('isSharedWorker') ? null : new Elements.InspectElementModeController();

Powered by Google App Engine
This is Rietveld 408576698