summaryrefslogtreecommitdiffstats
path: root/dom/media/webvtt/test/mochitest/vttPositionAlign.vtt
blob: 7613f4e7c510ed136a505b01a49ac789ee358daa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
WEBVTT

00:00.000 --> 00:00.500
Cue 0 : PositionAlign should be "auto".

00:00.700 --> 00:00.800 position:50%,line-left
Cue 1 : PositionAlign should be "line-left".

00:00.700 --> 00:00.800 position:50%,center
Cue 2 : PositionAlign should be "center".

00:00.700 --> 00:00.800 position:50%,line-right
Cue 3 : PositionAlign should be "line-right".

00:00.700 --> 00:00.800 position:50%,auto
Cue 4 : PositionAlign should be "auto"

00:00.700 --> 00:00.800 position:50%,auto align:left
Cue 5 : PositionAlign should be "auto", but computedPositionAlign should be "line-left".

00:00.700 --> 00:00.800 position:50%,auto align:right
Cue 6 : PositionAlign should be "auto", but computedPositionAlign should be "line-right".

00:00.700 --> 00:00.800 position:50%,auto align:middle
Cue 7 : PositionAlign should be "auto", but computedPositionAlign should be "center".

NOTE ### These following cues are set with `align:start` ###

00:00.700 --> 00:00.800 align:start
LTR character in the beginning and align is "start", so computedPositionAlign should be "line-left".

00:00.700 --> 00:00.800 align:start
שלום RTL character in the beginning and align is "start", so computedPositionAlign should be "line-right".

00:00.700 --> 00:00.800 align:start
@ neutral charater in the beginning, but the first strong charater is LTR in "align:start". So computedPositionAlign should be "line-left".

00:00.700 --> 00:00.800 align:start
@ש neutral charater in the beginning, but the first strong charater is RTL in "align:start". So computedPositionAlign should be "line-right".

NOTE
This line contains only neutral charater, we would treat its base direction as
LTR. However, if there are other following lines contains non-neutral
charaters, we would detemine the base direction by the following line.

00:00.700 --> 00:00.800 align:start
@

00:00.700 --> 00:00.800 align:start
@
The second line starts with LTR charater, computedPositionAlign should be "line-left".

00:00.700 --> 00:00.800 align:start
@
שThe second line starts with RTL charater, computedPositionAlign should be "line-right".

NOTE ### These following cues are set with `align:end` ###

00:00.700 --> 00:00.800 align:end
LTR character in the beginning and align is "end", so computedPositionAlign should be "line-right".

00:00.700 --> 00:00.800 align:end
ש RTL character in the beginning and align is "end", so computedPositionAlign should be "line-left".

00:00.700 --> 00:00.800 align:end
@ neutral charater in the beginning, but the first strong charater is LTR in "align:end". So computedPositionAlign should be "line-right".

00:00.700 --> 00:00.800 align:end
@ש neutral charater in the beginning, but the first strong charater is RTL in "align:end". So computedPositionAlign should be "line-left".

NOTE
This line contains only neutral charater, we would treat its base direction as
LTR. However, if there are other following lines contains non-neutral
charaters, we would detemine the base direction by the following line.

00:00.700 --> 00:00.800 align:end
@

00:00.700 --> 00:00.800 align:end
@
The second line starts with LTR charater, computedPositionAlign should be "line-right".

00:00.700 --> 00:00.800 align:end
@
שThe second line starts with RTL charater, computedPositionAlign should be "line-left".