[html5] r5150 - [giow] (0) Captions - Stage 21.4: rendering: binding to CSS

whatwg at whatwg.org whatwg at whatwg.org
Mon Jul 12 15:26:50 PDT 2010


Author: ianh
Date: 2010-07-12 15:26:49 -0700 (Mon, 12 Jul 2010)
New Revision: 5150

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Captions - Stage 21.4: rendering: binding to CSS

Modified: complete.html
===================================================================
--- complete.html	2010-07-12 20:08:21 UTC (rev 5149)
+++ complete.html	2010-07-12 22:26:49 UTC (rev 5150)
@@ -86415,7 +86415,7 @@
       <p>Apply the Unicode Bidirectional Algorithm's Paragraph Level
       steps to <var title="">nodes</var> using the following
       constraints, to determine the <i>paragraph embedding level</i>
-      of the cue:</p>
+      of the cue: <a href=#BIDI>[BIDI]</a></p>
 
       <ul><li><var title="">nodes</var> represents a single paragraph.</li>
 
@@ -86437,8 +86437,9 @@
 
      <li>
 
-      <p>Determine the value of <var title="">maximum size</var> as per the
-      appropriate rules from the following list:</p>
+      <p>Determine the value of <var title="">maximum size</var> for
+      <var title="">cue</var> as per the appropriate rules from the
+      following list:</p>
 
       <dl class=switch><dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
               the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a>,
@@ -86513,21 +86514,10 @@
      <li><p>If the <a href=#timed-track-cue-size>timed track cue size</a> is less than <var title="">maximum size</var>, then let <var title="">size</var> be
      <a href=#timed-track-cue-size>timed track cue size</a>. Otherwise, let <var title="">size</var> be <var title="">maximum size</var>.</li>
 
-     <li><p class=XXX>apply css rules (styles and min/max dimensions) to get dimensions for the boxes; regardless of 'white-space', force wrapping at the max width and at line breaks</li>
+     <li><p></p>
 
-     <li><p class=XXX>turn the nodes into css boxes</li>
-
-<!-- XXX
-construct a CSS box model tree [or whatever] from the WebSRT Node
-Object tree rooted at /whatever/, witin the following constraints:
-
- + mappings of nodes to css 'display' values
- + dimensions
- + white-space rules
-
--->
-
-<!--
+<pre class=XXX>
+ calculate 'top' and 'left':
  * If D=horizontal:
      Let H = the height of the first line box of /lines/
      If A=start and 'direction' is 'ltr':
@@ -86536,9 +86526,9 @@
      If A=end and 'direction' is 'ltr':
      If A=start and 'direction' is 'rtl':
        Let X = min(T * VW - width of /container/, 0)
-     If A=middle and T <= 50%:
+     If A=middle and T <= 50%:
        Let X = max(T * VW - (width of /container/)/2, 0)
-     If A=middle and T > 50%:
+     If A=middle and T > 50%:
        Let X = min(T * VW + (width of /container/)/2, VW) - (width of /container/)
    If D=vertical:
      Let H = the width of the first line box of /lines/
@@ -86546,24 +86536,91 @@
        Let Y = min(T * VH, VH - height of /container/)
      If A=end:
        Let Y = min(T * VH - height of /container/, 0)
-     If A=middle and T <= 50%:
+     If A=middle and T <= 50%:
        Let Y = max(T * VH - (height of /container/)/2, 0)
-     If A=middle and T > 50%:
+     If A=middle and T > 50%:
        Let Y = min(T * VH + (height of /container/)/2, VH) - (height of /container/)
--->
+</pre>
 
-     <li><p class=XXX>if not snap-to-lines: position the box according to the given position information, and then spiral around clockwise until no overlap is found</li>
+     </li>
 
-     <li><p class=XXX>otherwise: position the block in the inline direction; then determine the block-direction position of the first line, then slide the line away from the reference edge until it fits, or if that goes off the edge slide it in the other direction; sliding must snap to multiples of the height of the first line box.</li>
+     <li>
 
-     <li><p class=XXX>from the resulting position, remove any lines that don't completely render on the video</li>
+      <p>Apply the terms of the CSS specifications to <var title="">nodes</var> within the following constraints, thus
+      obtaining a set of CSS boxes positioned relative to an initial
+      containing block: <a href=#refsCSS>[CSS]</a></p>
 
