Skip to content

Commit

Permalink
[giow] (1) Add left and right caption alignment options.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17973
Affected topics: Video Text Tracks

git-svn-id: http://svn.whatwg.org/webapps@7424 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 28, 2012
1 parent eb8c624 commit 4ebb63f
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 26 deletions.
35 changes: 27 additions & 8 deletions complete.html
Expand Up @@ -34057,14 +34057,27 @@ <h6 id=text-track-model><span class=secno>4.8.10.12.1 </span>Text track model</h

<dt><dfn id=text-track-cue-alignment title="text track cue alignment">An alignment</dfn>
<dd>
<p>An alignment for the text of each line of the cue, either <dfn id=text-track-cue-start-alignment title="text track cue start alignment">start alignment</dfn> (the
text is aligned towards its start side), <dfn id=text-track-cue-middle-alignment title="text track
cue middle alignment">middle alignment</dfn> (the text is aligned
centered between its start and end sides), <dfn id=text-track-cue-end-alignment title="text track
cue end alignment">end alignment</dfn> (the text is aligned
towards its end side). Which sides are the start and end sides
depends on the Unicode bidirectional algorithm and the <a href=#text-track-cue-writing-direction title="text track cue writing direction">writing
direction</a>. <a href=#refsBIDI>[BIDI]</a></p>

<p>An alignment for the text of each line of the cue, one of:</p>

<dl><dt><dfn id=text-track-cue-start-alignment title="text track cue start alignment">Start alignment</dfn></dt>
<dd>The text is aligned towards its start side.</dd>

<dt><dfn id=text-track-cue-middle-alignment title="text track cue middle alignment">Middle alignment</dfn></dt>
<dd>The text is aligned centered between its start and end sides.</dd>

<dt><dfn id=text-track-cue-end-alignment title="text track cue end alignment">End alignment</dfn></dt>
<dd>The text is aligned towards its end side.</dd>

<dt><dfn id=text-track-cue-left-alignment title="text track cue left alignment">Left alignment</dfn></dt>
<dd>The text is aligned to the left.</dd>

<dt>or <dfn id=text-track-cue-right-alignment title="text track cue right alignment">Right alignment</dfn></dt>
<dd>The text is aligned to the right.</dd>

</dl><p>Which sides are the start and end sides depends on the Unicode bidirectional algorithm and
the <a href=#text-track-cue-writing-direction title="text track cue writing direction">writing direction</a>. <a href=#refsBIDI>[BIDI]</a></p>

</dd>

<dt><dfn id=text-track-cue-text title="text track cue text">The text of the cue</dfn>
Expand Down Expand Up @@ -35274,6 +35287,10 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
<dd><p>The string "<code title="">middle</code>".</dd>
<dt>If it is <a href=#text-track-cue-end-alignment title="text track cue end alignment">end alignment</a></dt>
<dd><p>The string "<code title="">end</code>".</dd>
<dt>If it is <a href=#text-track-cue-left-alignment title="text track cue left alignment">left alignment</a></dt>
<dd><p>The string "<code title="">left</code>".</dd>
<dt>If it is <a href=#text-track-cue-right-alignment title="text track cue right alignment">right alignment</a></dt>
<dd><p>The string "<code title="">right</code>".</dd>
</dl><p>Can be set.</p>
</dd>

Expand Down Expand Up @@ -35441,6 +35458,8 @@ <h6 id=text-track-api><span class=secno>4.8.10.12.5 </span>Text track API</h6>
<tbody><tr><td><a href=#text-track-cue-start-alignment title="text track cue start alignment">Start alignment</a> <td> "<code title="">start</code>"
<tr><td><a href=#text-track-cue-middle-alignment title="text track cue middle alignment">Middle alignment</a> <td> "<code title="">middle</code>"
<tr><td><a href=#text-track-cue-end-alignment title="text track cue end alignment">End alignment</a> <td> "<code title="">end</code>"
<tr><td><a href=#text-track-cue-left-alignment title="text track cue left alignment">Left alignment</a> <td> "<code title="">left</code>"
<tr><td><a href=#text-track-cue-right-alignment title="text track cue right alignment">Right alignment</a> <td> "<code title="">right</code>"
</table><p>On setting, the <a href=#text-track-cue-alignment>text track cue alignment</a> must be set
to the value given in the first cell of the row in the table above
whose second cell is a <a href=#case-sensitive>case-sensitive</a> match for the new
Expand Down
35 changes: 27 additions & 8 deletions index
Expand Up @@ -34057,14 +34057,27 @@ interface <dfn id=mediacontroller>MediaController</dfn> : <a href=#eventtarget>E

