Title: [280566] trunk/Source/WebInspectorUI
- Revision
- 280566
- Author
- nvasil...@apple.com
- Date
- 2021-08-02 15:54:05 -0700 (Mon, 02 Aug 2021)
Log Message
Web Inspector: Network: sorting of transfer size for failed requests is causing the ordering to change every layout
https://bugs.webkit.org/show_bug.cgi?id=228712
Reviewed by Devin Rousso.
* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype._generateSortComparator):
Don't change the item order when both values are NaN.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (280565 => 280566)
--- trunk/Source/WebInspectorUI/ChangeLog 2021-08-02 22:37:04 UTC (rev 280565)
+++ trunk/Source/WebInspectorUI/ChangeLog 2021-08-02 22:54:05 UTC (rev 280566)
@@ -1,3 +1,14 @@
+2021-08-02 Nikita Vasilyev <nvasil...@apple.com>
+
+ Web Inspector: Network: sorting of transfer size for failed requests is causing the ordering to change every layout
+ https://bugs.webkit.org/show_bug.cgi?id=228712
+
+ Reviewed by Devin Rousso.
+
+ * UserInterface/Views/NetworkTableContentView.js:
+ (WI.NetworkTableContentView.prototype._generateSortComparator):
+ Don't change the item order when both values are NaN.
+
2021-07-26 Qiaosong Zhou <qiaosong_z...@apple.com>
FormDataEvent added.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js (280565 => 280566)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2021-08-02 22:37:04 UTC (rev 280565)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2021-08-02 22:54:05 UTC (rev 280566)
@@ -1034,9 +1034,12 @@
// Simple number.
comparator = (a, b) => {
let aValue = a[sortColumnIdentifier];
+ let bValue = b[sortColumnIdentifier];
+
+ if (isNaN(aValue) && isNaN(bValue))
+ return 0;
if (isNaN(aValue))
return 1;
- let bValue = b[sortColumnIdentifier];
if (isNaN(bValue))
return -1;
return aValue - bValue;
@@ -1059,6 +1062,9 @@
let transferSizeA = a.transferSize;
let transferSizeB = b.transferSize;
+ if (isNaN(transferSizeA) && isNaN(transferSizeB))
+ return 0;
+
// Treat NaN as the largest value.
if (isNaN(transferSizeA))
return 1;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes