summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorsjl@chromium.org <sjl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 23:12:23 +0000
committersjl@chromium.org <sjl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 23:12:23 +0000
commit25544318b54c54a369e051d9cbe5399b90ccb2bc (patch)
tree270c70bb405ff70e415c5c032651bf3449435f84 /webkit
parent74dd2037fe17e9b86b095444425dd93ac19faa4b (diff)
downloadchromium_src-25544318b54c54a369e051d9cbe5399b90ccb2bc.zip
chromium_src-25544318b54c54a369e051d9cbe5399b90ccb2bc.tar.gz
chromium_src-25544318b54c54a369e051d9cbe5399b90ccb2bc.tar.bz2
Fix progress event not firing when load has completed.
When media has fully loaded, make sure we transition through the 'loaded' network state, otherwise the progress event on final load won't be fired. There probably should be a layout test for this. Will raise an issue. BUG=59372 TEST=local handcrafted repro, media layout tests. Review URL: http://codereview.chromium.org/6581012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webmediaplayer_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
index 075439d..8e13944 100644
--- a/webkit/glue/webmediaplayer_impl.cc
+++ b/webkit/glue/webmediaplayer_impl.cc
@@ -825,8 +825,12 @@ void WebMediaPlayerImpl::OnNetworkEvent() {
// If we are inactive because we just finished receiving all the data,
// do one final repaint to show final progress.
if (bytesLoaded() == totalBytes() &&
- network_state_ != WebKit::WebMediaPlayer::Idle)
+ network_state_ != WebKit::WebMediaPlayer::Idle) {
Repaint();
+
+ SetNetworkState(WebKit::WebMediaPlayer::Loaded);
+ }
+
SetNetworkState(WebKit::WebMediaPlayer::Idle);
}
}