<dt><dfn id=text-track-cue-alignment title="text track cue alignment">An alignment</dfn>
<dd>
<p>An alignment for the text of each line of the cue, either <dfn id=text-track-cue-start-alignment title="text track cue start alignment">start alignment</dfn> (the
text is aligned towards its start side), <dfn id=text-track-cue-middle-alignment title="text track
cue middle alignment">middle alignment</dfn> (the text is aligned
centered between its start and end sides), <dfn id=text-track-cue-end-alignment title="text track
cue end alignment">end alignment</dfn> (the text is aligned
towards its end side). Which sides are the start and end sides
depends on the Unicode bidirectional algorithm and the <a href=#text-track-cue-writing-direction title="text track cue writing direction">writing
direction</a>. <a href=#refsBIDI>[BIDI]</a></p>

<p>An alignment for the text of each line of the cue, one of:</p>

<dl><dt><dfn id=text-track-cue-start-alignment title="text track cue start alignment">Start alignment</dfn></dt>
<dd>The text is aligned towards its start side.</dd>

<dt><dfn id=text-track-cue-middle-alignment title="text track cue middle alignment">Middle alignment</dfn></dt>
<dd>The text is aligned centered between its start and end sides.</dd>

<dt><dfn id=text-track-cue-end-alignment title="text track cue end alignment">End alignment</dfn></dt>
<dd>The text is aligned towards its end side.</dd>

<dt><dfn id=text-track-cue-left-alignment title="text track cue left alignment">Left alignment</dfn></dt>
<dd>The text is aligned to the left.</dd>

<dt>or <dfn id=text-track-cue-right-alignment title="text track cue right alignment">Right alignment</dfn></dt>
<dd>The text is aligned to the right.</dd>

</dl><p>Which sides are the start and end sides depends on the Unicode bidirectional algorithm and
the <a href=#text-track-cue-writing-direction title="text track cue writing direction">writing direction</a>. <a href=#refsBIDI>[BIDI]</a></p>

</dd>

<dt><dfn id=text-track-cue-text title="text track cue text">The text of the cue</dfn>
Expand Down Expand Up @@ -35274,6 +35287,10 @@ interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTa
<dd><p>The string "<code title="">middle</code>".</dd>
<dt>If it is <a href=#text-track-cue-end-alignment title="text track cue end alignment">end alignment</a></dt>
<dd><p>The string "<code title="">end</code>".</dd>
<dt>If it is <a href=#text-track-cue-left-alignment title="text track cue left alignment">left alignment</a></dt>
<dd><p>The string "<code title="">left</code>".</dd>
<dt>If it is <a href=#text-track-cue-right-alignment title="text track cue right alignment">right alignment</a></dt>
<dd><p>The string "<code title="">right</code>".</dd>
</dl><p>Can be set.</p>
</dd>

