Changeset 275337 in webkit
- Timestamp:
- Mar 31, 2021 7:02:47 PM (16 months ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/TimelineOverview.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r275310 r275337 1 2021-03-31 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: Regression (r270134) Timeline recordings 2 and beyond do not show a timescale. 4 https://bugs.webkit.org/show_bug.cgi?id=222930 5 6 Reviewed by Devin Rousso. 7 8 When a new `TimelineOverview` is created, it calls `TimelineOverview.prototype._viewModeDidChange` inside the 9 constructor, which in turn called `updateLayout`. This was problematic in that a `TimelineRuler` would have 10 `sizeDidChange` invoked before it was attached to the DOM, which meant that there was no width to cache. Because 11 `sizeDidChange` is only invoked during the first layout and on resize events, the cached width is not updated 12 when the ruler is attached to the view hierarchy, having already performed an early initial layout. 13 14 This patch now checks if the `TimelineOverview` has performed its initial layout before updating the layout 15 inside `_viewModeDidChange`, which means that the initial layout on the child `TimelineRuler` will be done while 16 attached, thus producing a valid width value to cache. 17 18 * UserInterface/Views/TimelineOverview.js: 19 (WI.TimelineRuler.prototype._viewModeDidChange): 20 1 21 2021-03-31 Nikita Vasilyev <nvasilyev@apple.com> 2 22 -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js
r270134 r275337 854 854 this.element.classList.toggle("frames", isRenderingFramesMode); 855 855 856 this.updateLayout(WI.View.LayoutReason.Resize); 856 if (this.didInitialLayout) 857 this.updateLayout(WI.View.LayoutReason.Resize); 857 858 } 858 859
Note: See TracChangeset
for help on using the changeset viewer.