Changeset 196284 in webkit
- Timestamp:
- Feb 8, 2016 5:50:08 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r196283 r196284 1 2016-02-08 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Zooming in on the timeline graph does not increase its time resolution from minutes 4 https://bugs.webkit.org/show_bug.cgi?id=154013 5 <rdar://problem/23844527> 6 7 Reviewed by Brian Burg. 8 9 * inspector/unit-tests/number-utilities-expected.txt: Added. 10 * inspector/unit-tests/number-utilities.html: Added. 11 Basic tests for our Number utilities methods. 12 1 13 2016-02-08 Daniel Bates <dabates@apple.com> 2 14 -
trunk/Source/WebInspectorUI/ChangeLog
r196275 r196284 1 2016-02-08 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Zooming in on the timeline graph does not increase its time resolution from minutes 4 https://bugs.webkit.org/show_bug.cgi?id=154013 5 <rdar://problem/23844527> 6 7 Reviewed by Brian Burg. 8 9 * UserInterface/Base/Utilities.js: 10 (Number.secondsToString): 11 Simplify logic and ensure that when under high resolution we 12 don't go above seconds for our units. 13 14 (Number.bytesToString): 15 Simplify logic. 16 17 * UserInterface/Views/LinearTimelineOverview.js: 18 (WebInspector.LinearTimelineOverview): 19 Reduce the rather large maximum seconds per pixel from 60 seconds 20 per pixel to 2 seconds per pixel. This means when the user zooms 21 out of a timeline they don't see such large time values. 22 1 23 2016-02-08 Joseph Pecoraro <pecoraro@apple.com> 2 24 -
trunk/Source/WebInspectorUI/UserInterface/Base/Utilities.js
r196275 r196284 873 873 value: function(seconds, higherResolution) 874 874 { 875 varms = seconds * 1000;876 877 if ( higherResolution && Math.abs(ms) < 10)878 return WebInspector.UIString("%.3fms").format(ms);879 else if (Math.abs(ms) < 10)875 let ms = seconds * 1000; 876 877 if (Math.abs(ms) < 10) { 878 if (higherResolution) 879 return WebInspector.UIString("%.3fms").format(ms); 880 880 return WebInspector.UIString("%.2fms").format(ms); 881 882 if (higherResolution && Math.abs(ms) < 100) 883 return WebInspector.UIString("%.2fms").format(ms); 884 else if (Math.abs(ms) < 100) 881 } 882 883 if (Math.abs(ms) < 100) { 884 if (higherResolution) 885 return WebInspector.UIString("%.2fms").format(ms); 885 886 return WebInspector.UIString("%.1fms").format(ms); 886 887 if (higherResolution && Math.abs(ms) < 1000) 888 return WebInspector.UIString("%.1fms").format(ms); 889 else if (Math.abs(ms) < 1000) 887 } 888 889 if (Math.abs(ms) < 1000) { 890 if (higherResolution) 891 return WebInspector.UIString("%.1fms").format(ms); 890 892 return WebInspector.UIString("%.0fms").format(ms); 891 892 if (Math.abs(seconds) < 60) 893 } 894 895 // Do not go over seconds when in high resolution mode. 896 if (higherResolution || Math.abs(seconds) < 60) 893 897 return WebInspector.UIString("%.2fs").format(seconds); 894 898 895 varminutes = seconds / 60;899 let minutes = seconds / 60; 896 900 if (Math.abs(minutes) < 60) 897 901 return WebInspector.UIString("%.1fmin").format(minutes); 898 902 899 varhours = minutes / 60;903 let hours = minutes / 60; 900 904 if (Math.abs(hours) < 24) 901 905 return WebInspector.UIString("%.1fhrs").format(hours); 902 906 903 vardays = hours / 24;907 let days = hours / 24; 904 908 return WebInspector.UIString("%.1f days").format(days); 905 909 } … … 916 920 return WebInspector.UIString("%.0f B").format(bytes); 917 921 918 varkilobytes = bytes / 1024;919 if (Math.abs(kilobytes) < 10 || (higherResolution && Math.abs(kilobytes) < 1024))920 return WebInspector.UIString("%.2f KB").format(kilobytes);921 else if (Math.abs(kilobytes) < 1024)922 let kilobytes = bytes / 1024; 923 if (Math.abs(kilobytes) < 1024) { 924 if (higherResolution || Math.abs(kilobytes) < 10) 925 return WebInspector.UIString("%.2f KB").format(kilobytes); 922 926 return WebInspector.UIString("%.1f KB").format(kilobytes); 923 924 var megabytes = kilobytes / 1024; 927 } 928 929 let megabytes = kilobytes / 1024; 925 930 if (higherResolution || Math.abs(megabytes) < 10) 926 931 return WebInspector.UIString("%.2f MB").format(megabytes); 927 else 928 return WebInspector.UIString("%.1f MB").format(megabytes); 932 return WebInspector.UIString("%.1f MB").format(megabytes); 929 933 } 930 934 }); -
trunk/Source/WebInspectorUI/UserInterface/Views/LinearTimelineOverview.js
r187689 r196284 34 34 }; 35 35 36 super("linear", timelineRecording, 0.0001, 60, defaultSettingsValues);36 super("linear", timelineRecording, 0.0001, 2, defaultSettingsValues); 37 37 } 38 38
Note: See TracChangeset
for help on using the changeset viewer.