[webkit-reviews] review granted: [Bug 179042] Web Inspector: add contextmenu item to arbitrarily add HTML/Child to DOMTree : [Attachment 326013] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 3 22:19:53 PDT 2017


Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<webkit at devinrousso.com>'s request for review:
Bug 179042: Web Inspector: add contextmenu item to arbitrarily add HTML/Child
to DOMTree
https://bugs.webkit.org/show_bug.cgi?id=179042

Attachment 326013: Patch

https://bugs.webkit.org/attachment.cgi?id=326013&action=review




--- Comment #7 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 326013
  --> https://bugs.webkit.org/attachment.cgi?id=326013
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=326013&action=review

Nice!

> Source/WebInspectorUI/UserInterface/Models/DOMNode.js:515
> +	       DOMAgent.markUndoableState();
> +	       object.callFunction(inspectedPage_node_insertAdjacentHTML,
[position, html]);
> +	       object.release();

All of the other cases seem to set the undoable state AFTER applying the
change. So I think this should be:

    object.callFunction(inspectedPage_node_insertAdjacentHTML, [position,
html], () => {
	DOMAgent.markUndoableState();
	object.release();
    });

What do you think?


More information about the webkit-reviews mailing list