Title: [275337] trunk/Source/WebInspectorUI
- Revision
- 275337
- Author
- pan...@apple.com
- Date
- 2021-03-31 19:02:47 -0700 (Wed, 31 Mar 2021)
Log Message
Web Inspector: Regression (r270134) Timeline recordings 2 and beyond do not show a timescale.
https://bugs.webkit.org/show_bug.cgi?id=222930
Reviewed by Devin Rousso.
When a new `TimelineOverview` is created, it calls `TimelineOverview.prototype._viewModeDidChange` inside the
constructor, which in turn called `updateLayout`. This was problematic in that a `TimelineRuler` would have
`sizeDidChange` invoked before it was attached to the DOM, which meant that there was no width to cache. Because
`sizeDidChange` is only invoked during the first layout and on resize events, the cached width is not updated
when the ruler is attached to the view hierarchy, having already performed an early initial layout.
This patch now checks if the `TimelineOverview` has performed its initial layout before updating the layout
inside `_viewModeDidChange`, which means that the initial layout on the child `TimelineRuler` will be done while
attached, thus producing a valid width value to cache.
* UserInterface/Views/TimelineOverview.js:
(WI.TimelineRuler.prototype._viewModeDidChange):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (275336 => 275337)
--- trunk/Source/WebInspectorUI/ChangeLog 2021-04-01 01:53:19 UTC (rev 275336)
+++ trunk/Source/WebInspectorUI/ChangeLog 2021-04-01 02:02:47 UTC (rev 275337)
@@ -1,3 +1,23 @@
+2021-03-31 Patrick Angle <pan...@apple.com>
+
+ Web Inspector: Regression (r270134) Timeline recordings 2 and beyond do not show a timescale.
+ https://bugs.webkit.org/show_bug.cgi?id=222930
+
+ Reviewed by Devin Rousso.
+
+ When a new `TimelineOverview` is created, it calls `TimelineOverview.prototype._viewModeDidChange` inside the
+ constructor, which in turn called `updateLayout`. This was problematic in that a `TimelineRuler` would have
+ `sizeDidChange` invoked before it was attached to the DOM, which meant that there was no width to cache. Because
+ `sizeDidChange` is only invoked during the first layout and on resize events, the cached width is not updated
+ when the ruler is attached to the view hierarchy, having already performed an early initial layout.
+
+ This patch now checks if the `TimelineOverview` has performed its initial layout before updating the layout
+ inside `_viewModeDidChange`, which means that the initial layout on the child `TimelineRuler` will be done while
+ attached, thus producing a valid width value to cache.
+
+ * UserInterface/Views/TimelineOverview.js:
+ (WI.TimelineRuler.prototype._viewModeDidChange):
+
2021-03-31 Nikita Vasilyev <nvasil...@apple.com>
Web Inspector: Autocomplete experimental CSS Color values (hwb, lch, lab, color-mix, color-contrast)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (275336 => 275337)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2021-04-01 01:53:19 UTC (rev 275336)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js 2021-04-01 02:02:47 UTC (rev 275337)
@@ -853,7 +853,8 @@
this.element.classList.toggle("frames", isRenderingFramesMode);
- this.updateLayout(WI.View.LayoutReason.Resize);
+ if (this.didInitialLayout)
+ this.updateLayout(WI.View.LayoutReason.Resize);
}
_createViewModeSettings(viewMode, minimumDurationPerPixel, maximumDurationPerPixel, durationPerPixel, selectionStartValue, selectionDuration)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes