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

Unified Diff: Source/devtools/front_end/ElementsTreeOutline.js

Issue 27204002: Implement copy css path in elements panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Removing duplicate code. Created 7 years, 2 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/ElementsTreeOutline.js
diff --git a/Source/devtools/front_end/ElementsTreeOutline.js b/Source/devtools/front_end/ElementsTreeOutline.js
index 58688aca540a08fb718b3d6f828d81ff25ad7d5b..29d6c3f64272ead22ad05927f6a4f996eea9bd67 100644
--- a/Source/devtools/front_end/ElementsTreeOutline.js
+++ b/Source/devtools/front_end/ElementsTreeOutline.js
@@ -1178,7 +1178,7 @@ WebInspector.ElementsTreeElement.prototype = {
{
TreeElement.prototype.expandRecursively.call(this, Number.MAX_VALUE);
}
-
+
this._node.getSubtree(-1, callback.bind(this));
},
@@ -1345,7 +1345,7 @@ WebInspector.ElementsTreeElement.prototype = {
_populateScrollIntoView: function(contextMenu)
{
contextMenu.appendSeparator();
- contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Scroll into view" : "Scroll into View"), this._scrollIntoView.bind(this));
+ contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Scroll into view" : "Scroll into View"), this._scrollIntoView.bind(this));
},
_populateForcedPseudoStateItems: function(subMenu)
@@ -1372,6 +1372,7 @@ WebInspector.ElementsTreeElement.prototype = {
contextMenu.appendItem(WebInspector.UIString("Edit as HTML"), openTagElement._editAsHTML.bind(openTagElement));
contextMenu.appendItem(WebInspector.UIString("Copy as HTML"), this._copyHTML.bind(this));
contextMenu.appendItem(WebInspector.UIString("Copy XPath"), this._copyXPath.bind(this));
+ contextMenu.appendItem(WebInspector.UIString("Copy CSS Path"), this._copyCSSPath.bind(this));
apavlov 2013/10/15 07:55:11 This should go into _populateTagContextMenu(). Cop
contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Delete node" : "Delete Node"), this.remove.bind(this));
contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Inspect DOM properties" : "Inspect DOM Properties"), this._inspectDOMProperties.bind(this));
},
@@ -1469,7 +1470,7 @@ WebInspector.ElementsTreeElement.prototype = {
removeZeroWidthSpaceRecursive(attribute);
var config = new WebInspector.EditingConfig(this._attributeEditingCommitted.bind(this), this._editingCancelled.bind(this), attributeName);
-
+
function handleKeyDownEvents(event)
{
var isMetaOrCtrl = WebInspector.isMac() ?
@@ -2184,6 +2185,11 @@ WebInspector.ElementsTreeElement.prototype = {
this._node.copyNode();
},
+ _copyCSSPath: function()
+ {
+ this._node.copyCSSPath();
+ },
+
_copyXPath: function()
{
this._node.copyXPath(true);
@@ -2247,7 +2253,7 @@ WebInspector.ElementsTreeElement.prototype = {
if (object)
object.callFunction(scrollIntoView);
}
-
+
WebInspector.RemoteObject.resolveNode(this._node, "", scrollIntoViewCallback);
},
« Source/devtools/front_end/DOMAgent.js ('K') | « Source/devtools/front_end/DOMAgent.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698