Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
index 617bad3cd641e9a7bf1e4b5b9079f621ea4ba1c1..4ee85e57deba6dc29abc9ccd4c621223a50bd43c 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -2979,7 +2979,7 @@ void HTMLMediaElement::sourceWasRemoved(HTMLSourceElement* source) { |
} |
} |
-void HTMLMediaElement::timeChanged() { |
+void HTMLMediaElement::timeChanged(bool ended) { |
BLINK_MEDIA_LOG << "timeChanged(" << (void*)this << ")"; |
cueTimeline().updateActiveCues(currentTime()); |
@@ -2997,14 +2997,7 @@ void HTMLMediaElement::timeChanged() { |
// already posted one at the current movie time. |
scheduleTimeupdateEvent(false); |
- double now = currentTime(); |
- double dur = duration(); |
- |
- // When the current playback position reaches the end of the media resource |
- // when the direction of playback is forwards, then the user agent must follow |
- // these steps: |
- if (!std::isnan(dur) && dur && now >= dur && |
- getDirectionOfPlayback() == Forward) { |
+ if (ended) { |
// If the media element has a loop attribute specified |
if (loop()) { |
// then seek to the earliest possible position of the media resource and |