Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Issue 6581012: Fix progress event not firing when load has completed. (Closed)

Created:
9 years, 10 months ago by sjl
Modified:
9 years, 7 months ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, annacc, darin-cc_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=75985

Patch Set 1 #

Patch Set 2 : Only change state to 'loaded' if we were previously 'loading'. #

Total comments: 4

Patch Set 3 : Move change of state inside check for download completion. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M webkit/glue/webmediaplayer_impl.cc View 1 2 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
sjl
9 years, 10 months ago (2011-02-24 00:20:09 UTC) #1
acolwell GONE FROM CHROMIUM
LGTM
9 years, 10 months ago (2011-02-24 00:43:32 UTC) #2
sjl
On 2011/02/24 00:43:32, acolwell wrote: > LGTM Thanks - pls take a look at the ...
9 years, 10 months ago (2011-02-24 00:51:03 UTC) #3
acolwell GONE FROM CHROMIUM
http://codereview.chromium.org/6581012/diff/2001/webkit/glue/webmediaplayer_impl.cc File webkit/glue/webmediaplayer_impl.cc (right): http://codereview.chromium.org/6581012/diff/2001/webkit/glue/webmediaplayer_impl.cc#newcode832 webkit/glue/webmediaplayer_impl.cc:832: SetNetworkState(WebKit::WebMediaPlayer::Loaded); Shouldn't this be inside the condition with the ...
9 years, 10 months ago (2011-02-24 19:19:08 UTC) #4
sjl
Thx for the review. Comments addressed... http://codereview.chromium.org/6581012/diff/2001/webkit/glue/webmediaplayer_impl.cc File webkit/glue/webmediaplayer_impl.cc (right): http://codereview.chromium.org/6581012/diff/2001/webkit/glue/webmediaplayer_impl.cc#newcode832 webkit/glue/webmediaplayer_impl.cc:832: SetNetworkState(WebKit::WebMediaPlayer::Loaded); On 2011/02/24 ...
9 years, 10 months ago (2011-02-24 21:24:41 UTC) #5
acolwell GONE FROM CHROMIUM
got it. LGTM. On 2011/02/24 21:24:41, sjl wrote: > Thx for the review. Comments addressed... ...
9 years, 10 months ago (2011-02-24 21:38:40 UTC) #6
jamesr
I'm pretty sure this broke http/tests/media/video-play-suspend.html: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=http%2Ftests%2Fmedia%2Fvideo-play-suspend.html&group=%40ToT%20-%20chromium.org
9 years, 10 months ago (2011-02-25 00:08:23 UTC) #7
sjl
9 years, 10 months ago (2011-02-25 00:44:13 UTC) #8
On 2011/02/25 00:08:23, jamesr wrote:
> I'm pretty sure this broke http/tests/media/video-play-suspend.html:
>
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=htt...

As per my IM, the layout test seems bust.

It is checking for a suspend event, which is as per spec gets fired when the the
network stops loading, but hasn't completed loading all the data.

This event is fired by webkit when the mediaplayer transitions from loading ->
idle, which we would previously do (incorrectly) when we've finished loading all
data.

The correct transition is loading -> loaded -> idle (which this cl does), which
causes a progress event to be fired on the loaded transistion (as per spec), but
a 'suspend' event is not fired as the we haven't suspended loading (again, as
per spec).

Running the same test under safari generates the same (new) behaviour as chrome
- the test hangs...

Therefore, the test looks busted...

Powered by Google App Engine
This is Rietveld 408576698