Title: [161973] trunk/Source/WebCore
- Revision
- 161973
- Author
- [email protected]
- Date
- 2014-01-14 08:41:48 -0800 (Tue, 14 Jan 2014)
Log Message
HTMLMediaElement::potentiallyPlaying can be more simple.
https://bugs.webkit.org/show_bug.cgi?id=111
Patch by Piotr Grad <[email protected]> on 2014-01-14
Reviewed by Eric Carlson.
Tests: No new tests, just refactorings.
_expression_ is simplified because the first 'if' statement depends on the same condition
as pausedToBuffer value.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (161972 => 161973)
--- trunk/Source/WebCore/ChangeLog 2014-01-14 16:29:53 UTC (rev 161972)
+++ trunk/Source/WebCore/ChangeLog 2014-01-14 16:41:48 UTC (rev 161973)
@@ -1,3 +1,18 @@
+2014-01-14 Piotr Grad <[email protected]>
+
+ HTMLMediaElement::potentiallyPlaying can be more simple.
+ https://bugs.webkit.org/show_bug.cgi?id=111
+
+ Reviewed by Eric Carlson.
+
+ Tests: No new tests, just refactorings.
+
+ _expression_ is simplified because the first 'if' statement depends on the same condition
+ as pausedToBuffer value.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::parseAttribute):
+
2014-01-14 Andreas Kling <[email protected]>
Remove deprecated DeferrableOneShotTimer constructor.
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (161972 => 161973)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-01-14 16:29:53 UTC (rev 161972)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2014-01-14 16:41:48 UTC (rev 161973)
@@ -4107,12 +4107,8 @@
bool HTMLMediaElement::potentiallyPlaying() const
{
- // "pausedToBuffer" means the media engine's rate is 0, but only because it had to stop playing
- // when it ran out of buffered data. A movie is this state is "potentially playing", modulo the
- // checks in couldPlayIfEnoughData().
- bool pausedToBuffer = m_readyStateMaximum >= HAVE_FUTURE_DATA && m_readyState < HAVE_FUTURE_DATA;
-
- if (!pausedToBuffer && m_readyState < HAVE_FUTURE_DATA)
+ // When media engine ran out of buffered data it's not playing.
+ if (m_readyStateMaximum < HAVE_FUTURE_DATA && m_readyState < HAVE_FUTURE_DATA)
return false;
return couldPlayIfEnoughData() && !isBlockedOnMediaController();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes