Skip to content

Commit 80b9b19

Browse files
authored
Add <br> to timing processing (#126)
1 parent 09ffb6b commit 80b9b19

File tree

165 files changed

+13163
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+13163
-261
lines changed

src/main/js/doc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,7 @@
10421042

10431043
Br.prototype.initFromNode = function (doc, parent, node, errorHandler) {
10441044
LayoutElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);
1045+
TimedElement.prototype.initFromNode.call(this, doc, parent, node, errorHandler);
10451046
};
10461047

10471048
/*

src/main/js/isd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282

8383
function isdProcessContentElement(doc, offset, region, body, parent, inherited_region_id, elem, errorHandler, context) {
8484

85-
/* prune if temporally inactive (<br> are not included in timing) */
85+
/* prune if temporally inactive */
8686

87-
if (elem.kind !== 'br' && (offset < elem.begin || offset >= elem.end)) {
87+
if (offset < elem.begin || offset >= elem.end) {
8888
return null;
8989
}
9090

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
{
2+
"events": [
3+
0,
4+
6
5+
],
6+
"head": {
7+
"layout": {
8+
"regions": {
9+
"area1": {
10+
"id": "area1",
11+
"styleAttrs": {
12+
"http://www.w3.org/ns/ttml#styling origin": {
13+
"h": {
14+
"value": 10,
15+
"unit": "%"
16+
},
17+
"w": {
18+
"value": 10,
19+
"unit": "%"
20+
}
21+
},
22+
"http://www.w3.org/ns/ttml#styling extent": {
23+
"h": {
24+
"value": 10,
25+
"unit": "%"
26+
},
27+
"w": {
28+
"value": 80,
29+
"unit": "%"
30+
}
31+
},
32+
"http://www.w3.org/ns/ttml#styling backgroundColor": [
33+
0,
34+
0,
35+
255,
36+
255
37+
],
38+
"http://www.w3.org/ns/ttml#styling displayAlign": "center",
39+
"http://www.w3.org/ns/ttml#styling textAlign": "center",
40+
"http://www.w3.org/ns/ttml#styling color": [
41+
255,
42+
255,
43+
255,
44+
255
45+
],
46+
"http://www.w3.org/ns/ttml#styling fontSize": {
47+
"value": 24,
48+
"unit": "px"
49+
}
50+
},
51+
"timeContainer": "par",
52+
"sets": [],
53+
"begin": 0,
54+
"end": "Infinity"
55+
},
56+
"area2": {
57+
"id": "area2",
58+
"styleAttrs": {
59+
"http://www.w3.org/ns/ttml#styling origin": {
60+
"h": {
61+
"value": 80,
62+
"unit": "%"
63+
},
64+
"w": {
65+
"value": 10,
66+
"unit": "%"
67+
}
68+
},
69+
"http://www.w3.org/ns/ttml#styling extent": {
70+
"h": {
71+
"value": 10,
72+
"unit": "%"
73+
},
74+
"w": {
75+
"value": 80,
76+
"unit": "%"
77+
}
78+
},
79+
"http://www.w3.org/ns/ttml#styling backgroundColor": [
80+
0,
81+
0,
82+
255,
83+
255
84+
],
85+
"http://www.w3.org/ns/ttml#styling displayAlign": "center",
86+
"http://www.w3.org/ns/ttml#styling textAlign": "center",
87+
"http://www.w3.org/ns/ttml#styling color": [
88+
255,
89+
255,
90+
255,
91+
255
92+
],
93+
"http://www.w3.org/ns/ttml#styling fontSize": {
94+
"value": 24,
95+
"unit": "px"
96+
}
97+
},
98+
"timeContainer": "par",
99+
"sets": [],
100+
"begin": 0,
101+
"end": "Infinity"
102+
},
103+
"area3": {
104+
"id": "area3",
105+
"styleAttrs": {
106+
"http://www.w3.org/ns/ttml#styling origin": {
107+
"h": {
108+
"value": 92,
109+
"unit": "%"
110+
},
111+
"w": {
112+
"value": 10,
113+
"unit": "%"
114+
}
115+
},
116+
"http://www.w3.org/ns/ttml#styling extent": {
117+
"h": {
118+
"value": 6,
119+
"unit": "%"
120+
},
121+
"w": {
122+
"value": 80,
123+
"unit": "%"
124+
}
125+
},
126+
"http://www.w3.org/ns/ttml#styling backgroundColor": [
127+
255,
128+
0,
129+
0,
130+
255
131+
],
132+
"http://www.w3.org/ns/ttml#styling displayAlign": "center",
133+
"http://www.w3.org/ns/ttml#styling textAlign": "center",
134+
"http://www.w3.org/ns/ttml#styling color": [
135+
255,
136+
255,
137+
0,
138+
255
139+
],
140+
"http://www.w3.org/ns/ttml#styling fontSize": {
141+
"value": 24,
142+
"unit": "px"
143+
}
144+
},
145+
"timeContainer": "par",
146+
"sets": [],
147+
"begin": 0,
148+
"end": "Infinity"
149+
}
150+
}
151+
}
152+
},
153+
"body": {
154+
"kind": "body",
155+
"styleAttrs": {},
156+
"timeContainer": "par",
157+
"sets": [],
158+
"regionID": "",
159+
"contents": [
160+
{
161+
"kind": "div",
162+
"styleAttrs": {},
163+
"timeContainer": "par",
164+
"sets": [],
165+
"regionID": "",
166+
"contents": [
167+
{
168+
"kind": "p",
169+
"styleAttrs": {},
170+
"timeContainer": "par",
171+
"sets": [],
172+
"regionID": "area1",
173+
"contents": [
174+
{
175+
"kind": "span",
176+
"timeContainer": "par",
177+
"text": "This region is within the editorial area.",
178+
"space": "default",
179+
"begin": 0,
180+
"end": "Infinity"
181+
}
182+
],
183+
"begin": 0,
184+
"end": 6
185+
},
186+
{
187+
"kind": "p",
188+
"styleAttrs": {},
189+
"timeContainer": "par",
190+
"sets": [],
191+
"regionID": "area2",
192+
"contents": [
193+
{
194+
"kind": "span",
195+
"timeContainer": "par",
196+
"text": "This region is within the editorial area.",
197+
"space": "default",
198+
"begin": 0,
199+
"end": "Infinity"
200+
}
201+
],
202+
"begin": 0,
203+
"end": 6
204+
},
205+
{
206+
"kind": "p",
207+
"styleAttrs": {},
208+
"timeContainer": "par",
209+
"sets": [],
210+
"regionID": "area3",
211+
"contents": [
212+
{
213+
"kind": "span",
214+
"timeContainer": "par",
215+
"text": "This region is not.",
216+
"space": "default",
217+
"begin": 0,
218+
"end": "Infinity"
219+
}
220+
],
221+
"begin": 0,
222+
"end": 6
223+
}
224+
],
225+
"begin": 0,
226+
"end": 6
227+
}
228+
],
229+
"begin": 0,
230+
"end": 6
231+
},
232+
"cellResolution": {
233+
"w": 32,
234+
"h": 15
235+
},
236+
"effectiveFrameRate": 30,
237+
"tickRate": 1,
238+
"aspectRatio": null,
239+
"pxDimensions": {
240+
"h": 480,
241+
"w": 640
242+
}
243+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<div style="position: relative; width: 640px; height: 360px; margin: auto; top: 0px; bottom: 0px; left: 0px; right: 0px; z-index: 0;">
2+
<div style="position: absolute; margin: 0px; background-color: rgb(0, 0, 255); display: flex; flex-direction: column; justify-content: center; height: 36px; width: 512px; opacity: 1; top: 36px; left: 64px; overflow: hidden; padding: 0px; visibility: visible; writing-mode: horizontal-tb; z-index: auto;">
3+
<div style="margin: 0px; visibility: visible;">
4+
<div style="margin: 0px; visibility: visible;">
5+
<p style="margin: 0px; direction: ltr; line-height: normal; text-align: center; unicode-bidi: normal; visibility: visible;">
6+
<span style="margin: 0px; color: rgb(255, 255, 255); direction: ltr; font-family: &quot;Courier New&quot;, &quot;Liberation Mono&quot;, Courier, monospace; font-size: 18px; font-style: normal; font-weight: normal; text-decoration: none; unicode-bidi: normal; visibility: visible; white-space: normal;">This region is within the editorial area.</span>
7+
</p>
8+
</div>
9+
</div>
10+
</div>
11+
<div style="position: absolute; margin: 0px; background-color: rgb(0, 0, 255); display: flex; flex-direction: column; justify-content: center; height: 36px; width: 512px; opacity: 1; top: 288px; left: 64px; overflow: hidden; padding: 0px; visibility: visible; writing-mode: horizontal-tb; z-index: auto;">
12+
<div style="margin: 0px; visibility: visible;">
13+
<div style="margin: 0px; visibility: visible;">
14+
<p style="margin: 0px; direction: ltr; line-height: normal; text-align: center; unicode-bidi: normal; visibility: visible;">
15+
<span style="margin: 0px; color: rgb(255, 255, 255); direction: ltr; font-family: &quot;Courier New&quot;, &quot;Liberation Mono&quot;, Courier, monospace; font-size: 18px; font-style: normal; font-weight: normal; text-decoration: none; unicode-bidi: normal; visibility: visible; white-space: normal;">This region is within the editorial area.</span>
16+
</p>
17+
</div>
18+
</div>
19+
</div>
20+
<div style="position: absolute; margin: 0px; background-color: rgb(255, 0, 0); display: flex; flex-direction: column; justify-content: center; height: 21.6px; width: 512px; opacity: 1; top: 331.2px; left: 64px; overflow: hidden; padding: 0px; visibility: visible; writing-mode: horizontal-tb; z-index: auto;">
21+
<div style="margin: 0px; visibility: visible;">
22+
<div style="margin: 0px; visibility: visible;">
23+
<p style="margin: 0px; direction: ltr; line-height: normal; text-align: center; unicode-bidi: normal; visibility: visible;">
24+
<span style="margin: 0px; color: rgb(255, 255, 0); direction: ltr; font-family: &quot;Courier New&quot;, &quot;Liberation Mono&quot;, Courier, monospace; font-size: 18px; font-style: normal; font-weight: normal; text-decoration: none; unicode-bidi: normal; visibility: visible; white-space: normal;">This region is not.</span>
25+
</p>
26+
</div>
27+
</div>
28+
</div>
29+
</div>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div style="position: relative; width: 640px; height: 360px; margin: auto; top: 0px; bottom: 0px; left: 0px; right: 0px; z-index: 0;">
2+
<div style="position: absolute; margin: 0px; background-color: rgb(0, 0, 255); display: flex; flex-direction: column; justify-content: center; height: 36px; width: 512px; opacity: 1; top: 36px; left: 64px; overflow: hidden; padding: 0px; visibility: visible; writing-mode: horizontal-tb; z-index: auto;">
3+
</div>
4+
<div style="position: absolute; margin: 0px; background-color: rgb(0, 0, 255); display: flex; flex-direction: column; justify-content: center; height: 36px; width: 512px; opacity: 1; top: 288px; left: 64px; overflow: hidden; padding: 0px; visibility: visible; writing-mode: horizontal-tb; z-index: auto;">
5+
</div>
6+
<div style="position: absolute; margin: 0px; background-color: rgb(255, 0, 0); display: flex; flex-direction: column; justify-content: center; height: 21.6px; width: 512px; opacity: 1; top: 331.2px; left: 64px; overflow: hidden; padding: 0px; visibility: visible; writing-mode: horizontal-tb; z-index: auto;">
7+
</div>
8+
</div>

0 commit comments

Comments
 (0)