[webkit-reviews] review granted: [Bug 208364] REGRESSION(r257380): Web Inspector: deleting node causes TreeOutline to lose focus : [Attachment 393520] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 16 15:47:48 PDT 2020


Devin Rousso <drousso at apple.com> has granted Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 208364: REGRESSION(r257380): Web Inspector: deleting node causes
TreeOutline to lose focus
https://bugs.webkit.org/show_bug.cgi?id=208364

Attachment 393520: Patch

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




--- Comment #7 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 393520
  --> https://bugs.webkit.org/attachment.cgi?id=393520
Patch

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

r=me, nice fix.

> Source/WebInspectorUI/UserInterface/Views/TreeElement.js:528
> +	   else if (this.treeOutline?.element.contains(document.activeElement))
{

It's unnecessary to `?.element` because we know that `this.treeOutline` is
truthy because of the early return at the beginning of this function.

Also, I'd be fine if you moved the `let treeOutline = this.treeOutline;` to the
beginning of this function so that we don't have to continue referencing it via
`this.treeOutline`.


More information about the webkit-reviews mailing list