[webkit-reviews] review granted: [Bug 194300] Web Inspector: Elements tab: selection is broken after deleting the selected node : [Attachment 361235] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 5 16:33:49 PST 2019


Devin Rousso <drousso at apple.com> has granted Matt Baker <mattbaker at apple.com>'s
request for review:
Bug 194300: Web Inspector: Elements tab: selection is broken after deleting the
selected node
https://bugs.webkit.org/show_bug.cgi?id=194300

Attachment 361235: Patch

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




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

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

rs=me

> Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:1096
> +		   let child = elements.pop();

Rather than pop, perhaps you can just keep an index and traverse the array with
the index (instead of checking `elements.length`, you could check `index <
elements.length`).  My gut is telling me we should avoid modifying the array as
much as possible (lots of `length` churn).


More information about the webkit-reviews mailing list