Expand Down Expand Up @@ -35441,6 +35458,8 @@ interface <dfn id=texttrackcue>TextTrackCue</dfn> : <a href=#eventtarget>EventTa
<tbody><tr><td><a href=#text-track-cue-start-alignment title="text track cue start alignment">Start alignment</a> <td> "<code title="">start</code>"
<tr><td><a href=#text-track-cue-middle-alignment title="text track cue middle alignment">Middle alignment</a> <td> "<code title="">middle</code>"
<tr><td><a href=#text-track-cue-end-alignment title="text track cue end alignment">End alignment</a> <td> "<code title="">end</code>"
<tr><td><a href=#text-track-cue-left-alignment title="text track cue left alignment">Left alignment</a> <td> "<code title="">left</code>"
<tr><td><a href=#text-track-cue-right-alignment title="text track cue right alignment">Right alignment</a> <td> "<code title="">right</code>"
</table><p>On setting, the <a href=#text-track-cue-alignment>text track cue alignment</a> must be set
to the value given in the first cell of the row in the table above
whose second cell is a <a href=#case-sensitive>case-sensitive</a> match for the new
Expand Down
74 changes: 64 additions & 10 deletions source
Expand Up @@ -37310,16 +37310,32 @@ interface <dfn>MediaController</dfn> : <span>EventTarget</span> {

<dt><dfn title="text track cue alignment">An alignment</dfn>
<dd>
<p>An alignment for the text of each line of the cue, either <dfn
title="text track cue start alignment">start alignment</dfn> (the
text is aligned towards its start side), <dfn title="text track
cue middle alignment">middle alignment</dfn> (the text is aligned
centered between its start and end sides), <dfn title="text track
cue end alignment">end alignment</dfn> (the text is aligned
towards its end side). Which sides are the start and end sides
depends on the Unicode bidirectional algorithm and the <span
title="text track cue writing direction">writing
direction</span>. <a href="#refsBIDI">[BIDI]</a></p>

<p>An alignment for the text of each line of the cue, one of:</p>

<dl>

<dt><dfn title="text track cue start alignment">Start alignment</dfn></dt>
<dd>The text is aligned towards its start side.</dd>

<dt><dfn title="text track cue middle alignment">Middle alignment</dfn></dt>
<dd>The text is aligned centered between its start and end sides.</dd>

<dt><dfn title="text track cue end alignment">End alignment</dfn></dt>
<dd>The text is aligned towards its end side.</dd>

<dt><dfn title="text track cue left alignment">Left alignment</dfn></dt>
<dd>The text is aligned to the left.</dd>

<dt>or <dfn title="text track cue right alignment">Right alignment</dfn></dt>
<dd>The text is aligned to the right.</dd>

</dl>

<p>Which sides are the start and end sides depends on the Unicode bidirectional algorithm and
the <span title="text track cue writing direction">writing direction</span>. <a
href="#refsBIDI">[BIDI]</a></p>

</dd>

