Deal with duplicate regions.
authorSilvia Pfeiffer
Tue, 12 Feb 2013 13:16:18 +1100
changeset 65 eaa048745a0e
parent 64 3f7cad970767
child 66 c96214825d69
Deal with duplicate regions.
608toVTT/region.html
--- a/608toVTT/region.html	Mon Feb 11 22:29:39 2013 +1100
+++ b/608toVTT/region.html	Tue Feb 12 13:16:18 2013 +1100
@@ -502,6 +502,7 @@
                   <li>Let <var>region</var>'s <a href="#text-track-region-scroll">scroll value</a> be <a href="#text-track-region-scroll-none" class="interalDFN">NONE</a>.</li>
                   <li><a href="#collect-webvtt-region-settings">Collect WebVTT region settings</a> from <a href="#webvtt-metadata-header-value" class="internalDFN">metadata's value</a> using <var>region</var> for the results.</li>
                   <li><i>Region processing</i>: Construct a <a href="#webvtt-region-object" class="internalDFN">WebVTT Region Object</a> from <var>region</var>, follow the <a href="#webvtt-region-dom-construction" class="internalDFN">WebVTT region DOM construction rule</a> and have the <a href="#webvtt-region-object" class="internalDFN">WebVTT Region Object</a> take part in the <a href="http://dev.w3.org/html5/webvtt/#webvtt-cue-text-rendering-rules" class="externalDFN">WebVTT cue text rendering rules</a> extended as below.</li>
+                  <li>If the <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a> <var>regions</var> contains a region with the same <var>region identifier</var> value as <var>region</var>, remove that region.</li><!-- the removed region has never been in effect -->
                   <li>Add <var>region</var> to the <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a> <var>regions</var>.</li>
                </ol>
               </li>
@@ -782,7 +783,7 @@
           <dd>Returns the <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>, as a <code>TextTrackRegionList</code> object.</dd>
 
           <dt>void addRegion(TextTrackRegion region)</dt>
-          <dd>Adds the given region to <var>TextTrack</var>'s <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>.</dd>
+          <dd>Adds the given region to <var>TextTrack</var>'s <a href="#text-track-list-of-regions" class="internalDFN">text track list of regions</a>. If that list already contains a region with the same identifier, update that region's attributes with those of <var>region</var>.</dd>
         </dl>
 
         <section>
@@ -794,7 +795,9 @@
           <ol>
            <li><p>If the given <var>region</var> is in a <span>text track list of regions</span>, then remove <var>region</var> from that <span>text track list of regions</span>.</p></li>
 
-           <li><p>Add <var>region</var> to the method's <code>TextTrack</code> object's <span>text track</span>'s <span>text track list of regions</span>.</p></li>
+           <li><p>If the method's <code>TextTrack</code> object's <span>text track list of regions</span> contains a region with the same identifier as <var>region<var> replace the values of that region's <var>width</var>, <var>height</var>, <var>anchor point</var>, <var>viewport anchor point</var> and <var>scroll</var> attributes with those of <var>region</var>.</p>
+
+           <p>Otherwise: add <var>region</var> to the method's <code>TextTrack</code> object's <span>text track list of regions</span>.</p></li>
           </ol>
         </section>
       </section>