HTMLMediaElement should fire 'progress' event before 'idle' if it was previously...
authorvrk@chromium.org <vrk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 01:19:29 +0000 (01:19 +0000)
committervrk@chromium.org <vrk@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 01:19:29 +0000 (01:19 +0000)
commitc1a36aa69cdd96de45c0517014100786f1633f24
tree6fe6a3f80e19aed70450a33e3cd78703e932dc69
parent85d3939fadf6cb9377a60b340608f5b928ff4383
HTMLMediaElement should fire 'progress' event before 'idle' if it was previously loading
https://bugs.webkit.org/show_bug.cgi?id=76568

Reviewed by Eric Carlson.

This fires a progress event when going from a non-empty state to idle,
for the same reason that a progress event is fired when going from a
non-idle state to loaded. Also consolidated logic in a single helper method.

No new tests because the decision of if/when a user agent sets the network state
to idle is up to the user agent in this scenario.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setNetworkState):
(WebCore::HTMLMediaElement::changeNetworkStateFromLoadingToIdle):
* html/HTMLMediaElement.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h