Right now, in the web inspector, if you click an element's closing tag in the tree list, nothing happens. We should at least select or point to the opening tag for it, but it would be awesome if we did some kind of spiffy highlighting or something - maybe like XCode 3 does? http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeUserGuide/Contents/Resources/en.lproj/art/code_focus.jpg
I think jumping to the open tag would be good. We would need to not do this when arrowing through the tree.
<rdar://problem/5712871>
Bump. This specifically references Inspect > Elements. To reiterate, clicking on a closing tag should have the exact same behavior to clicking on the opening tag: highlight, get all applied CSS styles, DOM path…
Created attachment 51430 [details] [PATCH] Proposed solution The closing tag itself is selected when clicked/keyboard-traversed.
Created attachment 51524 [details] [PATCH] Merged conflicting changes
Created attachment 51630 [details] [PATCH] Fixed test failure
Comment on attachment 51630 [details] [PATCH] Fixed test failure As we agreed verbally, let us remove the singleOrPairedTreeElements method. It would simplify code a lot, while the only thing we would lose is highlighting closing tag as a part of search results.
Created attachment 51740 [details] [PATCH] Removed an odd method
Comment on attachment 51740 [details] [PATCH] Removed an odd method > +WebInspector.ElementsTreeElement = function(node, elementCloseTag) Please merge it carefully with Joe's changes. > { > - var hasChildrenOverride = node.hasChildNodes() && !this._showInlineText(node); > + this.elementCloseTag = elementCloseTag; Private? > - if (this._expandedChildrenLimit === x) > + if (this._expandedChildrenLimit === x || this.elementCloseTag) Why this change?
Code merged, comments addressed. Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog M LayoutTests/inspector/elements-panel-limited-children.html M WebCore/ChangeLog M WebCore/inspector/front-end/ElementsTreeOutline.js Committed r56727