-     <li><p class=XXX>add the boxes to the output</li>
+      <ul><li>The <i>document tree</i> is the tree of <a href=#websrt-node-object title="WebSRT
+       Node Object">WebSRT Node Objects</a> rooted at <var title="">nodes</var>.</li>
 
-     <li><p class=XXX>save the boxes to the <a href=#timed-track-cue-display-state>timed track cue display state</a></li>
+       <li>For the purposes of processing by the CSS specification,
+       <a href=#websrt-internal-node-object title="WebSRT Internal Node Object">WebSRT Internal Node
+       Objects</a> are equivalent to elements with the same
+       contents. The name of these elements is not explicitly
+       specified. These elements have no attributes.</li>
 
+       <li>For the purposes of processing by the CSS
+       specification, <a href=#websrt-text-object title="WebSRT Text Object">WebSRT Text
+       Objects</a> are equivalent to text nodes.</li>
+
+       <li>No style sheets are associated with <var title="">nodes</var>.</li>
+
+       <li>All properties have their initial values, except as
+       explicitly overridden for specific nodes in the next
+       section.</li>
+
+       <li>The viewport (and initial containing block) is the
+       <a href=#media-element>media element</a>'s rendering area.</li>
+
+      </ul><p>Let <var title="">boxes</var> be the boxes generated as
+      descendants of the initial containing block, along with their
+      positions.</p>
+
+     </li>
+
+     <li>
+
+      <p>Adjust the positions of <var title="">boxes</var> according
+      to the appropriate steps from the following list:</p>
+
+      <dl class=switch><dt>If <var title="">cue</var>'s <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+
+       <dd>
+
+        <p class=XXX>determine the block-direction position of the
+        first line, then slide the line away from the reference edge
+        until it fits, or if that goes off the edge slide it in the
+        other direction; sliding must snap to multiples of the height
+        of the first line box.</p>
+
+       </dd>
+
+       <dt>If <var title="">cue</var>'s <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+
+       <dd>
+
+        <p class=XXX>position the box according to the given
+        position information, and then spiral around clockwise until
+        no overlap is found</p>
+
+       </dd>
+
+      </dl></li>
+
+     <li><p>If there are any line boxes in the (possibly now
+     repositioned) <var title="">boxes</var> that do not completely
+     fit inside the <a href=#media-element>media element</a>'s rendering area,
+     remove those offending line boxes from <var title="">boxes</var>.</li>
+
+     <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-display-state>timed track cue
+     display state</a> have the CSS boxes in <var title="">boxes</var>.</li>
+
+     <li><p>Add the CSS boxes in <var title="">boxes</var> to <var title="">output</var>.</li>
+
     </ol></li>
 
+   <li><p>Return <var title="">output</var>.</li>
+
   </ol><h5 id=css-extensions><span class=secno>14.3.2.2 </span>CSS extensions</h5>
 
   <p class=note>This section is intended to be moved to a CSS
@@ -86584,6 +86641,8 @@
 
   <!-- XXX
 
+   map display types
+
    rules for rendering the list of active cues:
     - for each segment, decide if it's before or after the current
       playback position.
@@ -86607,6 +86666,8 @@
     - outline
     - anything else that doesn't affect the size or position or kind of CSS boxes
 
+   force wrapping at viewport edge
+
   -->
 
   <p class=XXX>...</p>

Modified: index
===================================================================
--- index	2010-07-12 20:08:21 UTC (rev 5149)
+++ index	2010-07-12 22:26:49 UTC (rev 5150)
@@ -79656,7 +79656,7 @@
       <p>Apply the Unicode Bidirectional Algorithm's Paragraph Level
       steps to <var title="">nodes</var> using the following
       constraints, to determine the <i>paragraph embedding level</i>
-      of the cue:</p>
+      of the cue: <a href=#BIDI>[BIDI]</a></p>
 
       <ul><li><var title="">nodes</var> represents a single paragraph.</li>
 
@@ -79678,8 +79678,9 @@
 
      <li>
 
-      <p>Determine the value of <var title="">maximum size</var> as per the
-      appropriate rules from the following list:</p>
+      <p>Determine the value of <var title="">maximum size</var> for
+      <var title="">cue</var> as per the appropriate rules from the
+      following list:</p>
 
       <dl class=switch><dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
               the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a>,
