Changeset 58107 in webkit
- Timestamp:
- Apr 22, 2010 11:06:07 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r58103 r58107 1 2010-04-22 Eric Carlson <eric.carlson@apple.com> 2 3 Reviewed by Simon Fraser. 4 5 Do not pause movie when readyState drops below HAVE_FUTURE_DATA 6 https://bugs.webkit.org/show_bug.cgi?id=37991 7 <rdar://problem/7893937> 8 9 No new tests, we don't have infrastructure in DRT to test with streamed 10 movies. 11 12 * html/HTMLMediaElement.cpp: 13 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_readyStateMaximum. 14 (WebCore::HTMLMediaElement::prepareForLoad): Reset m_readyStateMaximum. 15 (WebCore::HTMLMediaElement::setReadyState): Maintain m_readyStateMaximum. 16 (WebCore::HTMLMediaElement::potentiallyPlaying): Also return true if the readyState was 17 previously >= HAVE_FUTURE_DATA. 18 * html/HTMLMediaElement.h: 19 1 20 2010-04-22 Zhenyao Mo <zmo@google.com> 2 21 -
trunk/WebCore/html/HTMLMediaElement.cpp
r57830 r58107 93 93 , m_networkState(NETWORK_EMPTY) 94 94 , m_readyState(HAVE_NOTHING) 95 , m_readyStateMaximum(HAVE_NOTHING) 95 96 , m_volume(1.0f) 96 97 , m_lastSeekTime(0) … … 494 495 m_networkState = NETWORK_EMPTY; 495 496 m_readyState = HAVE_NOTHING; 497 m_readyStateMaximum = HAVE_NOTHING; 496 498 m_paused = true; 497 499 m_seeking = false; … … 853 855 return; 854 856 857 if (oldState > m_readyStateMaximum) 858 m_readyStateMaximum = oldState; 859 855 860 if (m_networkState == NETWORK_EMPTY) 856 861 return; … … 1629 1634 bool HTMLMediaElement::potentiallyPlaying() const 1630 1635 { 1631 return m_readyState >= HAVE_FUTURE_DATA && couldPlayIfEnoughData(); 1636 // "pausedToBuffer" means the media engine's rate is 0, but only because it had to stop playing 1637 // when it ran out of buffered data. A movie is this state is "potentially playing", modulo the 1638 // checks in couldPlayIfEnoughData(). 1639 bool pausedToBuffer = m_readyStateMaximum >= HAVE_FUTURE_DATA && m_readyState < HAVE_FUTURE_DATA; 1640 return (pausedToBuffer || m_readyState >= HAVE_FUTURE_DATA) && couldPlayIfEnoughData(); 1632 1641 } 1633 1642 -
trunk/WebCore/html/HTMLMediaElement.h
r57109 r58107 297 297 NetworkState m_networkState; 298 298 ReadyState m_readyState; 299 ReadyState m_readyStateMaximum; 299 300 String m_currentSrc; 300 301
Note: See TracChangeset
for help on using the changeset viewer.