[webvtt] Enable wpt '2_cues_overlapping_completely_move_up.html' and '2_cues_overlapping_partially_move_up.html'
Categories
(Core :: Audio/Video: Playback, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: alwu, Assigned: alwu)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
After landing bug1488673 and modify the wrong part of these wpt, we could enable them.
Assignee | ||
Comment 1•6 years ago
•
|
||
Bug 1534888 - enable wpt '2_cues_overlapping_completely_move_up.html' and '2_cues_overlapping_partially_move_up.html'.
According to the spec [1], the line alignment
of the cue is start
by default, which means the top side of the box should align to the position.
In this case, the cues in 2_cues_overlapping_completely_move_up.vtt
and 2_cues_overlapping_partially_move_up.html
are set to line position 50%
which means the top side of the first cue box should be align to the 50% of the height of video.
The second cue are set to 50%
and 49%
in two files, which would overlap with the first cue. According to the spec [2], we should keep their relative position, and move the box to the place where no boxes are overlapped. Therefore, we should move the second cue up from the top side of the first cue by the font size (9px).
Therefore, in the reference file, the first cue should not have the margin-top
offset, and the second cue should have margin-top=9px
.
[1] https://w3c.github.io/webvtt/#webvtt-cue-line-alignment
[2] https://w3c.github.io/webvtt/#ref-for-webvtt-cue-snap-to-lines-flag-13
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
Here I have some questions, in the wpt test, we usually use font-family
to define multiple fonts [1], which are Ahem
and sans-serif
.
However, when I runs the tests, sometime I would see the the sans-serif
applying on the text, and sometime I would see the Ahem
applyiing on the text. Why we would have such difference? What causes this differences?
In addition, when we use the sans-serif
, the offsetHeight of div
and cueDiv
[2] which are in the CueStyleBox
would be the same. But they were different when we apply Ahem
on the text....
Hi, Cameron,
Do you have any idea about these problems?
Thank you!
Assignee | ||
Comment 3•6 years ago
|
||
We've known that the inner box's size is not always equal to the outer box's size, and we now use the first line box's size to adjust cue's position after landing bug1536762. So no matter what fonts we're using, we are able to find the correct bounding box size to adjust cues' position.
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
For 2_cues_overlapping_partially_move_up.html
, now I have to find a way to extend the distance between first cue and second cue, because the spece between them should be 1.8px (1% of the video height) wider than the normal distance we have between lines.
Updated•5 years ago
|
Assignee | ||
Comment 5•5 years ago
|
||
In 2_cues_overlapping_partially_move_up.vtt
, the second cue was put on the 99% place where the second cue is 1%
higher than the first cue, and then we would move the second cue up by a line box height in order to prevent those two cues overlapping.
Therefore, in the reference files, the second cue should be 1%(of 180px) higher than its original place.
Assignee | ||
Comment 6•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5242587b6db4
https://hg.mozilla.org/mozilla-central/rev/c789b732dde8
https://hg.mozilla.org/mozilla-central/rev/56997ade68ef
Description
•