@@ -79754,21 +79755,10 @@
      <li><p>If the <a href=#timed-track-cue-size>timed track cue size</a> is less than <var title="">maximum size</var>, then let <var title="">size</var> be
      <a href=#timed-track-cue-size>timed track cue size</a>. Otherwise, let <var title="">size</var> be <var title="">maximum size</var>.</li>
 
-     <li><p class=XXX>apply css rules (styles and min/max dimensions) to get dimensions for the boxes; regardless of 'white-space', force wrapping at the max width and at line breaks</li>
+     <li><p></p>
 
-     <li><p class=XXX>turn the nodes into css boxes</li>
-
-<!-- XXX
-construct a CSS box model tree [or whatever] from the WebSRT Node
-Object tree rooted at /whatever/, witin the following constraints:
-
- + mappings of nodes to css 'display' values
- + dimensions
- + white-space rules
-
--->
-
-<!--
+<pre class=XXX>
+ calculate 'top' and 'left':
  * If D=horizontal:
      Let H = the height of the first line box of /lines/
      If A=start and 'direction' is 'ltr':
@@ -79777,9 +79767,9 @@
      If A=end and 'direction' is 'ltr':
      If A=start and 'direction' is 'rtl':
        Let X = min(T * VW - width of /container/, 0)
-     If A=middle and T <= 50%:
+     If A=middle and T <= 50%:
        Let X = max(T * VW - (width of /container/)/2, 0)
-     If A=middle and T > 50%:
+     If A=middle and T > 50%:
        Let X = min(T * VW + (width of /container/)/2, VW) - (width of /container/)
    If D=vertical:
      Let H = the width of the first line box of /lines/
@@ -79787,24 +79777,91 @@
        Let Y = min(T * VH, VH - height of /container/)
      If A=end:
        Let Y = min(T * VH - height of /container/, 0)
-     If A=middle and T <= 50%:
+     If A=middle and T <= 50%:
        Let Y = max(T * VH - (height of /container/)/2, 0)
-     If A=middle and T > 50%:
+     If A=middle and T > 50%:
        Let Y = min(T * VH + (height of /container/)/2, VH) - (height of /container/)
--->
+</pre>
 
-     <li><p class=XXX>if not snap-to-lines: position the box according to the given position information, and then spiral around clockwise until no overlap is found</li>
+     </li>
 
-     <li><p class=XXX>otherwise: position the block in the inline direction; then determine the block-direction position of the first line, then slide the line away from the reference edge until it fits, or if that goes off the edge slide it in the other direction; sliding must snap to multiples of the height of the first line box.</li>
+     <li>
 
-     <li><p class=XXX>from the resulting position, remove any lines that don't completely render on the video</li>
+      <p>Apply the terms of the CSS specifications to <var title="">nodes</var> within the following constraints, thus
+      obtaining a set of CSS boxes positioned relative to an initial
+      containing block: <a href=#refsCSS>[CSS]</a></p>
 
-     <li><p class=XXX>add the boxes to the output</li>
+      <ul><li>The <i>document tree</i> is the tree of <a href=#websrt-node-object title="WebSRT
+       Node Object">WebSRT Node Objects</a> rooted at <var title="">nodes</var>.</li>
 
-     <li><p class=XXX>save the boxes to the <a href=#timed-track-cue-display-state>timed track cue display state</a></li>
+       <li>For the purposes of processing by the CSS specification,
+       <a href=#websrt-internal-node-object title="WebSRT Internal Node Object">WebSRT Internal Node
+       Objects</a> are equivalent to elements with the same
+       contents. The name of these elements is not explicitly
+       specified. These elements have no attributes.</li>
 
