<?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>23269</bug_id>
          
          <creation_ts>2013-09-17 22:48:59 +0000</creation_ts>
          <short_desc>[WebVTT] Cannot get the computed value for height and width in the proc model</short_desc>
          <delta_ts>2015-10-21 21:09:21 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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="Rick Eyre">rick.eyre</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-texttracks</cc>
    
    <cc>silviapfeiffer1</cc>
    
    <cc>zcorpan</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>93509</commentid>
    <comment_count>0</comment_count>
    <who name="Rick Eyre">rick.eyre</who>
    <bug_when>2013-09-17 22:48:59 +0000</bug_when>
    <thetext>In the processing model step 12 sub-step 2 it asks us to get the height or width of the first line box in boxes. Earlier we set the value for height as &quot;auto&quot; on the root box and since it hasn&apos;t been added to the DOM yet there is no layout to compute which results in 0 values.

&quot;2. Horizontal: Let step be the height of the first line box in boxes.

    Vertical: Let step be the width of the first line box in boxes.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99280</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-01-28 08:59:19 +0000</bug_when>
    <thetext>So, I guess you&apos;ve worked around this by now, so perhaps you can tell me what the spec should say instead? ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99307</commentid>
    <comment_count>2</comment_count>
    <who name="Rick Eyre">rick.eyre</who>
    <bug_when>2014-01-28 16:53:21 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #1)
&gt; So, I guess you&apos;ve worked around this by now, so perhaps you can tell me
&gt; what the spec should say instead? ;)

Heh :). In Firefox we&apos;ve worked around this by immediately adding the box to the DOM after the first section of the processing model spec is ran. That&apos;s the section that gets the initial computed values, steps 1 - 10. Then we can get the computed values of either height or width, depending on if it&apos;s vertical or horizontal text. Then we proceed with steps 11 - 12.

It might be helpful if the spec tells us what to do with the list of &apos;boxes&apos; that we are creating and when to do it. 

My main issue was that the algorithm tells us to get the computed values without taking the prior step to make sure that _we can_ get the computed values.

Alternatively, I would be okay with this being an implementation detail if there&apos;s consensus that it should be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121509</commentid>
    <comment_count>3</comment_count>
    <who name="Silvia Pfeiffer">silviapfeiffer1</who>
    <bug_when>2015-06-28 11:30:14 +0000</bug_when>
    <thetext>Prepared PR https://github.com/w3c/webvtt/pull/202</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122263</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-07-22 14:39:23 +0000</bug_when>
    <thetext>Rick, can you take a look at https://github.com/w3c/webvtt/pull/202#issuecomment-123743506 ?

I think that the problem here is that the spec pretends that this is all a layout algorithm, while implementations do more or less of it in DOM, more in the case of Gecko I think.

The spec is pretty hard to implement as written and that&apos;s unfortunate, but I think it&apos;s not actually wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123830</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-10-21 21:09:21 +0000</bug_when>
    <thetext>As I understand it, the spec basically uses CSS2 terminology to describe the layout. Think of it as similar to the way CSS2 defines how &apos;float&apos; works. The WebVTT spec does not say &quot;computed value&quot;, which is actually a separate concept.

The processing model could be defined in terms of creating a DOM and fiddling with the rendered result instead of &quot;Apply the terms of the CSS specifications to nodes within the following constraints&quot;, but that is strictly speaking editorial.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>