2011-03-23 Jer Noble <jer.noble@apple.com>
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Mar 2011 00:58:22 +0000 (00:58 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Mar 2011 00:58:22 +0000 (00:58 +0000)
commit27c439c3a76e27f90289c0fef28b3f2abb2bc504
treef4845f96a4e50942b6cc9d5b4a06c41197b06d41
parent8e1d583efa227cb096d8b2de53fb4caa710b561f
2011-03-23  Jer Noble  <jer.noble@apple.com>

        Reviewed by Simon Fraser.

        Scrubbing <video> with HTTP Live Stream resizes element to 0x0
        https://bugs.webkit.org/show_bug.cgi?id=55702

        QTKit will occasionally set the natural size of a QTMovie to 0x0 while scrubbing
        an HTTP Live Stream.  So we will cache the last valid value returned by QTKit
        and use that as our naturalSize until a new valid value is returned.

        Unfortunately, QTKit will also fail to generate a notification when the natural size
        changes, so we are forced to cache the natural size from within naturalSize(), which
        is a const function, necessitating a const_cast to set m_cachedNaturalSize.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Added m_cachedNaturalSize.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): Initialize m_cachedNaturalSize.
        (WebCore::MediaPlayerPrivateQTKit::naturalSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm