2010-03-04 Eric Carlson <eric.carlson@apple.com>
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Mar 2010 17:13:50 +0000 (17:13 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Mar 2010 17:13:50 +0000 (17:13 +0000)
commit913d559fca4ca474cb9c7570c4e2b96f708d1fa3
treee98d0d0ca161e9ed93bed6450d0917bf8682b628
parent334754403173b7e1b135b030fde268d98d4e07ae
2010-03-04  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Adele Peterson.

        <rdar://problem/7718442> Implement 'preload=none'
        https://bugs.webkit.org/show_bug.cgi?id=35789

        Don't load any media data when preload is 'none'.

        Test: media/video-preload.html

        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::loadResource): Don't call player's setPreload method
            when autoplay is set.

        * platform/graphics/MediaPlayer.cpp:
        (WebCore::MediaPlayer::setPreload): Set m_preload so we have the correct value when
            the media engine is created.

        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_preload.
        (WebCore::MediaPlayerPrivate::resumeLoad): New, kick off postponed a load.
        (WebCore::MediaPlayerPrivate::load): Do nothing if preload is 'none'
        (WebCore::MediaPlayerPrivate::loadInternal): New, complete loading.
        (WebCore::MediaPlayerPrivate::prepareToPlay): New, resume a postponed load as someone
            has called play().
        (WebCore::MediaPlayerPrivate::setPreload): New, set m_preload.

2010-03-04  Eric Carlson  <eric.carlson@apple.com>

        Reviewed by Adele Peterson.

        <rdar://problem/7718442> Implement 'preload=none'
        https://bugs.webkit.org/show_bug.cgi?id=35789

        Functional test of the 'proload' attribute.

        * media/video-preload-expected.txt: Added.
        * media/video-preload.html: Added.
        * platform/win/Skipped: Skip on Windows for now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@55587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/video-preload-expected.txt [new file with mode: 0644]
LayoutTests/media/video-preload.html [new file with mode: 0644]
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/html/HTMLMediaElement.cpp
WebCore/platform/graphics/MediaPlayer.cpp
WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm