diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
commit | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (patch) | |
tree | cdca40d0353886b3ca52f33a2d7b8f1c0011aafc /Source/WebCore/dom/DOMImplementation.cpp | |
parent | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (diff) | |
download | qtwebkit-8d473cf9743f1d30a16a27114e93bd5af5648d23.tar.gz |
Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578)
Weekly snapshot
Diffstat (limited to 'Source/WebCore/dom/DOMImplementation.cpp')
-rw-r--r-- | Source/WebCore/dom/DOMImplementation.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/WebCore/dom/DOMImplementation.cpp b/Source/WebCore/dom/DOMImplementation.cpp index 66ea0dcab..c42118409 100644 --- a/Source/WebCore/dom/DOMImplementation.cpp +++ b/Source/WebCore/dom/DOMImplementation.cpp @@ -67,6 +67,24 @@ static void addString(FeatureSet& set, const char* string) set.add(string); } +#if ENABLE(VIDEO) +class DOMImplementationSupportsTypeClient : public MediaPlayerSupportsTypeClient { +public: + DOMImplementationSupportsTypeClient(bool needsHacks, const String& host) + : m_needsHacks(needsHacks) + , m_host(host) + { + } + +private: + virtual bool mediaPlayerNeedsSiteSpecificHacks() const OVERRIDE { return m_needsHacks; } + virtual String mediaPlayerDocumentHost() const OVERRIDE { return m_host; } + + bool m_needsHacks; + String m_host; +}; +#endif + #if ENABLE(SVG) static bool isSVG10Feature(const String &feature, const String &version) @@ -387,7 +405,8 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame #if ENABLE(VIDEO) // Check to see if the type can be played by our MediaPlayer, if so create a MediaDocument // Key system is not applicable here. - if (MediaPlayer::supportsType(ContentType(type), String())) + DOMImplementationSupportsTypeClient client(frame && frame->settings() && frame->settings()->needsSiteSpecificQuirks(), url.host()); + if (MediaPlayer::supportsType(ContentType(type), String(), &client)) return MediaDocument::create(frame, url); #endif |