Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (259367 => 259368)
--- trunk/Source/WebInspectorUI/ChangeLog 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/ChangeLog 2020-04-01 22:50:16 UTC (rev 259368)
@@ -1,3 +1,26 @@
+2020-04-01 Nikita Vasilyev <nvasil...@apple.com>
+
+ Web Inspector: Use ECMAScript Numeric Separators for numbers with 5 or more digits
+ https://bugs.webkit.org/show_bug.cgi?id=209879
+
+ Reviewed by Joseph Pecoraro.
+
+ Instead of `1000000` write `1_000_000` so it's easier to read.
+
+ * UserInterface/Base/Utilities.js:
+ * UserInterface/Controllers/_javascript_LogViewController.js:
+ * UserInterface/Controllers/TimelineManager.js:
+ * UserInterface/Models/Gradient.js:
+ (WI.Gradient.prototype.stringFromStops):
+ * UserInterface/Models/HeapAllocationsInstrument.js:
+ (WI.HeapAllocationsInstrument.prototype.startInstrumentation):
+ * UserInterface/Protocol/Connection.js:
+ (InspectorBackend.Connection.prototype._dispatchResponse):
+ * UserInterface/Views/Layers3DContentView.js:
+ (WI.Layers3DContentView.prototype.initialLayout):
+ * UserInterface/Views/NetworkTableContentView.js:
+ (WI.NetworkTableContentView.prototype._updateLoadTimeStatistic):
+
2020-03-31 Jon Davis <j...@apple.com>
Added new WebSocket icon
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -1348,13 +1348,13 @@
if (num < 1000)
return num.toLocaleString();
- if (num < 1000000)
+ if (num < 1_000_000)
return WI.UIString("%.1fK").format(Math.round(num / 100) / 10);
- if (num < 1000000000)
- return WI.UIString("%.1fM").format(Math.round(num / 100000) / 10);
+ if (num < 1_000_000_000)
+ return WI.UIString("%.1fM").format(Math.round(num / 100_000) / 10);
- return WI.UIString("%.1fB").format(Math.round(num / 100000000) / 10);
+ return WI.UIString("%.1fB").format(Math.round(num / 100_000_000) / 10);
}
});
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/_javascript_LogViewController.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -362,5 +362,5 @@
}
};
-WI._javascript_LogViewController.CachedPropertiesDuration = 30000;
+WI._javascript_LogViewController.CachedPropertiesDuration = 30_000;
WI._javascript_LogViewController.IgnoredRepeatCount = Symbol("ignored-repeat-count");
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -1440,6 +1440,6 @@
RecordingImported: "timeline-manager-recording-imported",
};
-WI.TimelineManager.MaximumAutoRecordDuration = 90000; // 90 seconds
-WI.TimelineManager.MaximumAutoRecordDurationAfterLoadEvent = 10000; // 10 seconds
-WI.TimelineManager.DeadTimeRequiredToStopAutoRecordingEarly = 2000; // 2 seconds
+WI.TimelineManager.MaximumAutoRecordDuration = 90_000; // 90 seconds
+WI.TimelineManager.MaximumAutoRecordDurationAfterLoadEvent = 10_000; // 10 seconds
+WI.TimelineManager.DeadTimeRequiredToStopAutoRecordingEarly = 2_000; // 2 seconds
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Gradient.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -142,7 +142,7 @@
return stops.map(function(stop, index) {
var str = stop.color;
if (stop.offset !== index / count)
- str += " " + Math.round(stop.offset * 10000) / 100 + "%";
+ str += " " + Math.round(stop.offset * 10_000) / 100 + "%";
return str;
}).join(", ");
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsInstrument.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsInstrument.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/HeapAllocationsInstrument.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -60,7 +60,7 @@
}
// Periodic snapshots.
- const snapshotInterval = 10000;
+ const snapshotInterval = 10_000;
this._snapshotIntervalIdentifier = setInterval(this._takeHeapSnapshot.bind(this), snapshotInterval);
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -102,7 +102,7 @@
{
console.assert(this._pendingResponses.size >= 0);
- if (messageObject.error && messageObject.error.code !== -32000)
+ if (messageObject.error && messageObject.error.code !== -32_000)
console.error("Request with id = " + messageObject["id"] + " failed. " + JSON.stringify(messageObject.error));
let sequenceId = messageObject["id"];
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -163,7 +163,7 @@
window.matchMedia("(prefers-color-scheme: dark)").addListener(updateBackground);
updateBackground();
- this._camera = new THREE.PerspectiveCamera(45, this.element.offsetWidth / this.element.offsetHeight, 1, 100000);
+ this._camera = new THREE.PerspectiveCamera(45, this.element.offsetWidth / this.element.offsetHeight, 1, 100_000);
this._controls = new THREE.OrbitControls(this._camera, this._renderer.domElement);
this._controls.enableDamping = true;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js (259367 => 259368)
--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2020-04-01 22:32:39 UTC (rev 259367)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js 2020-04-01 22:50:16 UTC (rev 259368)
@@ -2167,12 +2167,12 @@
let duration = Date.now() - loadTimeStatistic.start;
let delay = loadTimeStatistic.delay;
- if (duration >= 1000) // 1 second
+ if (duration >= 1_000) // 1 second
delay = 100;
- else if (duration >= 60000) // 60 seconds
- delay = 1000;
- else if (duration >= 3600000) // 1 minute
- delay = 10000;
+ else if (duration >= 60_000) // 60 seconds
+ delay = 1_000;
+ else if (duration >= 3_600_000) // 1 minute
+ delay = 10_000;
if (delay !== loadTimeStatistic.delay) {
loadTimeStatistic.delay = delay;
@@ -2189,7 +2189,7 @@
loadTimeStatistic.container.hidden = !this._isShowingMainCollection();
if (isNaN(mainFrameStartTime) || isNaN(mainFrameLoadEventTime)) {
- this._updateStatistic("load-time", WI.UIString("Loading for %s"), Number.secondsToString(duration / 1000));
+ this._updateStatistic("load-time", WI.UIString("Loading for %s"), Number.secondsToString(duration / 1_000));
return;
}