<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24380</bug_id>
          
          <creation_ts>2014-01-24 07:12:12 +0000</creation_ts>
          <short_desc>[WebVTT] Don&apos;t extend TextTrack with WebVTT-specific members</short_desc>
          <delta_ts>2014-01-31 07:35:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>TextTracks CG</product>
          <component>WebVTT</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>v1</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philip Jägenstedt">philipj</reporter>
          <assigned_to name="Philip Jägenstedt">philipj</assigned_to>
          <cc>mike</cc>
    
    <cc>public-texttracks</cc>
    
    <cc>rick.eyre</cc>
    
    <cc>silviapfeiffer1</cc>
    
    <cc>victor.carbune</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98985</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-24 07:12:12 +0000</bug_when>
    <thetext>TextTrackCue was untangled from VTTCue on the grounds that WebVTT may not be the only text track type for all eternity. On the same reasoning, we shouldn&apos;t put VTT-specific things on TextTrack:

interface TextTrack : EventTarget {
           attribute VTTRegionList? regions;
  void addRegion(VTTRegion region);
  void removeRegion(VTTRegion region);
};

Spawned from https://www.w3.org/Bugs/Public/show_bug.cgi?id=23686#c5

(I thought I had already filed a bug, but I can&apos;t find it.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99316</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-28 17:24:10 +0000</bug_when>
    <thetext>Suggested fix:

1. Change VTTCue to have an &quot;attribute VTTRegion? region&quot; instead of the regionId.
2. Remove the track and id attributes from from VTTRegion, since a region is now coupled with a cue directly, not via an id string.
3. Change the parser to use the id only during parsing to connect cues with regions.
4. Remove all of the extensions to TextTrack and with it the VTTRegionList interface.

In short, make the region an attribute of the cue only. If you want to find all regions (why?) then look at your cues and if you want to remove a region just stop using it.

This seems simpler to spec and implement, and reduces the API surface. Sounds good, Silvia?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99375</commentid>
    <comment_count>2</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-01-29 00:18:46 +0000</bug_when>
    <thetext>Maybe I have to see this completely, but will this not lead to duplicating a region for every cue in it?

(als cc-ing Victor for his feedback, since he implemented regions in blink/webkit)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99383</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-29 02:39:55 +0000</bug_when>
    <thetext>(In reply to Silvia Pfeiffer from comment #2)
&gt; Maybe I have to see this completely, but will this not lead to duplicating a
&gt; region for every cue in it?

No, the parser would have an id-&gt;VTTRegion mapping while it is running, so it would find the same region each time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99386</commentid>
    <comment_count>4</comment_count>
    <who name="vcarbune">victor.carbune</who>
    <bug_when>2014-01-29 08:08:36 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #1)
&gt; In short, make the region an attribute of the cue only. If you want to find
&gt; all regions (why?) then look at your cues and if you want to remove a region
&gt; just stop using it.

I think the change makes sense; it probably implies a bit more work for developers who will want to change region parameter through script, but re-building an id/region mapping is fairly trivial, if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99390</commentid>
    <comment_count>5</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-29 09:35:00 +0000</bug_when>
    <thetext>Here&apos;s my proposal implemented: https://github.com/w3c/webvtt/pull/31</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99413</commentid>
    <comment_count>6</comment_count>
    <who name="Rick Eyre">rick.eyre</who>
    <bug_when>2014-01-29 14:43:05 +0000</bug_when>
    <thetext>This was one of the things we were considering bringing up when we implemented this in Firefox. I&apos;m all for this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99505</commentid>
    <comment_count>7</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-01-30 22:21:20 +0000</bug_when>
    <thetext>OK, understood. I like the simplification. I guess a list of regions is now simply an array?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99527</commentid>
    <comment_count>8</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-31 07:33:38 +0000</bug_when>
    <thetext>(In reply to Silvia Pfeiffer from comment #7)
&gt; OK, understood. I like the simplification. I guess a list of regions is now
&gt; simply an array?

It&apos;s no longer exposed in any API, so it&apos;s just a conceptual list of no specific kind. As I wrote in one of the commit messages, I think that in the end we should have a (conceptual) id-&gt;region map in the parser, so that the id isn&apos;t a property of the region but just something required by the syntax.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99528</commentid>
    <comment_count>9</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-31 07:35:20 +0000</bug_when>
    <thetext>Resolving this as fixed since the TextTrack interface extensions are no more:
https://github.com/w3c/webvtt/commit/970b3a2d425d26e63fe2cd94b030f8f80289af00</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>