[html5] r7448 - [giow] (1) Try to position inevitably overlapping cues to as to maximise how muc [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Oct 10 13:14:41 PDT 2012


Author: ianh
Date: 2012-10-10 13:14:40 -0700 (Wed, 10 Oct 2012)
New Revision: 7448

Modified:
   source
Log:
[giow] (1) Try to position inevitably overlapping cues to as to maximise how much of the cue is in the title area, rather than just defaulting to the specified position. We could go even further and try to minimise overlapping with cues, if UAs want to implement that. Let me know.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17483
Affected topics: Video Text Tracks

Modified: source
===================================================================
--- source	2012-10-09 22:55:13 UTC (rev 7447)
+++ source	2012-10-10 20:14:40 UTC (rev 7448)
@@ -114609,10 +114609,15 @@
 
          </li>
 
-         <li><p><i>Default</i>: Remember the position of all the boxes in
-         <var title="">boxes</var> as their <var title="">default
-         position</var>.</p></li>
+         <li><p>Remember the position of all the boxes in <var title="">boxes</var> as their <var
+         title="">specified position</var>.</p></li>
 
+         <li><p>Let <var title="">best position</var> be null. It will hold a position for <var
+         title="">boxes</var>, much like <var title="">specified position</var> in the previous
+         step.</p>
+
+         <li><p>Let <var title="">best position score</var> be null.</p></li>
+
          <li><p>Let <var title="">switched</var> be false.</p></li>
 
          <li>
@@ -114634,8 +114639,26 @@
          title="">output</var> are entirely within the <var title="">title area</var> box, then jump
          to the step labeled <i>done positioning</i> below.</p></li>
 
+         <li><p>Let <var title="">current position score</var> be the percentage of the area of the
+         bounding box of the boxes in <var title="">boxes</var> that <!--overlaps the boxes in <var
+         title="">output</var> (if any) or that--> is outside the <var title="">title area</var>
+         box.</p></li>
+
          <li>
 
+          <p>If <var title="">best position</var> is null (i.e. this is the first run through this
+          loop, <var title="">switched</var> is still false, the boxes in <var title="">boxes</var>
+          are at their <var title="">specified position</var>, and <var title="">best position
+          score</var> is still null), or if <var title="">current position score</var> is a lower
+          percentage than that in <var title="">best position score</var>, then remember the
+          position of all the boxes in <var title="">boxes</var> as their <var title="">best
+          position</var>, and set <var title="">best position score</var> to <var title="">current
+          position score</var>.</p>
+
+         </li>
+
+         <li>
+
           <p><strong>Horizontal</strong>: If <var title="">step</var> is negative and the top of the
           first line box in <var title="">boxes</var> is now above the top of the <var
           title="">title area</var>, or if <var title="">step</var> is positive and the bottom of
@@ -114667,23 +114690,20 @@
 
          </li>
 
-         <li><p>Jump back to the step labeled <i>step
-         loop</i>.</p></li>
+         <li><p>Jump back to the step labeled <i>step loop</i>.</p></li>
 
-         <li><p><i>Switch direction</i>: Move all the boxes in <var
-         title="">boxes</var> back to their <var title="">default
-         position</var> as determined in the step above labeled
-         <i>default</i>.</p></li>
+         <li><p><i>Switch direction</i>: If <var title="">switched</var> is true, then move all the
+         boxes in <var title="">boxes</var> back to their <var title="">best position</var>, and
+         jump to the step labeled <i>done positioning</i> below.</p></li>
 
-         <li><p>If <var title="">switched</var> is true, jump to the step
-         labeled <i>done positioning</i> below.</p></li>
+         <li><p>Otherwise, move all the boxes in <var title="">boxes</var> back to their <var
+         title="">specified position</var> as determined in the earlier step.</p></li>
 
          <li><p>Negate <var title="">step</var>.</p></li>
 
          <li><p>Set <var title="">switched</var> to true.</p></li>
 
-         <li><p>Jump back to the step labeled <i>step
-         loop</i>.</p></li>
+         <li><p>Jump back to the step labeled <i>step loop</i>.</p></li>
 
         </ol>
 




More information about the Commit-Watchers mailing list