| Index: Source/devtools/front_end/ElementsTreeOutline.js
|
| diff --git a/Source/devtools/front_end/ElementsTreeOutline.js b/Source/devtools/front_end/ElementsTreeOutline.js
|
| index ea406b3ebeb62d90ad8eee0f4d8255248c9e9d69..b1da8b756647993992d08150d90ee4606086bf9d 100644
|
| --- a/Source/devtools/front_end/ElementsTreeOutline.js
|
| +++ b/Source/devtools/front_end/ElementsTreeOutline.js
|
| @@ -1335,7 +1335,6 @@ WebInspector.ElementsTreeElement.prototype = {
|
| this._populateForcedPseudoStateItems(pseudoSubMenu);
|
| contextMenu.appendSeparator();
|
| }
|
| -
|
| this._populateNodeContextMenu(contextMenu);
|
| this.treeOutline._populateContextMenu(contextMenu, this._node);
|
| this._populateScrollIntoView(contextMenu);
|
| @@ -1373,6 +1372,10 @@ WebInspector.ElementsTreeElement.prototype = {
|
| var openTagElement = this.treeOutline.getCachedTreeElement(this.representedObject) || this;
|
| contextMenu.appendItem(WebInspector.UIString("Edit as HTML"), openTagElement._editAsHTML.bind(openTagElement));
|
| contextMenu.appendItem(WebInspector.UIString("Copy as HTML"), this._copyHTML.bind(this));
|
| +
|
| + // Place it here so that all "Copy"-ing items stick together.
|
| + if (this.representedObject.nodeType() === Node.ELEMENT_NODE)
|
| + contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Copy CSS path" : "Copy CSS Path"), this._copyCSSPath.bind(this));
|
| contextMenu.appendItem(WebInspector.UIString("Copy XPath"), this._copyXPath.bind(this));
|
| 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));
|
| @@ -2196,9 +2199,14 @@ WebInspector.ElementsTreeElement.prototype = {
|
| this._node.copyNode();
|
| },
|
|
|
| + _copyCSSPath: function()
|
| + {
|
| + InspectorFrontendHost.copyText(WebInspector.DOMPresentationUtils.cssPath(this._node, true));
|
| + },
|
| +
|
| _copyXPath: function()
|
| {
|
| - this._node.copyXPath(true);
|
| + InspectorFrontendHost.copyText(WebInspector.DOMPresentationUtils.xPath(this._node, true));
|
| },
|
|
|
| _inspectDOMProperties: function()
|
|
|