Changeset 240866 in webkit


Ignore:
Timestamp:
Feb 1, 2019 1:24:09 PM (5 years ago)
Author:
Joseph Pecoraro
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.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r240865 r240866  
     12019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Timeline time range selection should show duration alongside start and end
     4        https://bugs.webkit.org/show_bug.cgi?id=194109
     5        <rdar://problem/47714279>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * Localizations/en.lproj/localizedStrings.js:
     10        * UserInterface/Views/TimelineRecordingContentView.js:
     11        (WI.TimelineRecordingContentView.prototype._updateTimeRangePathComponents):
     12        Include the duration when not obvious.
     13
    1142019-02-01  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r240741 r240866  
    5555localizedStrings["%s Result"] = "%s Result";
    5656localizedStrings["%s \u2013 %s"] = "%s \u2013 %s";
     57localizedStrings["%s \u2013 %s (%s)"] = "%s \u2013 %s (%s)";
    5758localizedStrings["%s \u2014 %s"] = "%s \u2014 %s";
    5859localizedStrings["%s cannot be modified"] = "%s cannot be modified";
  • trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js

    r237195 r240866  
    730730        let displayName;
    731731        if (this._timelineOverview.viewMode === WI.TimelineOverview.ViewMode.Timelines) {
    732             let selectionStart = Number.secondsToString(startValue, true);
    733             let selectionEnd = Number.secondsToString(endValue, true);
    734             displayName = WI.UIString("%s \u2013 %s").format(selectionStart, selectionEnd);
     732            const higherResolution = true;
     733            let selectionStart = Number.secondsToString(startValue, higherResolution);
     734            let selectionEnd = Number.secondsToString(endValue, higherResolution);
     735            const epsilon = 0.0001;
     736            if (startValue < epsilon)
     737                displayName = WI.UIString("%s \u2013 %s").format(selectionStart, selectionEnd);
     738            else {
     739                let duration = Number.secondsToString(endValue - startValue, higherResolution);
     740                displayName = WI.UIString("%s \u2013 %s (%s)").format(selectionStart, selectionEnd, duration);
     741            }
    735742        } else {
    736743            startValue += 1; // Convert index to frame number.
Note: See TracChangeset for help on using the changeset viewer.