Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Issue 2803243002: Use a ResizeObserver to determine default font-size for text tracks (Closed)

Created:
3 years, 8 months ago by fs
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-layout_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, eric.carlson_apple.com, feature-media-reviews_chromium.org, fs, gasubic, jchaffraix+rendering, leviw+renderwatch, mlamouri+watch-blink_chromium.org, pdr+renderingwatchlist_chromium.org, nessy, Srirama, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -158 lines) Patch
M third_party/WebKit/LayoutTests/media/track/track-cue-rendering.html View 1 2 chunks +19 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/track/TextTrackContainer.h View 1 2 2 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/track/TextTrackContainer.cpp View 1 2 1 chunk +78 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
D third_party/WebKit/Source/core/layout/LayoutTextTrackContainer.h View 1 2 1 chunk +0 lines, -53 lines 0 comments Download
D third_party/WebKit/Source/core/layout/LayoutTextTrackContainer.cpp View 1 2 1 chunk +0 lines, -78 lines 0 comments Download

Messages

Total messages: 28 (20 generated)
fs
3 years, 8 months ago (2017-04-07 15:25:20 UTC) #9
mlamouri (slow - plz ping)
Very excited to see ResizeObserver being used like that :) FWIW, the media controls code ...
3 years, 8 months ago (2017-04-08 12:57:57 UTC) #13
atotic
lgtm great to see ResizeObserver used. Need to ship it to webdevs soon.
3 years, 8 months ago (2017-04-09 05:08:08 UTC) #14
fs
https://codereview.chromium.org/2803243002/diff/20001/third_party/WebKit/Source/core/html/track/TextTrackContainer.cpp File third_party/WebKit/Source/core/html/track/TextTrackContainer.cpp (right): https://codereview.chromium.org/2803243002/diff/20001/third_party/WebKit/Source/core/html/track/TextTrackContainer.cpp#newcode65 third_party/WebKit/Source/core/html/track/TextTrackContainer.cpp:65: } On 2017/04/08 at 12:57:57, mlamouri wrote: > style: ...
3 years, 8 months ago (2017-04-10 13:36:27 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2803243002/40001
3 years, 8 months ago (2017-04-10 15:40:03 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/8b2491697f386b054dd28549f0c66d717f020d0d
3 years, 8 months ago (2017-04-10 15:52:05 UTC) #25
dglazkov
lgtm
3 years, 8 months ago (2017-04-10 15:54:40 UTC) #27
yosin_UTC9
3 years, 8 months ago (2017-04-11 05:56:51 UTC) #28
Message was sent while issue was closed.
On 2017/04/10 at 13:36:27, fs wrote:
>
https://codereview.chromium.org/2803243002/diff/20001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/html/track/TextTrackContainer.cpp (right):
> 
>
https://codereview.chromium.org/2803243002/diff/20001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/html/track/TextTrackContainer.cpp:65: }
> On 2017/04/08 at 12:57:57, mlamouri wrote:
> > style: leave empty line before end of namespace and add a end of namespace
comment (// anonymous namespace).
> 
> Done.

I really appreciate for you fixing this!
This issue blocked making editing fast.
You did it! (^_^)b

Powered by Google App Engine
This is Rietveld 408576698