[webkit-reviews] review denied: [Bug 195793] Web Inspector: DOM: "Capture Screenshot" should only be shown if the node is attached : [Attachment 364777] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 18 15:37:33 PDT 2019


Joseph Pecoraro <joepeck at webkit.org> has denied Devin Rousso
<drousso at apple.com>'s request for review:
Bug 195793: Web Inspector: DOM: "Capture Screenshot" should only be shown if
the node is attached
https://bugs.webkit.org/show_bug.cgi?id=195793

Attachment 364777: Patch

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




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

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

> Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js:239
> -    if (window.PageAgent) {
> +    if (window.PageAgent && domNode.ownerDocument) {

This feels wrong.

Every Node should be associated with a document:

    document.createElement("div").ownerDocument; // => #document

We may want to update our interface, as it doesn't make sense that a detached
node doesn't have an ownerDocument...

It might be good to have an isAttached() method that resolves this state.


More information about the webkit-reviews mailing list