Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 9c001f5f1ccb05d5aecf15b6d685fd7ed57d5885..c528dc755f113055f5eb9dd493c2680d05d4a064 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -355,6 +355,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
| , m_tracksAreReady(true) |
| , m_haveVisibleTextTrack(false) |
| , m_processingPreferenceChange(false) |
| + , m_jumped(false) |
| #if ENABLE(OILPAN) |
| , m_isFinalizing(false) |
| , m_closeMediaSourceWhenFinalizing(false) |
| @@ -1824,8 +1825,10 @@ void HTMLMediaElement::setReadyState(ReadyState state) |
| scheduleEvent(EventTypeNames::resize); |
| scheduleEvent(EventTypeNames::loadedmetadata); |
| + m_jumped = false; |
| if (m_defaultPlaybackStartPosition > 0) { |
| seek(m_defaultPlaybackStartPosition); |
| + m_jumped = true; |
| m_defaultPlaybackStartPosition = 0; |
| } |
| @@ -1842,7 +1845,8 @@ void HTMLMediaElement::setReadyState(ReadyState state) |
| shouldUpdateDisplayState = true; |
| scheduleEvent(EventTypeNames::loadeddata); |
| setShouldDelayLoadEvent(false); |
| - applyMediaFragmentURI(); |
| + if (!m_jumped) |
| + applyMediaFragmentURI(); |
|
amogh.bihani
2014/09/04 13:44:18
Could you help me understand why this is here? I m
philipj_slow
2014/09/04 13:46:45
Sorry, I didn't see this comment at first. You're
|
| } |
| bool isPotentiallyPlaying = potentiallyPlaying(); |
| @@ -3898,10 +3902,13 @@ void HTMLMediaElement::prepareMediaFragmentURI() |
| void HTMLMediaElement::applyMediaFragmentURI() |
| { |
| + ASSERT(!m_jumped); |
| + |
| if (m_fragmentStartTime != MediaPlayer::invalidTime()) { |
| m_sentEndEvent = false; |
| UseCounter::count(document(), UseCounter::HTMLMediaElementSeekToFragmentStart); |
| seek(m_fragmentStartTime); |
| + m_jumped = true; |
| } |
| } |