-
jer.noble@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=40382 Reviewed by Eric Carlson. Source/WebCore: Test: http/tests/media/video-auth.html Adopt a new AVFoundation API to handle authentication challenge generated while loading media through an AVAsset. The authentication request comes through as a NSURLAuthenticationChallenge, and is wrapped in a WebCore::AuthenticationChallenge by MediaPlayerPrivateAVFoundationObjC, and is sent up to the HTMLMediaElement to handle. The HTMLMediaElement creates a ResourceRequest, and passes the challenge up to the ResourceLoadNotifier. To allow the HTMLMediaElement to initiate handling an AuthenticationChallenge without actually creating a ResourceLoader, allow ResourceLoaderDelegate to accept a unique identifier and a DocumentLoader in lieu of a ResourceLoader. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLMediaElement.h: * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge): (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge): * loader/ResourceLoadNotifier.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerShouldWaitForResponseToAuthenticationChallenge): * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge): (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForResponseToAuthenticationChallenge:]): LayoutTests: * http/tests/media/resources/video-auth.php: Added. * http/tests/media/video-auth-expected.txt: Added. * http/tests/media/video-auth.html: Added. * platform/mac/TestExpectations: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
f628b340