• eric.carlson@apple.com's avatar
    Allow MediaSessionManager to restrict 'preload' behavior · 7cadf18b
    eric.carlson@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=127297
    
    Reviewed by Jer Noble.
    
    Source/WebCore: 
    
    Tests: media/video-restricted-no-preload-auto.html
           media/video-restricted-no-preload-metadata.html
    
    * html/HTMLMediaElement.cpp:
    (WebCore::HTMLMediaElement::parseAttribute): Apply restrictions to preload attribute before
        passing to media engine.
    (WebCore::HTMLMediaElement::loadResource): Ditto.
    
    * html/HTMLMediaSession.cpp:
    (WebCore::HTMLMediaSession::effectivePreloadForElement): New, limit preload according to restrictions.
    * html/HTMLMediaSession.h:
    
    * platform/audio/MediaSessionManager.h:
    * platform/audio/ios/MediaSessionManagerIOS.mm:
    (WebCore::MediaSessionManageriOS::resetRestrictions): Limit preload to metadata only. Drive-by
        static deviceClass initialization cleanup.
    
    * testing/Internals.cpp:
    (WebCore::Internals::setMediaSessionRestrictions): Support MetadataPreloadingNotPermitted and
        AutoPreloadingNotPermitted.
    
    LayoutTests: 
    
    * media/video-restricted-no-preload-auto-expected.txt: Added.
    * media/video-restricted-no-preload-auto.html: Added.
    * media/video-restricted-no-preload-metadata-expected.txt: Added.
    * media/video-restricted-no-preload-metadata.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7cadf18b
Name
Last commit
Last update
..
js Loading commit data...
InternalSettings.cpp Loading commit data...
InternalSettings.h Loading commit data...
InternalSettings.idl Loading commit data...
Internals.cpp Loading commit data...
Internals.h Loading commit data...
Internals.idl Loading commit data...
MallocStatistics.h Loading commit data...
MallocStatistics.idl Loading commit data...
MemoryInfo.h Loading commit data...
MemoryInfo.idl Loading commit data...
MockCDM.cpp Loading commit data...
MockCDM.h Loading commit data...
TypeConversions.h Loading commit data...
TypeConversions.idl Loading commit data...
WebCoreTestShimLibrary.cpp Loading commit data...