WebKit Bugzilla
Attachment 373285 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-20190701173222.patch (text/plain), 2.52 KB, created by
Matt Baker
on 2019-07-01 17:32:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2019-07-01 17:32:23 PDT
Size:
2.52 KB
patch
obsolete
>Subversion Revision: 247016 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 70ac1bbfdbf6b62cfc548b107a8a577ceda082ec..810af480ca1d48e00205607b07f5b5ad0a559a17 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 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..c5e4519fcf2e7990cb0a68eddddf2695722d1e2c 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/Table.js >+++ b/Source/WebInspectorUI/UserInterface/Views/Table.js >@@ -375,8 +375,21 @@ WI.Table = class Table extends WI.View > 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 containerScrollTop = this._scrollContainerElement.scrollTop; >+ let rowPosition = rowIndex * this._rowHeight; >+ let scrollTop = NaN; >+ if (rowPosition + this._rowHeight < containerScrollTop) >+ scrollTop = rowPosition; >+ else if (rowPosition > containerScrollTop + this._cachedHeight) >+ scrollTop = containerScrollTop + this._cachedHeight - this._rowHeight; >+ >+ if (!isNaN(scrollTop)) { >+ this._scrollContainerElement.scrollTop = scrollTop; >+ this.updateLayout(); >+ } > } > } >
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