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

Unified Diff: Source/devtools/front_end/elements/ElementsPanel.js

Issue 1343293005: Devtools: Fix frontend part of LayoutEditor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/elements/ElementsPanel.js
diff --git a/Source/devtools/front_end/elements/ElementsPanel.js b/Source/devtools/front_end/elements/ElementsPanel.js
index 3bc557c848dc16323894a4ada3320b58d62c83a9..ec441b655cc4a2c9b7769fbedb334fb0fc5b7f60 100644
--- a/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/Source/devtools/front_end/elements/ElementsPanel.js
@@ -50,7 +50,6 @@ WebInspector.ElementsPanel = function()
this._contentElement = createElement("div");
var crumbsContainer = createElement("div");
- this._showLayoutEditor = false;
if (Runtime.experiments.isEnabled("materialDesign"))
this._initializeActionsToolbar();
stackElement.appendChild(this._contentElement);
@@ -934,14 +933,15 @@ WebInspector.ElementsPanel.prototype = {
*/
revealAndSelectNode: function(node)
{
- if (WebInspector.inspectElementModeController && WebInspector.inspectElementModeController.started())
- WebInspector.inspectElementModeController.stop();
+ if (WebInspector.inspectElementModeController && WebInspector.inspectElementModeController.isInInspectElementMode())
+ WebInspector.inspectElementModeController.stopInspection();
this._omitDefaultSelection = true;
- WebInspector.inspectorView.setCurrentPanel(this, this._showLayoutEditor);
+ var showLayoutEditor = !!WebInspector.inspectElementModeController && WebInspector.inspectElementModeController.isInLayoutEditorMode();
+ WebInspector.inspectorView.setCurrentPanel(this, showLayoutEditor);
node = WebInspector.moduleSetting("showUAShadowDOM").get() ? node : this._leaveUserAgentShadowDOM(node);
- if (!this._showLayoutEditor)
+ if (!showLayoutEditor)
node.highlightForTwoSeconds();
this.selectDOMNode(node, true);
@@ -1324,3 +1324,4 @@ WebInspector.ElementsPanel.HiddenMarkerDecorator.prototype = {
return { color: "#555", title: WebInspector.UIString("Element is hidden") };
}
}
+

Powered by Google App Engine
This is Rietveld 408576698