Title: [218268] trunk/Source/WebCore
- Revision
- 218268
- Author
- [email protected]
- Date
- 2017-06-14 10:32:48 -0700 (Wed, 14 Jun 2017)
Log Message
Flaky Test: media/media-source/media-source-unnecessary-seek-seeked.html
https://bugs.webkit.org/show_bug.cgi?id=173344
Reviewed by Eric Carlson.
Separate the concept of "the page has asked us to seek" from "we have asked the
media player to seek". When the media engine tells us its ready state has changed
after the page has requested a seek, but before the media element has asked its
player to perform the seek, we were previously firing a seeked event. Now we'll
check this new ivar and see that we aren't expecting a seek to finish yet.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::setReadyState):
(WebCore::HTMLMediaElement::finishSeek):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
* html/HTMLMediaElement.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (218267 => 218268)
--- trunk/Source/WebCore/ChangeLog 2017-06-14 17:22:42 UTC (rev 218267)
+++ trunk/Source/WebCore/ChangeLog 2017-06-14 17:32:48 UTC (rev 218268)
@@ -1,3 +1,23 @@
+2017-06-14 Jer Noble <[email protected]>
+
+ Flaky Test: media/media-source/media-source-unnecessary-seek-seeked.html
+ https://bugs.webkit.org/show_bug.cgi?id=173344
+
+ Reviewed by Eric Carlson.
+
+ Separate the concept of "the page has asked us to seek" from "we have asked the
+ media player to seek". When the media engine tells us its ready state has changed
+ after the page has requested a seek, but before the media element has asked its
+ player to perform the seek, we were previously firing a seeked event. Now we'll
+ check this new ivar and see that we aren't expecting a seek to finish yet.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::HTMLMediaElement):
+ (WebCore::HTMLMediaElement::setReadyState):
+ (WebCore::HTMLMediaElement::finishSeek):
+ (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
+ * html/HTMLMediaElement.h:
+
2017-06-14 Matt Lewis <[email protected]>
Unreviewed, rolling out r218157.
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (218267 => 218268)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-14 17:22:42 UTC (rev 218267)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2017-06-14 17:32:48 UTC (rev 218268)
@@ -415,6 +415,7 @@
, m_initiallyMuted(false)
, m_paused(true)
, m_seeking(false)
+ , m_seekRequested(false)
, m_sentStalledEvent(false)
, m_sentEndEvent(false)
, m_pausedInternal(false)
@@ -2363,7 +2364,7 @@
scheduleEvent(eventNames().waitingEvent);
// 4.8.10.10 step 14 & 15.
- if (!m_player->seeking() && m_readyState >= HAVE_CURRENT_DATA)
+ if (m_seekRequested && !m_player->seeking() && m_readyState >= HAVE_CURRENT_DATA)
finishSeek();
} else {
if (wasPotentiallyPlaying && m_readyState < HAVE_FUTURE_DATA) {
@@ -2755,6 +2756,7 @@
scheduleEvent(eventNames().seekingEvent);
// 11 - Set the current playback position to the given new playback position
+ m_seekRequested = true;
m_player->seekWithTolerance(time, negativeTolerance, positiveTolerance);
// 12 - Wait until the user agent has established whether or not the media data for the new playback
@@ -2765,6 +2767,7 @@
void HTMLMediaElement::clearSeeking()
{
m_seeking = false;
+ m_seekRequested = false;
m_pendingSeekType = NoSeek;
invalidateCachedTime();
}
@@ -4418,7 +4421,7 @@
bool wasSeeking = seeking();
// 4.8.10.9 step 14 & 15. Needed if no ReadyState change is associated with the seek.
- if (m_seeking && m_readyState >= HAVE_CURRENT_DATA && !m_player->seeking())
+ if (m_seekRequested && m_readyState >= HAVE_CURRENT_DATA && !m_player->seeking())
finishSeek();
// Always call scheduleTimeupdateEvent when the media engine reports a time discontinuity,
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (218267 => 218268)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2017-06-14 17:22:42 UTC (rev 218267)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2017-06-14 17:32:48 UTC (rev 218268)
@@ -995,6 +995,7 @@
bool m_initiallyMuted : 1;
bool m_paused : 1;
bool m_seeking : 1;
+ bool m_seekRequested : 1;
// data has not been loaded since sending a "stalled" event
bool m_sentStalledEvent : 1;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes