Changeset 203920 in webkit
- Timestamp:
- Jul 29, 2016 1:43:42 PM (8 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r203912 r203920 1 2016-07-29 Matt Baker <mattbaker@apple.com> 2 3 Web Inspector: Inactive/active network bar segments overlap when latency is zero 4 https://bugs.webkit.org/show_bug.cgi?id=160147 5 <rdar://problem/27516007> 6 7 Reviewed by Joseph Pecoraro. 8 9 TimelineRecordBar should hide the inactive segment when its duration 10 is less than the minimum displayable size. The active segment can 11 assume the whole width of the bar. 12 13 * UserInterface/Views/TimelineOverviewGraph.js: 14 (WebInspector.TimelineOverviewGraph.prototype.get secondsPerPixel): 15 Make secondsPerPixel available during TimelineRecordBars.refresh. 16 17 * UserInterface/Views/TimelineRecordBar.js: 18 (WebInspector.TimelineRecordBar.prototype.refresh): 19 Check inactive duration against the minimum display size, 20 and add/remove DOM nodes and bar styles as needed. 21 1 22 2016-07-29 Nikita Vasilyev <nvasilyev@apple.com> 2 23 -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverviewGraph.js
r200767 r203920 149 149 } 150 150 151 get secondsPerPixel() { return this._timelineOverview.secondsPerPixel; } 152 151 153 get visible() 152 154 { -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordBar.js
r201231 r203920 226 226 refresh(graphDataSource) 227 227 { 228 console.assert(graphDataSource.zeroTime); 229 console.assert(graphDataSource.startTime); 230 console.assert(graphDataSource.currentTime); 231 console.assert(graphDataSource.endTime); 232 console.assert(graphDataSource.secondsPerPixel); 233 228 234 if (!this._records || !this._records.length) 229 235 return false; … … 304 310 if (inactiveUnfinished) 305 311 barActiveStartTime = graphCurrentTime; 306 307 var middlePercentage = (barActiveStartTime - barStartTime) / barDuration; 308 309 if (this._renderMode !== WebInspector.TimelineRecordBar.RenderMode.ActiveOnly) { 312 else if (this._renderMode === WebInspector.TimelineRecordBar.RenderMode.Normal) { 313 // Hide the inactive segment when its duration is less than the minimum displayable size. 314 let minimumSegmentDuration = graphDataSource.secondsPerPixel * WebInspector.TimelineRecordBar.MinimumWidthPixels; 315 if (barActiveStartTime - barStartTime < minimumSegmentDuration) { 316 barActiveStartTime = barStartTime; 317 if (this._inactiveBarElement) 318 this._inactiveBarElement.remove(); 319 } 320 } 321 322 let showInactiveSegment = barActiveStartTime > barStartTime; 323 this._element.classList.toggle("has-inactive-segment", showInactiveSegment); 324 325 let middlePercentage = (barActiveStartTime - barStartTime) / barDuration; 326 if (showInactiveSegment && this._renderMode !== WebInspector.TimelineRecordBar.RenderMode.ActiveOnly) { 310 327 if (!this._inactiveBarElement) { 311 328 this._inactiveBarElement = document.createElement("div");
Note: See TracChangeset
for help on using the changeset viewer.