DescriptionUse a ResizeObserver to determine default font-size for text tracks
Text track needs to derive the default font for the cues from the size
of the <video> area, and currently does this by updating style during
the call to layout() on the LayoutTextTrackContainer, violating the
document lifecycle.
To avoid mutating style during layout, hook up a ResizeObserver from
TextTrackContainer to HTMLVideoElement and rely on the ResizeObserver
logic to iterate on the style and layout.
This eliminates the need to have a special LayoutObject for
TextTrackContainer, so just use a LayoutBlockFlow and remove all traces
of LayoutTextTrackContainer.
The media/track/track-cue-rendering.html test is updated to check sizes
after layout and paint instead of a forced layout.
BUG=372245
Review-Url: https://codereview.chromium.org/2803243002
Cr-Commit-Position: refs/heads/master@{#463280}
Committed: https://chromium.googlesource.com/chromium/src/+/8b2491697f386b054dd28549f0c66d717f020d0d
Patch Set 1 #Patch Set 2 : Update media/track/track-cue-rendering.html #
Total comments: 2
Patch Set 3 : Rebase #
Messages
Total messages: 28 (20 generated)
|