Issue metadata
Sign in to add a comment
|
VTTCue.snapToLines: used correctly? (VTT Captions using the Position attribute don't render in the correct horizontal position)
Reported by
seanpjen...@gmail.com,
Oct 4 2016
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 Example URL: Steps to reproduce the problem: 1. Using the attached vtt file, watch a video with captions turned on. 2. For seconds 0-4, the captions will show text every 10% across the position attribute, with text aligned to start. 3. 5-9 use text aligned to middle 4. 10-14 use text aligned to end. What is the expected behavior? No matter what the align: setting is, the position attribute should be laying out correctly across the video window. The align end seems closest to what I expect start/middle to be, just offsetting based on the text alignment. What went wrong? When align:center is set and position is 60%, the caption appears left of where the 50% position is. When align:left is set, the positions under 30% appear to be scaled in to a curve. Did this work before? No Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? Yes Chrome version: 53.0.2785.143 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 23.0 r0
,
Oct 6 2016
,
Oct 6 2016
Confirmed. Seems to be related to using line percentages. For instance, with the original testvtt_position.vtt modified to use numeric lines (not percentages) for align:start, then no curve was observed. (modified vtt attached).
,
Oct 6 2016
Note, one alternative "working" page we had looked at (from johnpallet@): http://ronallo.com/demos/webvtt-cue-settings/ does *not* set the line position as a percentage. If you simulate that by entering the following into devtools console when that page is loaded: document.querySelector('video').textTracks[0].cues[0].snapToLines = false; and then slide the "cue settings position" slider on the page left and right, you'll see some interesting behavior. Further, continue switching snapToLines true and false and sliding that position appears to incrementally corrupt the position. It appears that something in the non-snapToLines positioning is incorrect, if not also snapToLines (either in spec or impl, or both). This bug tracks figuring at least that out now :) Note, either pixel layout test(s) or unit test(s) would be good to add to verify broken, and eventually fixed VTTCue display parameter calculations in the context of !snapToLines, and also when alternating values of snapToLines.
,
Oct 6 2016
I think this existing FIXME in LayoutVTTCue, for when !VTTCue.snapToLine, might be the root of the problem: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/LayoutVTTCue.cpp?sq=package:chromium&rcl=1475767319&l=285
,
Oct 7 2016
I suspect what we're seeing here is https://w3c.github.io/webvtt/#apply-webvtt-cue-settings (primarily steps 2 - 5) and the interaction with 'size' (which looks like it's 100% in all these cases.) The FIXME in LayoutVTTCue is unrelated (that would be substep 4 of the snap-to-lines=false case of step 11), the code to compute the initial positions is in VTTCue::calculateDisplayParameters.
,
Oct 7 2016
,
Oct 7 2016
Forgot to mention: We also have a TODO in VTTCueBox::applyCSSProperties, which is somewhat related to this. We still implement the old align behavior for non-snap-to-lines cues. I wonder if that might be what gives rise to the "curve behavior".
,
Sep 14 2017
,
Nov 8 2017
This issue is fixed with below patch https://chromium-review.googlesource.com/c/chromium/src/+/753102
,
Dec 21 2017
Resolving per c#10.
,
Dec 21 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by seanpjen...@gmail.com
, Oct 4 2016