<?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>42677</bug_id>
          
          <creation_ts>2010-07-20 15:01:31 -0700</creation_ts>
          <short_desc>Chrome browser Bug: Pause button stays when &lt;audio&gt; hits end</short_desc>
          <delta_ts>2010-07-27 08:06:35 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://code.google.com/p/chromium/issues/detail?id=21739</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Pranav Kedia">pranavk</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ajwong</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dimich</cc>
    
    <cc>pranavk</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>253944</commentid>
    <comment_count>0</comment_count>
    <who name="Pranav Kedia">pranavk</who>
    <bug_when>2010-07-20 15:01:31 -0700</bug_when>
    <thetext>This is a copy of bug 21739 on Chrome browser. Please see http://code.google.com/p/chromium/issues/detail?id=21739. Here is the description taken from the bug 21739:

In chrome browser, go to http://en.wikipedia.org/wiki/The_Star-Spangled_Banner and click &quot;play&quot; on one of the media files (right hand side of screen). Notice that when the file hits the end, the &quot;pause&quot; button stays a &quot;pause&quot; button rather than turning into &quot;play&quot;. This seems kinda broken. (I would expect the slider to return to the beginning and the button to turn to &quot;play&quot;).

The fix of this bug is in WebKit/WebCore/rendering/RenderMediaControlsChromium.cpp. Hence filing this bug. Here is the diff of the fix:

pranavk@pranavk-l1:/usr/local/google/home/pranavk/chrome/src/third_party/WebKit/WebCore$ svn diff
Index: rendering/RenderMediaControlsChromium.cpp
===================================================================
--- rendering/RenderMediaControlsChromium.cpp	(revision 62294)
+++ rendering/RenderMediaControlsChromium.cpp	(working copy)
@@ -96,7 +96,7 @@
     if (!hasSource(mediaElement))
         return paintMediaButton(paintInfo.context, rect, mediaPlayDisabled);
 
-    return paintMediaButton(paintInfo.context, rect, mediaElement-&gt;paused() ? mediaPlay : mediaPause);
+    return paintMediaButton(paintInfo.context, rect, mediaElement-&gt;canPlay() ? mediaPlay : mediaPause);
 }
 
 static Image* getMediaSliderThumb()
pranavk@pranavk-l1:/usr/local/google/home/pranavk/chrome/src/third_party/WebKit/WebCore$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255031</commentid>
    <comment_count>1</comment_count>
      <attachid>62352</attachid>
    <who name="Pranav Kedia">pranavk</who>
    <bug_when>2010-07-22 15:57:50 -0700</bug_when>
    <thetext>Created attachment 62352
Proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255082</commentid>
    <comment_count>2</comment_count>
      <attachid>62363</attachid>
    <who name="Pranav Kedia">pranavk</who>
    <bug_when>2010-07-22 17:06:30 -0700</bug_when>
    <thetext>Created attachment 62363
New patch based on feedback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255086</commentid>
    <comment_count>3</comment_count>
      <attachid>62363</attachid>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2010-07-22 17:13:31 -0700</bug_when>
    <thetext>Comment on attachment 62363
New patch based on feedback.

&gt; Index: rendering/RenderMediaControlsChromium.cpp

It seems the patch was created while current directory was different from the root WebKit one. I&apos;m not sure commit-queue will be able to deal with it.
Please re-submit patch created from WebKit root (where WebCore is a subdir)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255113</commentid>
    <comment_count>4</comment_count>
    <who name="Pranav Kedia">pranavk</who>
    <bug_when>2010-07-22 17:44:24 -0700</bug_when>
    <thetext>This proposed fix has been taken from the function MediaControlPlayButtonElement::updateDisplayType() in http://trac.webkit.org/browser/trunk/WebCore/rendering/MediaControlElements.cpp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256281</commentid>
    <comment_count>5</comment_count>
      <attachid>62620</attachid>
    <who name="Pranav Kedia">pranavk</who>
    <bug_when>2010-07-26 15:25:04 -0700</bug_when>
    <thetext>Created attachment 62620
New revised patch after fresh enlistment in WebKit. The path issues should be resolved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256587</commentid>
    <comment_count>6</comment_count>
      <attachid>62620</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-07-27 07:50:58 -0700</bug_when>
    <thetext>Comment on attachment 62620
New revised patch after fresh enlistment in WebKit. The path issues should be resolved.

Nice.  Thanks.  Do we need to update the test_expectations.txt?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256600</commentid>
    <comment_count>7</comment_count>
      <attachid>62620</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-07-27 08:06:30 -0700</bug_when>
    <thetext>Comment on attachment 62620
New revised patch after fresh enlistment in WebKit. The path issues should be resolved.

Clearing flags on attachment: 62620