+       <li>For the purposes of processing by the CSS
+       specification, <a href=#websrt-text-object title="WebSRT Text Object">WebSRT Text
+       Objects</a> are equivalent to text nodes.</li>
+
+       <li>No style sheets are associated with <var title="">nodes</var>.</li>
+
+       <li>All properties have their initial values, except as
+       explicitly overridden for specific nodes in the next
+       section.</li>
+
+       <li>The viewport (and initial containing block) is the
+       <a href=#media-element>media element</a>'s rendering area.</li>
+
+      </ul><p>Let <var title="">boxes</var> be the boxes generated as
+      descendants of the initial containing block, along with their
+      positions.</p>
+
+     </li>
+
+     <li>
+
+      <p>Adjust the positions of <var title="">boxes</var> according
+      to the appropriate steps from the following list:</p>
+
+      <dl class=switch><dt>If <var title="">cue</var>'s <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+
+       <dd>
+
+        <p class=XXX>determine the block-direction position of the
+        first line, then slide the line away from the reference edge
+        until it fits, or if that goes off the edge slide it in the
+        other direction; sliding must snap to multiples of the height
+        of the first line box.</p>
+
+       </dd>
+
+       <dt>If <var title="">cue</var>'s <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+
+       <dd>
+
+        <p class=XXX>position the box according to the given
+        position information, and then spiral around clockwise until
+        no overlap is found</p>
+
+       </dd>
+
+      </dl></li>
+
+     <li><p>If there are any line boxes in the (possibly now
+     repositioned) <var title="">boxes</var> that do not completely
+     fit inside the <a href=#media-element>media element</a>'s rendering area,
+     remove those offending line boxes from <var title="">boxes</var>.</li>
+
+     <li><p>Let <var title="">cue</var>'s <a href=#timed-track-cue-display-state>timed track cue
+     display state</a> have the CSS boxes in <var title="">boxes</var>.</li>
+
+     <li><p>Add the CSS boxes in <var title="">boxes</var> to <var title="">output</var>.</li>
+
     </ol></li>
 
+   <li><p>Return <var title="">output</var>.</li>
+
   </ol><h5 id=css-extensions><span class=secno>12.3.2.2 </span>CSS extensions</h5>
 
   <p class=note>This section is intended to be moved to a CSS
@@ -79825,6 +79882,8 @@
 
   <!-- XXX
 
+   map display types
+
    rules for rendering the list of active cues:
     - for each segment, decide if it's before or after the current
       playback position.
@@ -79848,6 +79907,8 @@
     - outline
     - anything else that doesn't affect the size or position or kind of CSS boxes
 
+   force wrapping at viewport edge
+
   -->
 
   <p class=XXX>...</p>

Modified: source
===================================================================
--- source	2010-07-12 20:08:21 UTC (rev 5149)
+++ source	2010-07-12 22:26:49 UTC (rev 5150)
@@ -98583,7 +98583,7 @@
       <p>Apply the Unicode Bidirectional Algorithm's Paragraph Level
       steps to <var title="">nodes</var> using the following
       constraints, to determine the <i>paragraph embedding level</i>
-      of the cue:</p>
+      of the cue: <a href="#BIDI">[BIDI]</a></p>
 
       <ul>
 
@@ -98610,8 +98610,9 @@
 
      <li>
 
-      <p>Determine the value of <var title="">maximum size</var> as per the
-      appropriate rules from the following list:</p>
+      <p>Determine the value of <var title="">maximum size</var> for
+      <var title="">cue</var> as per the appropriate rules from the
+      following list:</p>
 
       <dl class="switch">
 
@@ -98692,21 +98693,10 @@
      <span>timed track cue size</span>. Otherwise, let <var
      title="">size</var> be <var title="">maximum size</var>.</p></li>
 
-     <li><p class="XXX">apply css rules (styles and min/max dimensions) to get dimensions for the boxes; regardless of 'white-space', force wrapping at the max width and at line breaks</p></li>
+     <li><p></p>
 
-     <li><p class="XXX">turn the nodes into css boxes</p></li>
-
-<!-- XXX
-construct a CSS box model tree [or whatever] from the WebSRT Node
-Object tree rooted at /whatever/, witin the following constraints:
-
- + mappings of nodes to css 'display' values
- + dimensions
- + white-space rules
-
--->
-
-<!--
+<pre class="XXX">
+ calculate 'top' and 'left':
  * If D=horizontal:
      Let H = the height of the first line box of /lines/
      If A=start and 'direction' is 'ltr':
@@ -98715,7 +98705,7 @@
      If A=end and 'direction' is 'ltr':
      If A=start and 'direction' is 'rtl':
        Let X = min(T * VW - width of /container/, 0)
-     If A=middle and T <= 50%:
+     If A=middle and T <= 50%:
        Let X = max(T * VW - (width of /container/)/2, 0)
      If A=middle and T > 50%:
        Let X = min(T * VW + (width of /container/)/2, VW) - (width of /container/)
@@ -98725,28 +98715,110 @@
        Let Y = min(T * VH, VH - height of /container/)
      If A=end:
        Let Y = min(T * VH - height of /container/, 0)
-     If A=middle and T <= 50%:
+     If A=middle and T <= 50%:
        Let Y = max(T * VH - (height of /container/)/2, 0)
      If A=middle and T > 50%:
        Let Y = min(T * VH + (height of /container/)/2, VH) - (height of /container/)
