Closed Bug 1555849 Opened 5 years ago Closed 5 years ago

[webvtt] use `computeLine` to adjust cue's position when `snap-to-lines` is false

Categories

(Core :: Audio/Video: Playback, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox-esr68 --- fixed
firefox69 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

According to the spec 7.2.6 [1], we should use computed line, not computed position.

[1] https://www.w3.org/TR/webvtt1/#ref-for-cue-computed-line-2

As the video is 300*150, testing file would put the cue on the place which is 20% of video's height (30px) below.

The font size is defined as 5% of video's height (7.5px).

As the cue is left alignment, so we also have to set left=0.

In addition, there is no need to add padding.

Bugbug thinks this bug is a task, but please change it back in case of error.

Type: defect → task
Blocks: 1534888
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8370f6e80cc8
part1 : use 'computeLine' to adjust cue's position when 'snap-to-lines' is false. r=heycam
https://hg.mozilla.org/integration/autoland/rev/04d4b4a547da
part2 : enable wpt 'track-webvtt-non-snap-to-lines.html'. r=heycam
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17331 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Regressions: 1559599

Comment on attachment 9068873 [details]
Bug 1555849 - part1 : use 'computeLine' to adjust cue's position when 'snap-to-lines' is false.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is a request from a confidential partner, because this issue affects the visual arrangement of subtitles.
  • User impact if declined: Subtitles would be placed in the wrong place.
  • Fix Landed on Version: 69
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It only affects the final position of subtitles, to replace a value with another correct property while calculating the position.
  • String or UUID changes made by this patch: No
Attachment #9068873 - Flags: approval-mozilla-esr68?

Comment on attachment 9068873 [details]
Bug 1555849 - part1 : use 'computeLine' to adjust cue's position when 'snap-to-lines' is false.

Fixes a webvtt bug with a partner site. Approved for 68.1esr.

Attachment #9068873 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: