<?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>25660</bug_id>
          
          <creation_ts>2014-05-12 09:23:41 +0000</creation_ts>
          <short_desc>[WebVTT] Restore size clamping in rendering</short_desc>
          <delta_ts>2015-11-09 15:23:36 +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>MOVED</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>philipj</cc>
    
    <cc>rick.eyre</cc>
    
    <cc>silviapfeiffer1</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact name="Web Media Text Tracks CG">public-texttracks</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105700</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-05-12 09:23:41 +0000</bug_when>
    <thetext>The maximum width clamping was removed in bug 20037. This has been implemented and shipped for a long time, in Presto, WebKit and Blink.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105703</commentid>
    <comment_count>1</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-05-12 09:41:32 +0000</bug_when>
    <thetext>I think it would be valuable to restore this for the case where no &quot;size&quot; is specified. In all other cases I think it goes against author intention.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105708</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-05-12 11:18:42 +0000</bug_when>
    <thetext>What&apos;s the use case for having cues render outside the video where they cannot be read? Even if there were a use case, this change makes it too easy to overflow by accident.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105709</commentid>
    <comment_count>3</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-05-12 11:42:46 +0000</bug_when>
    <thetext>Who is to tell if the author deliberately wanted to place cue text at the edge of the screen or made an authoring mistake by not being able to add up to 100? We don&apos;t protect authors from such mistakes on the Web either. They find out by inspection.

I agree, though, that if no &quot;size&quot; is given, overflow may happen by accident, so need to fix that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105834</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-05-13 12:12:45 +0000</bug_when>
    <thetext>https://github.com/w3c/webvtt/pull/69 changes position in a way that keeps the maximum width calculation.

Unless there&apos;s a use case for a non-clamping size, that&apos;s just extra complexity.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107476</commentid>
    <comment_count>5</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-06-08 11:29:52 +0000</bug_when>
    <thetext>I have a counter-proposal. I believe we should introduce an &quot;auto&quot; setting for &quot;size&quot; such that by default clamping is done. But if the author explicitly sets size to be 100% (or another value), we should respect author decisions and not clamp at the frame boundary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107485</commentid>
    <comment_count>6</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-06-08 18:49:24 +0000</bug_when>
    <thetext>What&apos;s the use case for a non-clamping size?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107496</commentid>
    <comment_count>7</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-06-09 02:30:18 +0000</bug_when>
    <thetext>When auto-clamping, we change much more than just the width of the cue. We potentially change the height of the cue, too, because cues may get new auto line breaks, potentially having unexpected side effects.

When not clamping, we risk text being cut off as it overflows the video. However, that would only happen when the author has explicitly defined the cue&apos;s width to be such that it extends outside the video.

Which side effect do you think is more tolerable: the one that screws up other stuff on the video viewport or the one where some text possibly disappears, where the latter only happens as an authoring mistake?

To clarify, here is what I am suggesting (horizontal case only for simplicity):

size=auto or
size=author-provided em
* width should be defined by the bounding box of all the line boxes in the cue
* auto-clamping of cue width should occur when the space for the cue box gets too small to avoid line breaks

size=author-provided percentage
* width should be as authored
* overflow is hidden</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107518</commentid>
    <comment_count>8</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-06-09 12:27:40 +0000</bug_when>
    <thetext>You already have to deal with the number of lines changing due to the user changing the font size, and we have the overlap avoidance algorithm to make the best of the situation.

We have potentially serious interop problem on our hands and we need to fix it ASAP. I&apos;ve fixed it in http://foolip.github.io/webvtt/ by just restoring the size clamping and that&apos;s what I want to put on master. If we need a non-clamping size (use case?) also, we can fix that separately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107520</commentid>
    <comment_count>9</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-06-09 12:34:20 +0000</bug_when>
    <thetext>OK, let&apos;s change the clamping back.

I would like to see the bounding box approach specified, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107522</commentid>
    <comment_count>10</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2014-06-09 13:10:18 +0000</bug_when>
    <thetext>Please extract out of https://github.com/w3c/webvtt/pull/69 only the changes to re-introduce size clamping.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107529</commentid>
    <comment_count>11</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-06-09 14:14:11 +0000</bug_when>
    <thetext>(In reply to Silvia Pfeiffer from comment #10)
&gt; Please extract out of https://github.com/w3c/webvtt/pull/69 only the changes
&gt; to re-introduce size clamping.

Will do!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124092</commentid>
    <comment_count>12</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-11-05 14:22:45 +0000</bug_when>
    <thetext>Philip, was there a commit or so for this somewhere I can look at?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124095</commentid>
    <comment_count>13</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-11-05 14:41:17 +0000</bug_when>
    <thetext>https://github.com/w3c/webvtt/pull/105</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124134</commentid>
    <comment_count>14</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-11-09 15:23:36 +0000</bug_when>
    <thetext>OK so this bug was fixed in the above PR. Please reopen if I misunderstood.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>