--->
+</pre>
 
-     <li><p class="XXX">if not snap-to-lines: position the box according to the given position information, and then spiral around clockwise until no overlap is found</p></li>
+     </li>
 
-     <li><p class="XXX">otherwise: position the block in the inline direction; then determine the block-direction position of the first line, then slide the line away from the reference edge until it fits, or if that goes off the edge slide it in the other direction; sliding must snap to multiples of the height of the first line box.</p></li>
+     <li>
 
-     <li><p class="XXX">from the resulting position, remove any lines that don't completely render on the video</p></li>
+      <p>Apply the terms of the CSS specifications to <var
+      title="">nodes</var> within the following constraints, thus
+      obtaining a set of CSS boxes positioned relative to an initial
+      containing block: <a href="#refsCSS">[CSS]</a></p>
 
-     <li><p class="XXX">add the boxes to the output</p></li>
+      <ul>
 
-     <li><p class="XXX">save the boxes to the <span>timed track cue display state</span></p></li>
+       <li>The <i>document tree</i> is the tree of <span title="WebSRT
+       Node Object">WebSRT Node Objects</span> rooted at <var
+       title="">nodes</var>.</li>
 
+       <li>For the purposes of processing by the CSS specification,
+       <span title="WebSRT Internal Node Object">WebSRT Internal Node
+       Objects</span> are equivalent to elements with the same
+       contents. The name of these elements is not explicitly
+       specified. These elements have no attributes.</li>
+
+       <li>For the purposes of processing by the CSS
+       specification, <span title="WebSRT Text Object">WebSRT Text
+       Objects</span> are equivalent to text nodes.</li>
+
+       <li>No style sheets are associated with <var
+       title="">nodes</var>.</li>
+
+       <li>All properties have their initial values, except as
+       explicitly overridden for specific nodes in the next
+       section.</li>
+
+       <li>The viewport (and initial containing block) is the
+       <span>media element</span>'s rendering area.</li>
+
+      </ul>
+
+      <p>Let <var title="">boxes</var> be the boxes generated as
+      descendants of the initial containing block, along with their
+      positions.</p>
+
+     </li>
+
+     <li>
+
+      <p>Adjust the positions of <var title="">boxes</var> according
+      to the appropriate steps from the following list:</p>
+
+      <dl class="switch">
+
+       <dt>If <var title="">cue</var>'s <span>timed track cue snap-to-lines flag</span> is set</dt>
+
+       <dd>
+
+        <p class="XXX">determine the block-direction position of the
+        first line, then slide the line away from the reference edge
+        until it fits, or if that goes off the edge slide it in the
+        other direction; sliding must snap to multiples of the height
+        of the first line box.</p>
+
+       </dd>
+
+       <dt>If <var title="">cue</var>'s <span>timed track cue snap-to-lines flag</span> is not set</dt>
+
+       <dd>
+
+        <p class="XXX">position the box according to the given
+        position information, and then spiral around clockwise until
+        no overlap is found</p>
+
+       </dd>
+
+      </dl>
+
+     </li>
+
+     <li><p>If there are any line boxes in the (possibly now
+     repositioned) <var title="">boxes</var> that do not completely
+     fit inside the <span>media element</span>'s rendering area,
+     remove those offending line boxes from <var
+     title="">boxes</var>.</p></li>
+
+     <li><p>Let <var title="">cue</var>'s <span>timed track cue
+     display state</span> have the CSS boxes in <var
+     title="">boxes</var>.</p></li>
+
+     <li><p>Add the CSS boxes in <var title="">boxes</var> to <var
+     title="">output</var>.</p></li>
+
     </ol>
 
    </li>
 
+   <li><p>Return <var title="">output</var>.</p></li>
+
   </ol>
 
+
   <h5>CSS extensions</h5>
 
   <p class="note">This section is intended to be moved to a CSS
@@ -98767,6 +98839,8 @@
 
   <!-- XXX
 
+   map display types
+
    rules for rendering the list of active cues:
     - for each segment, decide if it's before or after the current
       playback position.
@@ -98790,6 +98864,8 @@
     - outline
     - anything else that doesn't affect the size or position or kind of CSS boxes
 
+   force wrapping at viewport edge
+
   -->
 
   <p class="XXX">...</p>




More information about the Commit-Watchers mailing list