Title: [240866] trunk/Source/WebInspectorUI
Revision
240866
Author
joep...@webkit.org
Date
2019-02-01 13:24:09 -0800 (Fri, 01 Feb 2019)

Log Message

Web Inspector: Timeline time range selection should show duration alongside start and end
https://bugs.webkit.org/show_bug.cgi?id=194109
<rdar://problem/47714279>

Reviewed by Devin Rousso.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
Include the duration when not obvious.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (240865 => 240866)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-02-01 21:23:51 UTC (rev 240865)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-02-01 21:24:09 UTC (rev 240866)
@@ -1,5 +1,18 @@
 2019-02-01  Joseph Pecoraro  <pecor...@apple.com>
 
+        Web Inspector: Timeline time range selection should show duration alongside start and end
+        https://bugs.webkit.org/show_bug.cgi?id=194109
+        <rdar://problem/47714279>
+
+        Reviewed by Devin Rousso.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Views/TimelineRecordingContentView.js:
+        (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
+        Include the duration when not obvious.
+
+2019-02-01  Joseph Pecoraro  <pecor...@apple.com>
+
         Web Inspector: Improve API and documentation of ColumnChart
         https://bugs.webkit.org/show_bug.cgi?id=193982
 

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (240865 => 240866)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-02-01 21:23:51 UTC (rev 240865)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-02-01 21:24:09 UTC (rev 240866)
@@ -54,6 +54,7 @@
 localizedStrings["%s Prototype"] = "%s Prototype";
 localizedStrings["%s Result"] = "%s Result";
 localizedStrings["%s \u2013 %s"] = "%s \u2013 %s";
+localizedStrings["%s \u2013 %s (%s)"] = "%s \u2013 %s (%s)";
 localizedStrings["%s \u2014 %s"] = "%s \u2014 %s";
 localizedStrings["%s cannot be modified"] = "%s cannot be modified";
 localizedStrings["%s delay"] = "%s delay";

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (240865 => 240866)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2019-02-01 21:23:51 UTC (rev 240865)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js	2019-02-01 21:24:09 UTC (rev 240866)
@@ -729,9 +729,16 @@
 
         let displayName;
         if (this._timelineOverview.viewMode === WI.TimelineOverview.ViewMode.Timelines) {
-            let selectionStart = Number.secondsToString(startValue, true);
-            let selectionEnd = Number.secondsToString(endValue, true);
-            displayName = WI.UIString("%s \u2013 %s").format(selectionStart, selectionEnd);
+            const higherResolution = true;
+            let selectionStart = Number.secondsToString(startValue, higherResolution);
+            let selectionEnd = Number.secondsToString(endValue, higherResolution);
+            const epsilon = 0.0001;
+            if (startValue < epsilon)
+                displayName = WI.UIString("%s \u2013 %s").format(selectionStart, selectionEnd);
+            else {
+                let duration = Number.secondsToString(endValue - startValue, higherResolution);
+                displayName = WI.UIString("%s \u2013 %s (%s)").format(selectionStart, selectionEnd, duration);
+            }
         } else {
             startValue += 1; // Convert index to frame number.
             if (startValue === endValue)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to