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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>72758</bug_id>
          
          <creation_ts>2011-11-18 14:03:18 -0800</creation_ts>
          <short_desc>Use canplay instead of canplaythrough in http/tests/media to prevent timeout</short_desc>
          <delta_ts>2011-11-28 10:40:49 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Victoria Kirst">vrk</reporter>
          <assigned_to name="Victoria Kirst">vrk</assigned_to>
          <cc>acolwell</cc>
    
    <cc>adamk</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jamesr</cc>
    
    <cc>scherkus</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>506043</commentid>
    <comment_count>0</comment_count>
    <who name="Victoria Kirst">vrk</who>
    <bug_when>2011-11-18 14:03:18 -0800</bug_when>
    <thetext>Use canplay instead of canplaythrough in http/tests/media to prevent timeout</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506044</commentid>
    <comment_count>1</comment_count>
      <attachid>115870</attachid>
    <who name="Victoria Kirst">vrk</who>
    <bug_when>2011-11-18 14:03:53 -0800</bug_when>
    <thetext>Created attachment 115870
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506066</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-11-18 14:33:56 -0800</bug_when>
    <thetext>Why does &apos;canplaythough&apos; cause these tests to time out?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506107</commentid>
    <comment_count>3</comment_count>
    <who name="Victoria Kirst">vrk</who>
    <bug_when>2011-11-18 15:13:24 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; Why does &apos;canplaythough&apos; cause these tests to time out?

