Html5 video element Useragent string is Quicktime
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Mar 2012 21:26:03 +0000 (21:26 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Mar 2012 21:26:03 +0000 (21:26 +0000)
commitf9b3383d24e32e252118c39f5807b15e8b88a607
tree0b521927f5f979717a3b8fa6d92efa9c08ff70e2
parent7b9c6b7e66a8cc1cfcd1a2d7c693710665deef6b
Html5 video element Useragent string is Quicktime
https://bugs.webkit.org/show_bug.cgi?id=46241

Reviewed by Daniel Bates.

Source/WebCore:

Test: http/tests/media/video-useragent.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerUserAgent): Return the UA string for the current source.
* html/HTMLMediaElement.h:

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::userAgent):  New, return the client's mediaPlayerUserAgent.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerUserAgent):

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Tell AVFoundation to set
    the UA header.

LayoutTests:

* http/tests/media/resources/serve-video.php: Added.
* http/tests/media/resources/video-check-useragent.php: Added.
* http/tests/media/resources/video-referer-check-referer.php: Split media loading logic
    out into serve-video.php.
* http/tests/media/video-useragent-expected.txt: Added.
* http/tests/media/video-useragent.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/media/resources/serve-video.php [new file with mode: 0644]
LayoutTests/http/tests/media/resources/video-check-useragent.php [new file with mode: 0644]
LayoutTests/http/tests/media/resources/video-referer-check-referer.php
LayoutTests/http/tests/media/video-useragent-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/video-useragent.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm