-
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