Committed r64128: &lt;http://trac.webkit.org/changeset/64128&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>256601</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-07-27 08:06:35 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>62352</attachid>
            <date>2010-07-22 15:57:50 -0700</date>
            <delta_ts>2010-07-22 17:06:30 -0700</delta_ts>
            <desc>Proposed patch.</desc>
            <filename>Bug42677Patch.txt</filename>
            <type>text/plain</type>
            <size>1541</size>
            <attacher name="Pranav Kedia">pranavk</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDYzOTE3
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTkgQEAKKzIwMTAtMDct
MjIgIFByYW5hdiBLZWRpYSAgPHByYW5hdmtAY2hyb21pdW0ub3JnPgorCisgICAgICAgIFJldmll
d2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIENocm9tZSBicm93c2VyIEJ1ZzogUGF1
c2UgYnV0dG9uIHN0YXlzIHdoZW4gPGF1ZGlvPiBoaXRzIGVuZAorICAgICAgICBodHRwczovL2J1
Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NDI2NzcKKworICAgICAgICBUaGUgY2hhbmdl
IGlzIGp1c3QgaW4gY2hyb21pdW0gbWVkaWEuIFRlc3RlZCB1c2luZyBtZWRpYSBwYXJ0IG9mCisJ
V2ViS2l0IGxheW91dCB0ZXN0cy4gQWxsIHBhc3NpbmcgdGVzdHMgcGFzcy4gVGhlIGZvbGxvd2lu
ZyB0ZXN0IHRoYXQKKwl3YXMgZmFpbGluZyBpcyBhbHNvIHBhc3NpbmcuCisJbWVkaWEvdmlkZW8t
ZHVyYXRpb24ta25vd24tYWZ0ZXItZW9zLmh0bWwgLT4gdW5leHBlY3RlZCBwYXNzCisKKyAgICAg
ICAgKiAuLi8uLi8uLi9yZW5kZXJpbmcvUmVuZGVyTWVkaWFDb250cm9sc0Nocm9taXVtLmNwcDoK
KwlVc2luZyBtZWRpYUVsZW1lbnQtPmNhblB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WIo
KQo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>62363</attachid>
            <date>2010-07-22 17:06:30 -0700</date>
            <delta_ts>2010-07-26 15:25:04 -0700</delta_ts>
            <desc>New patch based on feedback.</desc>
            <filename>Bug42677Patch_2.txt</filename>
            <type>text/plain</type>
            <size>1532</size>
            <attacher name="Pranav Kedia">pranavk</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDYzOTE3
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTggQEAKKzIwMTAtMDct
MjIgIFByYW5hdiBLZWRpYSAgPHByYW5hdmtAY2hyb21pdW0ub3JnPgorCisgICAgICAgIFJldmll
d2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIENocm9taXVtIEJ1ZzogUGF1c2UgYnV0
dG9uIHN0YXlzIHdoZW4gPGF1ZGlvPiBoaXRzIGVuZAorICAgICAgICBodHRwczovL2J1Z3Mud2Vi
a2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NDI2NzcKKworICAgICAgICBUaGUgY2hhbmdlIGlzIGp1
c3QgaW4gY2hyb21pdW0gbWVkaWEuIFRlc3RlZCB1c2luZyBtZWRpYSBwYXJ0IG9mCisgICAgICAg
IFdlYktpdCBsYXlvdXQgdGVzdHMuIFRoZSBmb2xsb3dpbmcgdGVzdCB0aGF0IHdhcyBmYWlsaW5n
IGlzIHBhc3NpbmcuCisgICAgICAgIG1lZGlhL3ZpZGVvLWR1cmF0aW9uLWtub3duLWFmdGVyLWVv
cy5odG1sIC0+IHVuZXhwZWN0ZWQgcGFzcworCisgICAgICAgICogLi4vLi4vLi4vcmVuZGVyaW5n
L1JlbmRlck1l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GlhUGxheSA6IG1lZGlh
UGF1c2UpOwogfQogCiBzdGF0aWMgSW1hZ2UqIGdldE1lZGlhU2xpZGVyVGh1bWIoKQo=
</data>
<flag name="review"
          id="50541"
          type_id="1"
          status="-"
          setter="dimich"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>62620</attachid>
            <date>2010-07-26 15:25:04 -0700</date>
            <delta_ts>2010-07-27 08:06:30 -0700</delta_ts>
            <desc>New revised patch after fresh enlistment in WebKit. The path issues should be resolved.</desc>
            <filename>Bug42677Patch3.txt</filename>
            <type>text/plain</type>
            <size>1622</size>
            <attacher name="Pranav Kedia">pranavk</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2NDA4MCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTkgQEAKKzIwMTAtMDctMjYgIFByYW5hdiBLZWRpYSAgPHByYW5hdmtAY2hyb21p
dW0ub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IENocm9tZSBicm93c2VyIEJ1ZzogUGF1c2UgYnV0dG9uIHN0YXlzIHdoZW4gPGF1ZGlvPiBoaXRz
IGVuZAorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NDI2
NzcKKworICAgICAgICBUaGUgY2hhbmdlIGlzIGp1c3QgaW4gY2hyb21pdW0gbWVkaWEuIFRlc3Rl
ZCB1c2luZyBtZWRpYSBwYXJ0IG9mCisgICAgICAgIFdlYktpdCBsYXlvdXQgdGVzdHMuIFRoZSBm
b2xsb3dpbmcgdGV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tZWRpYVBsYXlEaXNhYmxlZCk7
CiAKLSAgICByZXR1cm4gcGFpbnRNZWRpYUJ1dHRvbihwYWludEluZm8uY29udGV4dCwgcmVjdCwg
bWVkaWFFbGVtZW50LT5wYXVzZWQoKSA/IG1lZGlhUGxheSA6IG1lZGlhUGF1c2UpOworICAgIHJl
dHVybiBwYWludE1lZGlhQnV0dG9uKHBhaW50SW5mby5jb250ZXh0LCByZWN0LCBtZWRpYUVsZW1l
bnQtPmNhblBsYXkoKSA/IG1lZGlhUGxheSA6IG1lZGlhUGF1c2UpOwogfQogCiBzdGF0aWMgSW1h
Z2UqIGdldE1lZGlhU2xpZGVyVGh1bWIoKQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>