In my 1st stab implementation of canplaythrough for chromium (that landed today and so far hasn&apos;t been reverted! http://codereview.chromium.org/8399023/), here is my main criteria for firing canplaythrough:

 a) Sample incoming downloading for 5 seconds and calculate download rate per second. If download rate &gt;= media bitrate fire canplaythrough.

 b) But if we download 4 seconds of data in less 2 seconds (i.e. downloading least 2x faster than consuming), fire canplaythrough without waiting for the 5s window

 c) If we&apos;ve buffered to the end of the file and still haven&apos;t fired canplaythrough, fire canplaythrough. This also means fully loaded source (e.g. file:// protocol) fires canplaythrough immediately.

Running the tests from my local machine, the http test serves video data fast enough to trigger scenario (b). But it looks like on our windows bots, scenario (a) or (c) is happening, which is causing the test to time out.

It doesn&apos;t appear checking for canplaythrough is needed for these tests, so I changed the event to canplay, an event that should trigger much earlier and more predictably. (Of course we shouldn&apos;t change the test to potentially cover up other bugs, though!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506116</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Klein">adamk</who>
    <bug_when>2011-11-18 15:18:56 -0800</bug_when>
    <thetext>Note that at least one other tests saw some behavior differences due to this change in canplaythrough:

compositor/geometry/clipped-video-controller.html

In that case, it wasn&apos;t a timeout, but a difference in layout (scrollHeight 293 vs 292)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506247</commentid>
    <comment_count>5</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-11-18 17:53:28 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Note that at least one other tests saw some behavior differences due to this change in canplaythrough:
&gt; 
&gt; compositor/geometry/clipped-video-controller.html
&gt; 
&gt; In that case, it wasn&apos;t a timeout, but a difference in layout (scrollHeight 293 vs 292)

I can&apos;t imagine why the intrinsic size of the element would change by one pixel. This sounds like a bug, has anyone checked to see what is happening?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506257</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-11-18 18:01:18 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Running the tests from my local machine, the http test serves video data fast enough to trigger scenario (b). But it looks like on our windows bots, scenario (a) or (c) is happening, which is causing the test to time out.
&gt; 
&gt; It doesn&apos;t appear checking for canplaythrough is needed for these tests, so I changed the event to canplay, an event that should trigger much earlier and more predictably. (Of course we shouldn&apos;t change the test to potentially cover up other bugs, though!)

I agree that having these tests trigger on &apos;canplay&apos; instead of &apos;canplaythough&apos; won&apos;t change them, but I worry that you are papering over a problem in your new implementation because I don&apos;t see how a file loaded from a same-machine web server could load slowly enough to not trigger your logic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506262</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Klein">adamk</who>
    <bug_when>2011-11-18 18:08:24 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Note that at least one other tests saw some behavior differences due to this change in canplaythrough:
&gt; &gt; 
&gt; &gt; compositor/geometry/clipped-video-controller.html
&gt; &gt; 
&gt; &gt; In that case, it wasn&apos;t a timeout, but a difference in layout (scrollHeight 293 vs 292)
&gt; 
&gt; I can&apos;t imagine why the intrinsic size of the element would change by one pixel. This sounds like a bug, has anyone checked to see what is happening?

James was the one who suggested this on IRC, I&apos;ll leave the explanation to him.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>507079</commentid>
    <comment_count>8</comment_count>
      <attachid>115870</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-21 11:00:12 -0800</bug_when>
    <thetext>Comment on attachment 115870
Patch

Clearing flags on attachment: 115870

Committed r100936: &lt;http://trac.webkit.org/changeset/100936&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>507080</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-11-21 11:00:16 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>508618</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-11-23 22:02:04 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #5)
&gt; &gt; 
&gt; &gt; I can&apos;t imagine why the intrinsic size of the element would change by one pixel. This sounds like a bug, has anyone checked to see what is happening?
&gt; 
&gt; James was the one who suggested this on IRC, I&apos;ll leave the explanation to him.

https://bugs.webkit.org/show_bug.cgi?id=72903 is also about a 1px change when a test is triggered by &apos;canplaythrough&apos; instead of &apos;canplay&apos;. In that bug James says:

    I don&apos;t feel qualified enough on these events to know what the 
    change does.  Can someone familiar with when these events fire 
    and what might change the render tree please chime in with a 
    theory of how this could help? 

and Victoria says:

    I don&apos;t know how this could cause a 1px rendering difference

but the patch was landed anyway - as this one was. 

Does anyone know what caused the rendering change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509942</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Klein">adamk</who>
    <bug_when>2011-11-28 10:40:49 -0800</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #7)
&gt; &gt; (In reply to comment #5)
&gt; &gt; &gt; 
&gt; &gt; &gt; I can&apos;t imagine why the intrinsic size of the element would change by one pixel. This sounds like a bug, has anyone checked to see what is happening?
&gt; &gt; 
&gt; &gt; James was the one who suggested this on IRC, I&apos;ll leave the explanation to him.
&gt; 
&gt; https://bugs.webkit.org/show_bug.cgi?id=72903 is also about a 1px change when a test is triggered by &apos;canplaythrough&apos; instead of &apos;canplay&apos;. In that bug James says:
&gt; 
&gt;     I don&apos;t feel qualified enough on these events to know what the 
&gt;     change does.  Can someone familiar with when these events fire 
&gt;     and what might change the render tree please chime in with a 
&gt;     theory of how this could help? 
&gt; 
&gt; and Victoria says:
&gt; 
&gt;     I don&apos;t know how this could cause a 1px rendering difference
&gt; 
&gt; but the patch was landed anyway - as this one was. 

Note that the patch on 72903 ended up being a better-understood workaround: the pixel results weren&apos;t flaky, only the text layout results, and so we suppressed the latter (as James pointed out, we only cared about the pixel output for that test anyway).

&gt; Does anyone know what caused the rendering change?

But your point here still stands, the root cause of the difference in rendering has yet to be determined.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>115870</attachid>
            <date>2011-11-18 14:03:53 -0800</date>
            <delta_ts>2011-11-21 11:00:12 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-72758-20111118140352.patch</filename>
            <type>text/plain</type>
            <size>3080</size>
            <attacher name="Victoria Kirst">vrk</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTAwODAyCmRpZmYgLS1naXQgYS9MYXlvdXRUZXN0cy9DaGFu
Z2VMb2cgYi9MYXlvdXRUZXN0cy9DaGFuZ2VMb2cKaW5kZXggYzk4NjJmYjVmNWY1ODI4ODE4MWUz
NjE5ZDg0YzM2MWVkMjE4NGEyYi4uY2JhMTY2MjRiZDllYzgzMWYyNGZjZmRiOWNjMDM4MzM5ZTdh
MDlmNyAxMDA3NTUKLS0tIGEvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCisrKyBiL0xheW91dFRlc3Rz
L0NoYW5nZUxvZwpAQCAtMSwzICsxLDE1IEBACisyMDExLTExLTE4ICBWaWN0b3JpYSBLaXJzdCAg
PHZya0BjaHJvbWl1bS5vcmc+CisKKyAgICAg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