WebKit Bugzilla
Attachment 373280 Details for
Bug 193841
: REGRESSION (r238563): Web Inspector: Selection is erratic when holding Up/Down on Network Table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193841-20190701170330.patch (text/plain), 2.83 KB, created by
Matt Baker
on 2019-07-01 17:03:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2019-07-01 17:03:31 PDT
Size:
2.83 KB
patch
obsolete
>Subversion Revision: 247016 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 70ac1bbfdbf6b62cfc548b107a8a577ceda082ec..f47d088b5bb25655a1404001bb242ab3c29919ce 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,22 @@ >+2019-07-01 Matt Baker <mattbaker@apple.com> >+ >+ REGRESSION (r238563): Web Inspector: Selection is erratic when holding Up/Down on Network Table >+ https://bugs.webkit.org/show_bug.cgi?id=193841 >+ <rdar://problem/47559124> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Selecting and revealing a row after reload Table data, but before the >+ layout that populates visible rows, could cause the Table to always be >+ scrolled so that the revealed row is first. >+ >+ This patch fixes `revealRow` by calculating the position of the row being >+ revealed, even in the absence of its DOM element, so that the Table is >+ only scrolled when necessary. >+ >+ * UserInterface/Views/Table.js: >+ (WI.Table.prototype.revealRow): >+ > 2019-06-29 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Remove trailing white-space >diff --git a/Source/WebInspectorUI/UserInterface/Views/Table.js b/Source/WebInspectorUI/UserInterface/Views/Table.js >index e44a7c26182ec6c36f6af4919aa315cc04814d6c..7101b04cf7341fe082d7ca9ce27bbd69707a63be 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/Table.js >+++ b/Source/WebInspectorUI/UserInterface/Views/Table.js >@@ -365,19 +365,17 @@ WI.Table = class Table extends WI.View > if (rowIndex < 0 || rowIndex >= this.numberOfRows) > return; > >- // Force our own scroll update because we may have scrolled. >- this._cachedScrollTop = NaN; >+ if (isNaN(this._cachedScrollTop)) >+ this._cachedScrollTop = this._scrollContainerElement.scrollTop; > >- if (this._isRowVisible(rowIndex)) { >- let row = this._cachedRows.get(rowIndex); >- console.assert(row, "Visible rows should always be in the cache."); >- if (row) >- row.scrollIntoViewIfNeeded(false); >- this.needsLayout(); >- } else { >- this._scrollContainerElement.scrollTop = rowIndex * this._rowHeight; >- this.updateLayout(); >- } >+ if (isNaN(this._cachedHeight)) >+ this._cachedHeight = Math.floor(this._scrollContainerElement.getBoundingClientRect().height); >+ >+ let rowPosition = rowIndex * this._rowHeight; >+ if (rowPosition + this._rowHeight < this._cachedScrollTop) >+ this._scrollContainerElement.scrollTop = rowPosition; >+ else if (rowPosition > this._cachedScrollTop + this._cachedHeight) >+ this._scrollContainerElement.scrollTop = this._cachedScrollTop + this._cachedHeight - this._rowHeight; > } > > columnWithIdentifier(identifier)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193841
:
373091
|
373185
|
373280
|
373285
|
373291
|
373292
|
373326