Changeset 252199 in webkit
- Timestamp:
- Nov 7, 2019 12:02:22 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r252198 r252199 1 2019-11-07 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Timelines: add a marker for when a stop was requested 4 https://bugs.webkit.org/show_bug.cgi?id=203935 5 6 Reviewed by Timothy Hatcher. 7 8 After r244195, the Web Inspector frontend doesn't stop updating the current time marker 9 until after it receives all of the corresponding `*.trackingComplete` events. This means 10 that sometimes, the current time marker can move far past the time at which the stop was 11 requested, such as if there's a blocking script. 12 13 We should indicate where the stop was requested, as that is often right after a particular 14 issue is reproduced during a timeline recording, rather than have the user try to figure out 15 where they stopped. 16 17 Only keep a marker for the last stop request, and hide the marker once capturing resumes. 18 19 It's still useful to have the current time marker continue updating, as we should show all 20 the information we have about captured things, such as blocking scripts. 21 22 * UserInterface/Views/TimelineOverview.js: 23 (WI.TimelineOverview): 24 (WI.TimelineOverview.prototype._handleTimelineCapturingStateChanged): 25 26 * UserInterface/Models/TimelineMarker.js: 27 * UserInterface/Views/TimelineRuler.js: 28 (WI.TimelineRuler.prototype.addMarker): 29 * UserInterface/Views/TimelineRuler.css: 30 (.timeline-ruler > .markers > .marker.stopping-time): Added. 31 (.timeline-ruler > .markers > .marker.current-time): 32 (.timeline-ruler > .markers > .marker:matches(.stopping-time, .current-time)::after): Added. 33 (@media (prefers-color-scheme: dark) .timeline-ruler > .markers > .marker.stopping-time): Added. 34 (.timeline-ruler > .markers > .marker.current-time::after): Deleted. 35 Make the current time marker always on top (`z-index`). 36 37 * Localizations/en.lproj/localizedStrings.js: 38 1 39 2019-11-07 Devin Rousso <drousso@apple.com> 2 40 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r252063 r252199 884 884 localizedStrings["Recording Timeline Data"] = "Recording Timeline Data"; 885 885 localizedStrings["Recording Warning: %s"] = "Recording Warning: %s"; 886 localizedStrings["Recording stop requested \u2014 %s"] = "Recording stop requested \u2014 %s"; 886 887 localizedStrings["Recordings"] = "Recordings"; 887 888 localizedStrings["Redirect Response"] = "Redirect Response"; -
trunk/Source/WebInspectorUI/UserInterface/Models/TimelineMarker.js
r243024 r252199 84 84 85 85 WI.TimelineMarker.Type = { 86 StoppingTime: "stopping-time", 86 87 CurrentTime: "current-time", 87 88 LoadEvent: "load-event", -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js
r245498 r252199 86 86 this.addSubview(this._timelineRuler); 87 87 88 this._stoppingTimeMarker = null; 88 89 this._currentTimeMarker = new WI.TimelineMarker(0, WI.TimelineMarker.Type.CurrentTime); 89 90 this._timelineRuler.addMarker(this._currentTimeMarker); … … 1030 1031 { 1031 1032 switch (WI.timelineManager.capturingState) { 1033 case WI.TimelineManager.CapturingState.Starting: 1034 if (this._stoppingTimeMarker) 1035 this._stoppingTimeMarker.time = -1; // Hide the marker when capturing resumes. 1036 break; 1037 1032 1038 case WI.TimelineManager.CapturingState.Active: 1033 1039 this._editInstrumentsButton.enabled = false; 1034 1040 this._stopEditingInstruments(); 1041 break; 1042 1043 case WI.TimelineManager.CapturingState.Stopping: 1044 if (!this._stoppingTimeMarker) { 1045 this._stoppingTimeMarker = new WI.TimelineMarker(this._currentTime, WI.TimelineMarker.Type.StoppingTime); 1046 this._timelineRuler.addMarker(this._stoppingTimeMarker); 1047 } else 1048 this._stoppingTimeMarker.time = this._currentTime; 1035 1049 break; 1036 1050 -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.css
r242194 r252199 173 173 } 174 174 175 .timeline-ruler > .markers > .marker.stopping-time { 176 color: hsl(0, 0%, 75%); 177 } 178 175 179 .timeline-ruler > .markers > .marker.current-time { 180 z-index: 1; 176 181 color: red; 177 182 } 178 183 179 .timeline-ruler > .markers > .marker .current-time::after {184 .timeline-ruler > .markers > .marker:matches(.stopping-time, .current-time)::after { 180 185 top: var(--timeline-ruler-marker-after-offset); 181 186 width: var(--timeline-ruler-marker-after-size); … … 288 293 289 294 @media (prefers-color-scheme: dark) { 295 .timeline-ruler > .markers > .marker.stopping-time { 296 color: lightgrey; 297 } 298 290 299 .timeline-ruler > .markers > .marker.dom-content-event { 291 300 color: hsl(240, 100%, 70%); -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js
r242567 r252199 349 349 350 350 switch (marker.type) { 351 case WI.TimelineMarker.Type.StoppingTime: 352 markerElement.title = WI.UIString("Recording stop requested \u2014 %s").format(Number.secondsToString(markerTime)); 353 break; 351 354 case WI.TimelineMarker.Type.LoadEvent: 352 355 markerElement.title = WI.UIString("Load \u2014 %s").format(Number.secondsToString(markerTime));
Note: See TracChangeset
for help on using the changeset viewer.