<dt><dfn title="text track cue text">The text of the cue</dfn>
Expand Down Expand Up @@ -38710,6 +38726,10 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
<dd><p>The string "<code title="">middle</code>".</p></dd>
<dt>If it is <span title="text track cue end alignment">end alignment</span></dt>
<dd><p>The string "<code title="">end</code>".</p></dd>
<dt>If it is <span title="text track cue left alignment">left alignment</span></dt>
<dd><p>The string "<code title="">left</code>".</p></dd>
<dt>If it is <span title="text track cue right alignment">right alignment</span></dt>
<dd><p>The string "<code title="">right</code>".</p></dd>
</dl>
<p>Can be set.</p>
</dd>
Expand Down Expand Up @@ -38903,6 +38923,8 @@ interface <dfn>TextTrackCue</dfn> : <span>EventTarget</span> {
<tr> <td><span title="text track cue start alignment">Start alignment</span> <td> "<code title="">start</code>"
<tr> <td><span title="text track cue middle alignment">Middle alignment</span> <td> "<code title="">middle</code>"
<tr> <td><span title="text track cue end alignment">End alignment</span> <td> "<code title="">end</code>"
<tr> <td><span title="text track cue left alignment">Left alignment</span> <td> "<code title="">left</code>"
<tr> <td><span title="text track cue right alignment">Right alignment</span> <td> "<code title="">right</code>"
</table>

<p>On setting, the <span>text track cue alignment</span> must be set
Expand Down Expand Up @@ -39228,6 +39250,8 @@ The General Relativistic Field Equations</pre>
<li><dfn>Text track cue start alignment</dfn>
<li><dfn>Text track cue middle alignment</dfn>
<li><dfn>Text track cue end alignment</dfn>
<li><dfn>Text track cue left alignment</dfn>
<li><dfn>Text track cue right alignment</dfn>
<li><dfn>Text track cue line position</dfn>
<li><dfn>Text track cue automatic line position</dfn>
<li><dfn>Text track cue computed line position</dfn>
Expand Down Expand Up @@ -40458,6 +40482,18 @@ The Final Minute</pre>
<span>text track cue alignment</span> be <span title="text
track cue end alignment">end alignment</span>.</p></li>

<li><p>If <var title="">value</var> is a
<span>case-sensitive</span> match for the string "<code
title="">left</code>", then let <var title="">cue</var>'s
<span>text track cue alignment</span> be <span title="text
track cue left alignment">left alignment</span>.</p></li>

<li><p>If <var title="">value</var> is a
<span>case-sensitive</span> match for the string "<code
title="">right</code>", then let <var title="">cue</var>'s
<span>text track cue alignment</span> be <span title="text
track cue right alignment">right alignment</span>.</p></li>

</ol>

</dd>
Expand Down Expand Up @@ -114024,6 +114060,8 @@ iframe[seamless] { display: block; }
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue end alignment">end</span>,
and <var title="">direction</var> is 'rtl'</dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
and the <span>text track cue alignment</span> is <span title="text track cue left alignment">left</span></dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue vertical growing left writing direction">vertical growing left</span>,
and the <span>text track cue alignment</span> is <span title="text track cue start alignment">start</span></dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue vertical growing right writing direction">vertical growing right</span>,
Expand All @@ -114038,6 +114076,8 @@ iframe[seamless] { display: block; }
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue start alignment">start</span>,
and <var title="">direction</var> is 'rtl'</dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
and the <span>text track cue alignment</span> is <span title="text track cue right alignment">right</span></dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue vertical growing left writing direction">vertical growing left</span>,
and the <span>text track cue alignment</span> is <span title="text track cue end alignment">end</span></dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue vertical growing right writing direction">vertical growing right</span>,
Expand Down Expand Up @@ -114089,27 +114129,39 @@ iframe[seamless] { display: block; }
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue start alignment">start</span>,
and <var title="">direction</var> is 'ltr'</dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue left alignment">left</span>,
and <var title="">direction</var> is 'ltr'</dt>
<dd>
<p>Let <var title="">x-position</var> be the <span>text track cue text position</span>.</p>
</dd>

<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue end alignment">end</span>,
and <var title="">direction</var> is 'rtl'</dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue left alignment">left</span>,
and <var title="">direction</var> is 'rtl'</dt>
<dd>
<p>Let <var title="">x-position</var> be the <span>text track cue text position</span> subtracted from 100.</p>
</dd>

<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue end alignment">end</span>,
and <var title="">direction</var> is 'ltr'</dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue right alignment">right</span>,
and <var title="">direction</var> is 'ltr'</dt>
<dd>
<p>Let <var title="">x-position</var> be the <span>text track cue text position</span> minus <var title="">size</var>.</p>
</dd>

<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue start alignment">start</span>,
and <var title="">direction</var> is 'rtl'</dt>
<dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span>,
the <span>text track cue alignment</span> is <span title="text track cue right alignment">right</span>,
and <var title="">direction</var> is 'rtl'</dt>
<dd>
<p>Let <var title="">x-position</var> be the <span>text track cue text position</span> subtracted from 100, minus <var title="">size</var>.</p>
</dd>
Expand Down Expand Up @@ -114618,6 +114670,8 @@ iframe[seamless] { display: block; }
<tr> <td><span title="text track cue start alignment">Start alignment</span> <td> 'start'
<tr> <td><span title="text track cue middle alignment">Middle alignment</span> <td> 'center'
<tr> <td><span title="text track cue end alignment">End alignment</span> <td> 'end'
<tr> <td><span title="text track cue left alignment">Left alignment</span> <td> 'left'
<tr> <td><span title="text track cue right alignment">Right alignment</span> <td> 'right'
</table>

<p>The 'font' shorthand property on the (root) <span>List of WebVTT
Expand Down

0 comments on commit 4ebb63f

Please sign in to comment.