Title: [157947] trunk/Source/WebInspectorUI
- Revision
- 157947
- Author
- [email protected]
- Date
- 2013-10-24 12:39:46 -0700 (Thu, 24 Oct 2013)
Log Message
Adjust the precision of byte strings in Web Inspector.
https://bugs.webkit.org/show_bug.cgi?id=123281
Reviewed by Joseph Pecoraro.
* UserInterface/Utilities.js:
(Number.bytesToString): More precision for MB and less precision for 10..1023 KB.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (157946 => 157947)
--- trunk/Source/WebInspectorUI/ChangeLog 2013-10-24 19:38:01 UTC (rev 157946)
+++ trunk/Source/WebInspectorUI/ChangeLog 2013-10-24 19:39:46 UTC (rev 157947)
@@ -1,3 +1,14 @@
+2013-10-24 Timothy Hatcher <[email protected]>
+
+ Adjust the precision of byte strings in Web Inspector.
+
+ https://bugs.webkit.org/show_bug.cgi?id=123281
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Utilities.js:
+ (Number.bytesToString): More precision for MB and less precision for 10..1023 KB.
+
2013-10-24 Alexandru Chiculita <[email protected]>
Web Inspector: Add a way to test the Manager and model classes
Modified: trunk/Source/WebInspectorUI/UserInterface/Utilities.js (157946 => 157947)
--- trunk/Source/WebInspectorUI/UserInterface/Utilities.js 2013-10-24 19:38:01 UTC (rev 157946)
+++ trunk/Source/WebInspectorUI/UserInterface/Utilities.js 2013-10-24 19:39:46 UTC (rev 157947)
@@ -936,16 +936,16 @@
return WebInspector.UIString("%.0f B").format(bytes);
var kilobytes = bytes / 1024;
- if (higherResolution && kilobytes < 1024)
+ if (higherResolution || kilobytes < 10)
return WebInspector.UIString("%.2f KB").format(kilobytes);
else if (kilobytes < 1024)
- return WebInspector.UIString("%.0f KB").format(kilobytes);
+ return WebInspector.UIString("%.1f KB").format(kilobytes);
var megabytes = kilobytes / 1024;
- if (higherResolution)
+ if (higherResolution || megabytes < 10)
return WebInspector.UIString("%.2f MB").format(megabytes);
else
- return WebInspector.UIString("%.0f MB").format(megabytes);
+ return WebInspector.UIString("%.1f MB").format(megabytes);
}
});
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes