It almost allows working with DOM using keyboard only.
Created attachment 126102 [details] Patch
Comment on attachment 126102 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=126102&action=review > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:509 > + if (event.keyIdentifier === "Up" && node.previousSibling && node.parentNode) { You could move the node.parentNode check one level above. > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:1727 > + if (!this.representedObject.parentNode || this.representedObject.parentNode.nodeType() == Node.DOCUMENT_NODE) === ? > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:1763 > + if (initialValue != value) !== ? > LayoutTests/inspector/elements/undo-dom-edits-expected.txt:56 > + + <div id="node-to-edit-as-html">â¦</div> Should the node change its expanded state after the HTML-wise editing?
Comment on attachment 126102 [details] Patch + if (event.keyIdentifier === "Down" && node.nextSibling && node.parentNode) { + node.moveTo(node.parentNode, node.nextSibling.nextSibling, this._selectNodeAfterEdit.bind(this, null, treeElement.expanded)); Will it work fine if node.nextSibling.nextSibling === null?
(In reply to comment #3) > (From update of attachment 126102 [details]) > + if (event.keyIdentifier === "Down" && node.nextSibling && node.parentNode) { > + node.moveTo(node.parentNode, node.nextSibling.nextSibling, this._selectNodeAfterEdit.bind(this, null, treeElement.expanded)); > > Will it work fine if node.nextSibling.nextSibling === null? Yes.
(In reply to comment #2) > (From update of attachment 126102 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=126102&action=review > > > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:509 > > + if (event.keyIdentifier === "Up" && node.previousSibling && node.parentNode) { > > You could move the node.parentNode check one level above. > Done. > > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:1727 > > + if (!this.representedObject.parentNode || this.representedObject.parentNode.nodeType() == Node.DOCUMENT_NODE) > > === ? Done. > > > Source/WebCore/inspector/front-end/ElementsTreeOutline.js:1763 > > + if (initialValue != value) > > !== ? > Done. > > LayoutTests/inspector/elements/undo-dom-edits-expected.txt:56 > > + + <div id="node-to-edit-as-html">â¦</div> > > Should the node change its expanded state after the HTML-wise editing? Good point. It will be expanded, but it happends asynchronously. That's why the expectations are looking this way. Let me see if I can improve it.
Committed r107217: <http://trac.webkit.org/changeset/107217>