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

Unified Diff: third_party/WebKit/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: Reupload after merge 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: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
index 3bc557c848dc16323894a4ada3320b58d62c83a9..9f894f2b68ef36095d85db82bf4afa0d85804bef 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/third_party/WebKit/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);

Powered by Google App Engine
This is Rietveld 408576698