RESOLVED FIXED77619
Web Inspector: Introduce "Copy XPath" popup menu item for DOM elements
https://bugs.webkit.org/show_bug.cgi?id=77619
Summary Web Inspector: Introduce "Copy XPath" popup menu item for DOM elements
Alexander Pavlov (apavlov)
Reported 2012-02-02 02:11:36 PST
Patch to follow
Attachments
Patch (12.09 KB, patch)
2012-02-02 08:02 PST, Alexander Pavlov (apavlov)
no flags
Patch (12.13 KB, patch)
2012-02-03 08:19 PST, Alexander Pavlov (apavlov)
vsevik: review+
Alexander Pavlov (apavlov)
Comment 1 2012-02-02 08:02:33 PST
Vsevolod Vlasov
Comment 2 2012-02-03 08:04:09 PST
Comment on attachment 125134 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=125134&action=review > Source/WebCore/inspector/front-end/DOMAgent.js:539 > + xPathValue: function(optimized) Should be private as well as _xPathIndex()? > Source/WebCore/inspector/front-end/DOMAgent.js:549 > + return new WebInspector.DOMNode.XPathStep("//*[@id=\"" + this.getAttribute("id") + "\"]", true); double space between new and WebInspector. > Source/WebCore/inspector/front-end/DOMAgent.js:580 > + * @return -1 in case of error, 0 if no siblings matching the same expression, <XPath index among the same expression-matching sibling nodes> otherwise. Please add type annotation here and move description to a separate comment inside function. > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:1710 > + this.representedObject.copyXPath(true); Please add this argument to copyXPath() method, r- for that.
Alexander Pavlov (apavlov)
Comment 3 2012-02-03 08:19:17 PST
Vsevolod Vlasov
Comment 4 2012-02-03 08:25:06 PST
Comment on attachment 125333 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=125333&action=review > Source/WebCore/inspector/front-end/DOMAgent.js:300 > + copyXPath: function(optimized) Please add @param annotation for optimized. > Source/WebCore/inspector/front-end/DOMAgent.js:520 > + xPath: function(optimized) ditto > Source/WebCore/inspector/front-end/DOMAgent.js:544 > + _xPathValue: function(optimized) ditto
Alexander Pavlov (apavlov)
Comment 5 2012-02-03 08:43:44 PST
Note You need to log in before you can comment on or make changes to this bug.