RESOLVED FIXED 78123
Web Inspector: toggle Edit as HTML on F2, drag nodes up / down upon Ctrl(Cmd) Up / Down.
https://bugs.webkit.org/show_bug.cgi?id=78123
Summary Web Inspector: toggle Edit as HTML on F2, drag nodes up / down upon Ctrl(Cmd)...
Pavel Feldman
Reported 2012-02-08 09:36:35 PST
It almost allows working with DOM using keyboard only.
Attachments
Patch (15.61 KB, patch)
2012-02-08 09:38 PST, Pavel Feldman
yurys: review+
Pavel Feldman
Comment 1 2012-02-08 09:38:53 PST
Alexander Pavlov (apavlov)
Comment 2 2012-02-09 01:26:57 PST
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?
Yury Semikhatsky
Comment 3 2012-02-09 03:16:35 PST
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?
Pavel Feldman
Comment 4 2012-02-09 04:05:42 PST
(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.
Pavel Feldman
Comment 5 2012-02-09 04:20:01 PST
(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.
Pavel Feldman
Comment 6 2012-02-09 04:24:46 PST
Note You need to log in before you can comment on or make changes to this bug.