Changeset 164296 in webkit


Ignore:
Timestamp:
Feb 18, 2014, 10:43:49 AM (11 years ago)
Author:
eric.carlson@apple.com
Message:

Do not cache media time until media engine returns a non-zero value
https://bugs.webkit.org/show_bug.cgi?id=128976

Reviewed by Jer Noble.

No new tests, covered by existing tests.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::refreshCachedTime): Don't mark the cached time as valid

until it is non-zero.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r164294 r164296  
     12014-02-18  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Do not cache media time until media engine returns a non-zero value
     4        https://bugs.webkit.org/show_bug.cgi?id=128976
     5
     6        Reviewed by Jer Noble.
     7
     8        No new tests, covered by existing tests.
     9
     10        * html/HTMLMediaElement.cpp:
     11        (WebCore::HTMLMediaElement::refreshCachedTime): Don't mark the cached time as valid
     12            until it is non-zero.
     13
    1142014-02-18  Mihai Tica  <mitica@adobe.com>
    215
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r164174 r164296  
    24402440{
    24412441    m_cachedTime = m_player->currentTime();
     2442    if (!m_cachedTime) {
     2443        // Do not use m_cachedTime until the media engine returns a non-zero value because we can't
     2444        // estimate current time until playback actually begins.
     2445        invalidateCachedTime();
     2446        return;
     2447    }
     2448
     2449    LOG(Media, "HTMLMediaElement::refreshCachedTime - caching time %f", m_cachedTime);
    24422450    m_clockTimeAtLastCachedTimeUpdate = monotonicallyIncreasingTime();
    24432451}
    24442452
    2445 void HTMLMediaElement::invalidateCachedTime()
     2453void HTMLMediaElement::invalidateCachedTime() const
    24462454{
    24472455    LOG(Media, "HTMLMediaElement::invalidateCachedTime");
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r164174 r164296  
    654654
    655655    void setShouldDelayLoadEvent(bool);
    656     void invalidateCachedTime();
     656    void invalidateCachedTime() const;
    657657    void refreshCachedTime() const;
    658658
Note: See TracChangeset for help on using the changeset viewer.