Commit b4456ac
committed
Web Inspector: remove trailing ".0" for timestamps
https://bugs.webkit.org/show_bug.cgi?id=191122
rdar://problem/166500013
Reviewed by Devin Rousso.
Strip trailing zeros from integer duration values to improve readability.
For example, "1.00ms" now displays as "1ms".
This is achieved by adding `trailingZeroDisplay: "stripIfInteger"` to the
`toLocaleString` options in `String.standardFormatters`, which handles
this in a locale-aware manner.
* LayoutTests/inspector/unit-tests/number-utilities.html:
* Source/WebInspectorUI/UserInterface/Base/Utilities.js:
(value.f):
* Source/WebInspectorUI/UserInterface/Views/FontDetailsPanel.js:
(WI.FontDetailsPanel.prototype._formatAxisValueAsString):
* Source/WebInspectorUI/UserInterface/Views/FontVariationDetailsSectionRow.js:
(WI.FontVariationDetailsSectionRow.prototype._formatAxisValueAsString):
Canonical link: https://commits.webkit.org/304851@main1 parent 9f3fa4f commit b4456ac
File tree
4 files changed
+8
-5
lines changed- LayoutTests/inspector/unit-tests
- Source/WebInspectorUI/UserInterface
- Base
- Views
4 files changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1158 | 1158 | | |
1159 | 1159 | | |
1160 | 1160 | | |
1161 | | - | |
| 1161 | + | |
| 1162 | + | |
1162 | 1163 | | |
1163 | 1164 | | |
1164 | 1165 | | |
| |||
1321 | 1322 | | |
1322 | 1323 | | |
1323 | 1324 | | |
1324 | | - | |
| 1325 | + | |
1325 | 1326 | | |
1326 | 1327 | | |
1327 | 1328 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
0 commit comments