Web Inspector: provide options to WI.cssPath for more verbosity
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2018 23:06:23 +0000 (23:06 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2018 23:06:23 +0000 (23:06 +0000)
commit813fa871368031a715509770bfe2a128af09f15c
tree36b90691dd78cca79b4015cdc8d09dbfc2f1494d
parent5386756507b4de7db251d40a6ee3b065a09967f7
Web Inspector: provide options to WI.cssPath for more verbosity
https://bugs.webkit.org/show_bug.cgi?id=190987

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Base/DOMUtilities.js:
(WI.cssPath):
(WI.cssPathComponent):
When the option `full` is true, print every attribute along with every node in the hierarchy
until the root is reached. This partially duplicates the effect of an XPath, but instead
uses CSS selectors, making it much more human readable and recognizable.

LayoutTests:

* inspector/dom/domutilities-csspath.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/dom/domutilities-csspath.html
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/DOMUtilities.js