Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index c1c66cca9ea6eec7f6c2b117973ca2c2a5a3c457..812c082e7bfd0e379662f98c467887d141ef52a5 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -1607,13 +1607,11 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state) |
| } |
| if (m_readyState == HAVE_ENOUGH_DATA && oldState < HAVE_ENOUGH_DATA && tracksAreReady) { |
| - if (oldState <= HAVE_CURRENT_DATA) |
| + if (oldState <= HAVE_CURRENT_DATA) { |
| scheduleEvent(EventTypeNames::canplay); |
| - |
| - scheduleEvent(EventTypeNames::canplaythrough); |
| - |
| - if (isPotentiallyPlaying && oldState <= HAVE_CURRENT_DATA) |
| - scheduleEvent(EventTypeNames::playing); |
| + if (isPotentiallyPlaying) |
|
philipj_slow
2014/02/18 16:50:19
This should actually be m_paused, but I haven't in
acolwell GONE FROM CHROMIUM
2014/02/18 18:30:37
I'm assuming you mean this should be !m_paused rig
philipj_slow
2014/02/19 03:10:05
Yes, indeed.
|
| + scheduleEvent(EventTypeNames::playing); |
| + } |
| if (m_autoplaying && m_paused && autoplay() && !document().isSandboxed(SandboxAutomaticFeatures) && !userGestureRequiredForPlay()) { |
| m_paused = false; |
| @@ -1622,6 +1620,8 @@ void HTMLMediaElement::setReadyState(MediaPlayer::ReadyState state) |
| scheduleEvent(EventTypeNames::playing); |
| } |
| + scheduleEvent(EventTypeNames::canplaythrough); |
| + |
| shouldUpdateDisplayState = true; |
| } |