Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index 4da8ea7bc447051a7ee714c4d5aff3c817e1cfc7..381668f1b47a2bcc5c65deb24e3fb44822ca41ca 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -1718,7 +1718,11 @@ void HTMLMediaElement::seek(double time, ExceptionState& exceptionState) |
// 3 - Set the seeking IDL attribute to true. |
// The flag will be cleared when the engine tells us the time has actually changed. |
- m_seeking = true; |
+ bool seekPending = false; |
acolwell GONE FROM CHROMIUM
2014/04/16 15:33:13
nit: Just assign m_seeking to seekPending here and
|
+ if (m_seeking) |
+ seekPending = true; |
+ else |
+ m_seeking = true; |
// 5 - If the new playback position is later than the end of the media resource, then let it be the end |
// of the media resource instead. |
@@ -1758,6 +1762,10 @@ void HTMLMediaElement::seek(double time, ExceptionState& exceptionState) |
if (noSeekRequired) { |
if (time == now) { |
scheduleEvent(EventTypeNames::seeking); |
+ // An old seek event is still in progress for the same time value, so return from here |
+ // and let media engine process it and update the status |
+ if (seekPending) |
+ return; |
// FIXME: There must be a stable state before timeupdate+seeked are dispatched and seeking |
// is reset to false. See http://crbug.com/266631 |
scheduleTimeupdateEvent(false); |