[html5] r7062 - [giow] (0) Try to clarify line breaking, balancing, and bidi handling in WebVTT. [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Apr 24 14:14:29 PDT 2012


Author: ianh
Date: 2012-04-24 14:14:28 -0700 (Tue, 24 Apr 2012)
New Revision: 7062

Modified:
   source
Log:
[giow] (0) Try to clarify line breaking, balancing, and bidi handling in WebVTT.
Affected topics: Video Text Tracks

Modified: source
===================================================================
--- source	2012-04-19 23:53:03 UTC (rev 7061)
+++ source	2012-04-24 21:14:28 UTC (rev 7062)
@@ -108925,22 +108925,13 @@
      <li>
 
       <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: <a href="#refsBIDI">[BIDI]</a></p>
+      steps to the concatenation of the values of each <span>WebVTT
+      Text Object</span> in <var title="">nodes</var>, in a pre-order,
+      depth-first traversal, excluding <span title="WebVTT Ruby Text
+      Object">WebVTT Ruby Text Objects</span> and their descendants,
+      to determine the <i>paragraph embedding level</i> of the first
+      Unicode paragraph of the cue. <a href="#refsBIDI">[BIDI]</a></p>
 
-      <ul>
-
-       <li><var title="">nodes</var> represents a single paragraph.</li>
-
-       <li>The paragraph's text consists of the concatenation of the
-       values of each <span>WebVTT Text Object</span> in <var
-       title="">nodes</var>, in a pre-order, depth-first traversal,
-       excluding <span title="WebVTT Ruby Text Object">WebVTT Ruby
-       Text Objects</span> and their descendants.</li>
-
-      </ul>
-
      </li>
 
      <li>
@@ -109205,15 +109196,31 @@
        were calculated earlier in this algorithm.)</li>
 
        <li>Text runs must be wrapped according to the CSS
-       line-wrapping rules, except that additionally, regardless of
-       the value of the 'white-space' property, lines must be wrapped
-       at the edge of their containing blocks, even if doing so
-       requires splitting a word where there is no line breaking
-       opportunity. (Thus, normally text wraps as needed, but if there
-       is a particularly long word, it does not overflow as it
-       normally would in CSS, it is instead forcibly wrapped at the
-       box's edge.)</li>
+       line-wrapping rules, with the following additional constraints:
 
+        <ul>
+
+         <li>Regardless of the value of the 'white-space' property,
+         lines must be wrapped at the edge of their containing blocks,
+         even if doing so requires splitting a word where there is no
+         line breaking opportunity. (Thus, normally text wraps as
+         needed, but if there is a particularly long word, it does not
+         overflow as it normally would in CSS, it is instead forcibly
+         wrapped at the box's edge.)</li>
+
+         <li>Regardless of the value of the 'white-space' property,
+         any line breaks inserted by the user agent for the purposes
+         of line wrapping must be placed so as to minimise Δ
+         across each run of consecutive lines between preserved
+         newlines in the source. Δ for a set of lines is defined
+         as the sum over each line of the absolute of the difference
+         between the line's length and the mean line length of the
+         set.</li>
+
+        </ul>
+
+       </li>
+
        <li>The viewport (and initial containing block) is
        <var title="">video</var>'s rendering area.</li>
 
@@ -109522,8 +109529,9 @@
 
   <p>When following the <span>rules for updating the display of WebVTT
   text tracks</span>, user agents must set properties of <span
-  title="WebVTT Node Object">WebVTT Node Objects</span> as defined in
-  this section. <a href="#refsCSS">[CSS]</a></p>
+  title="WebVTT Node Object">WebVTT Node Objects</span> at the CSS
+  user agent cascade layer as defined in this section. <a
+  href="#refsCSS">[CSS]</a></p>
 
   <p>On the (root) <span>List of WebVTT Node Objects</span>, the
   'position' property must be set to 'absolute', the 'direction'
@@ -109573,6 +109581,10 @@
   of WebVTT Node Objects</span>, if supported.</p> <!-- 'text-outline'
   is in CSS3 Text, but Tab says that's awaiting medical attention. -->
 
+  <p>The 'white-space' property on the (root) <span>List of WebVTT
+  Node Objects</span> must be set to 'pre-wrap'. <a
+  href="#refsCSS">[CSS]</a></p>
+
   <p>The 'font-style' property on <span title="WebVTT Italic
   Object">WebVTT Italic Objects</span> must be set to 'italic'.</p>
 
@@ -109590,10 +109602,6 @@
   Object">WebVTT Ruby Text Objects</span> must be set to
   'ruby-text'. <a href="#refsCSSRUBY">[CSSRUBY]</a></p>
 
-  <p>If there are style sheets that apply to the <span>media
-  element</span> or other playback mechanism, then they must be
-  interpreted as defined in the next section.</p>
-
   <p>All other non-inherited properties must be set to their initial
   values; inherited properties on the root <span>List of WebVTT Node
   Objects</span> must inherit their values from the <span>media
@@ -109604,7 +109612,11 @@
   <span>List of WebVTT Node Objects</span> must take their initial
   values.</p>
 
+  <p>If there are style sheets that apply to the <span>media
+  element</span> or other playback mechanism, then they must be
+  interpreted as defined in the next section.</p>
 
+
   <h4>CSS extensions</h4>
 
   <p>When a user agent is rendering one or more <span title="text
@@ -109659,6 +109671,7 @@
    <li>the properties corresponding to the 'background' shorthand</li>
    <li>the properties corresponding to the 'outline' shorthand</li>
    <li>the properties corresponding to the 'font' shorthand, including 'line-height'</li>
+   <li>'white-space'</li>
    <!-- add more... -->
    <!-- definitely not:
           display, float, position, top, left, right, bottom, width,
@@ -109780,7 +109793,7 @@
    <li>the properties corresponding to the 'outline' shorthand</li>
    <li>properties relating to the transition and animation features</li>
    <!-- add more... -->
-   <!-- but definitely not anything that affects dimensions of boxes, e.g. the 'font' shorthand's properties -->
+   <!-- but definitely not anything that affects dimensions of boxes, e.g. the 'font' shorthand's properties or 'white-space'; those are listed below instead -->
   </ul>
 
   <!--v2
@@ -109798,6 +109811,7 @@
 
   <ul class="brief">
    <li>the properties corresponding to the 'font' shorthand, including 'line-height'</li>
+   <li>'white-space'</li>
    <!-- add more... -->
    <!-- definitely not:
           display, float, position, top, left, right, bottom, width,




More information about the Commit-Watchers mailing list