[webkit-reviews] review granted: [Bug 198951] Web Inspector: Network: detail view shouldn't stay open when the related entry is removed : [Attachment 372320] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 18 11:52:25 PDT 2019


Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 198951: Web Inspector: Network: detail view shouldn't stay open when the
related entry is removed
https://bugs.webkit.org/show_bug.cgi?id=198951

Attachment 372320: Patch

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




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

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

Good catch! r-me

> Source/WebInspectorUI/UserInterface/Views/Table.js:285
> -	   for (let rowIndex = this._visibleRowIndexStart; rowIndex <
this._visibleRowIndexEnd; ++rowIndex) {
> +	   let numberOfRows = this.numberOfRows;
> +	   for (let rowIndex = this._visibleRowIndexStart; rowIndex <
Math.min(this._visibleRowIndexEnd, numberOfRows); ++rowIndex) {

You should be able to move the `Math.min` calculation out of the loop so it is
only performed once:

    let endIndex = Math.min(this._visibleRowIndexEnd, this.numberOfRows);


More information about the webkit-reviews mailing list