Diff
Modified: trunk/LayoutTests/ChangeLog (88957 => 88958)
--- trunk/LayoutTests/ChangeLog 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/LayoutTests/ChangeLog 2011-06-15 17:40:03 UTC (rev 88958)
@@ -1,3 +1,16 @@
+2011-06-15 Eric Carlson <[email protected]>
+
+ Reviewed by Alexey Proskuryakov.
+
+ MediaPlayerPrivate should not know about application cache
+ https://bugs.webkit.org/show_bug.cgi?id=62648
+
+ Add test for <video> in the application cache.
+
+ * http/tests/appcache/resources/video.manifest: Added.
+ * http/tests/appcache/video-expected.txt: Added.
+ * http/tests/appcache/video.html: Added.
+
2011-06-15 Tony Chang <[email protected]>
Fixing more results with RenderDeprecatedFlexibleBot rename.
Added: trunk/LayoutTests/http/tests/appcache/resources/video.manifest (0 => 88958)
--- trunk/LayoutTests/http/tests/appcache/resources/video.manifest (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/resources/video.manifest 2011-06-15 17:40:03 UTC (rev 88958)
@@ -0,0 +1,6 @@
+CACHE MANIFEST # v1
+/media-resources/media-file.js
+/media-resources/video-test.js
+
+/media-resources/content/test.mp4
+/media-resources/content/test.ogv
Added: trunk/LayoutTests/http/tests/appcache/video-expected.txt (0 => 88958)
--- trunk/LayoutTests/http/tests/appcache/video-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/video-expected.txt 2011-06-15 17:40:03 UTC (rev 88958)
@@ -0,0 +1,16 @@
+Test that <video> can be loaded from the application cache.
+
+*** Setting 'src' to file specified in manifest. This file should load.
+
+EVENT(durationchange)
+
+*** Setting 'src' to valid media file not in manifest. This file should fail to load.
+
+EVENT(error)
+
+*** Setting 'src' to non-media file that is in manifest. This file should fail to load.
+
+EVENT(error)
+
+END OF TEST
+
Added: trunk/LayoutTests/http/tests/appcache/video.html (0 => 88958)
--- trunk/LayoutTests/http/tests/appcache/video.html (rev 0)
+++ trunk/LayoutTests/http/tests/appcache/video.html 2011-06-15 17:40:03 UTC (rev 88958)
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html manifest="resources/video.manifest">
+ <head>
+ <title>test media in the app cache</title>
+ <style>
+ video { background-color: yellow; width: 320px; height: 240px; }
+ </style>
+ <script src=""
+ <script src=""
+ <script>
+ var test;
+
+ function unexpectedEvent(event)
+ {
+ failTest(false, '<br>Unexpected "' + event.type + '" event!!');
+ }
+
+ function errorEvent()
+ {
+ consoleWrite("");
+ switch(test)
+ {
+ case 1:
+ logResult(false, "Failed loading file included in manifest!");
+ endTest();
+ break;
+ case 2:
+ test3()
+ break;
+ case 3:
+ endTest();
+ break;
+ }
+ }
+
+ function test3()
+ {
+ consoleWrite("*** Setting 'src' to non-media file that is in manifest. This file should fail to load.<br>");
+
+ test = 3;
+ video = document.getElementsByTagName('video')[0];
+ video.src = ""
+ }
+
+ function test2()
+ {
+ consoleWrite("<br>*** Setting 'src' to valid media file not in manifest. This file should fail to load.<br>");
+
+ test = 2;
+ video = document.getElementsByTagName('video')[0];
+ video.src = "" + findMediaFile("audio", "silence");
+ }
+
+ function durationchangeEvent()
+ {
+ if (test == 2) {
+ logResult(false, "<br>Loaded file NOT included in manifest!");
+ consoleWrite("");
+ endTest();
+ return;
+ }
+
+ test2();
+ }
+
+ function test1()
+ {
+ consoleWrite("*** Setting 'src' to file specified in manifest. This file should load.<br>");
+ test = 1;
+
+ waitForEvent('durationchange', durationchangeEvent);
+ waitForEvent('error', errorEvent);
+
+ video = document.getElementsByTagName('video')[0];
+ video.src = "" + findMediaFile("video", "test");
+ }
+
+ function updateready(event)
+ {
+ applicationCache.swapCache();
+ test1();
+ }
+
+ applicationCache.addEventListener("updateready", updateready, false);
+ applicationCache.addEventListener("noupdate", test1, false);
+ applicationCache.addEventListener("cached", test1, false);
+
+ applicationCache.addEventListener("obsolete", unexpectedEvent, false);
+ applicationCache.addEventListener("error", unexpectedEvent, false);
+ </script>
+
+ </head>
+ <body>
+
+ <video controls ></video>
+
+ <p>Test that <video> can be loaded from the application cache.</p>
+ </body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (88957 => 88958)
--- trunk/Source/WebCore/ChangeLog 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/ChangeLog 2011-06-15 17:40:03 UTC (rev 88958)
@@ -1,3 +1,36 @@
+2011-06-15 Eric Carlson <[email protected]>
+
+ Reviewed by Alexey Proskuryakov.
+
+ MediaPlayerPrivate should not know about application cache
+ https://bugs.webkit.org/show_bug.cgi?id=62648
+
+ Test: http/tests/appcache/video.html
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::createFileURLForApplicationCacheResource): Create a url for a file
+ in the application cache folder.
+ (WebCore::HTMLMediaElement::loadResource): Change url to point to file in the application
+ cache if necessary.
+ (WebCore::HTMLMediaElement::mediaLoadingFailed): Split failure logic out of setNetworkState
+ so it can be called when asked to load a file that is not in the application cache.
+ (WebCore::HTMLMediaElement::setNetworkState): Move failure logic out to mediaLoadingFailed.
+ * html/HTMLMediaElement.h:
+
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
+ (WebCore::MediaPlayerPrivateAVFoundation::setPreload): Remove app cache logic.
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
+
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
+ * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivateQTKit::loadInternal): Ditto.
+
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
+ (WebCore::MediaPlayerPrivateQuickTimeVisualContext::loadInternal): Ditto.
+
2011-06-15 Mark Pilgrim <[email protected]>
Reviewed by Tony Chang.
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (88957 => 88958)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2011-06-15 17:40:03 UTC (rev 88958)
@@ -28,6 +28,8 @@
#if ENABLE(VIDEO)
#include "HTMLMediaElement.h"
+#include "ApplicationCacheHost.h"
+#include "ApplicationCacheResource.h"
#include "Attribute.h"
#include "Chrome.h"
#include "ChromeClient.h"
@@ -37,6 +39,7 @@
#include "ContentType.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
+#include "DocumentLoader.h"
#include "Event.h"
#include "EventNames.h"
#include "ExceptionCode.h"
@@ -671,6 +674,21 @@
loadResource(mediaURL, contentType);
}
+#if ENABLE(OFFLINE_WEB_APPLICATIONS) && !PLATFORM(CHROMIUM)
+static KURL createFileURLForApplicationCacheResource(const String& path)
+{
+ // KURL should have a function to create a url from a path, but it does not. This function
+ // is not suitable because KURL::setPath uses encodeWithURLEscapeSequences, which it notes
+ // does not correctly escape '#' and '?'. This function works for our purposes because
+ // app cache media files are always created with encodeForFileName(createCanonicalUUIDString()).
+ KURL url;
+
+ url.setProtocol("file");
+ url.setPath(path);
+ return url;
+}
+#endif
+
void HTMLMediaElement::loadResource(const KURL& initialURL, ContentType& contentType)
{
ASSERT(isSafeToLoadURL(initialURL, Complain));
@@ -688,8 +706,32 @@
// The resource fetch algorithm
m_networkState = NETWORK_LOADING;
+#if ENABLE(OFFLINE_WEB_APPLICATIONS) && !PLATFORM(CHROMIUM)
+ // If the url should be loaded from the application cache, pass the url of the cached file
+ // to the media engine.
+ ApplicationCacheHost* cacheHost = frame->loader()->documentLoader()->applicationCacheHost();
+ ApplicationCacheResource* resource = 0;
+ if (cacheHost && cacheHost->shouldLoadResourceFromApplicationCache(ResourceRequest(url), resource)) {
+ // Resources that are not present in the manifest will always fail to load (at least, after the
+ // cache has been primed the first time), making the testing of offline applications simpler.
+ if (!resource || resource->path().isEmpty()) {
+ mediaLoadingFailed(MediaPlayer::NetworkError);
+ return;
+ }
+ }
+#endif
+
+ // Set m_currentSrc *before* changing to the cache url, the fact that we are loading from the app
+ // cache is an internal detail not exposed through the media element API.
m_currentSrc = url;
+#if ENABLE(OFFLINE_WEB_APPLICATIONS) && !PLATFORM(CHROMIUM)
+ if (resource) {
+ url = ""
+ LOG(Media, "HTMLMediaElement::loadResource - will load from app cache -> %s", urlForLogging(url).utf8().data());
+ }
+#endif
+
LOG(Media, "HTMLMediaElement::loadResource - m_currentSrc -> %s", urlForLogging(m_currentSrc).utf8().data());
if (m_sendProgressEvents)
@@ -707,7 +749,7 @@
m_player->setPreservesPitch(m_webkitPreservesPitch);
updateVolume();
- m_player->load(m_currentSrc.string(), contentType);
+ m_player->load(url.string(), contentType);
// If there is no poster to display, allow the media engine to render video frames as soon as
// they are available.
@@ -856,6 +898,42 @@
endProcessingMediaPlayerCallback();
}
+void HTMLMediaElement::mediaLoadingFailed(MediaPlayer::NetworkState state)
+{
+ stopPeriodicTimers();
+
+ // If we failed while trying to load a <source> element, the movie was never parsed, and there are more
+ // <source> children, schedule the next one
+ if (m_readyState < HAVE_METADATA && m_loadState == LoadingFromSourceElement) {
+
+ if (m_currentSourceNode)
+ m_currentSourceNode->scheduleErrorEvent();
+ else
+ LOG(Media, "HTMLMediaElement::setNetworkState - error event not sent, <source> was removed");
+
+ if (havePotentialSourceChild()) {
+ LOG(Media, "HTMLMediaElement::setNetworkState - scheduling next <source>");
+ scheduleNextSourceChild();
+ } else {
+ LOG(Media, "HTMLMediaElement::setNetworkState - no more <source> elements, waiting");
+ waitForSourceChange();
+ }
+
+ return;
+ }
+
+ if (state == MediaPlayer::NetworkError && m_readyState >= HAVE_METADATA)
+ mediaEngineError(MediaError::create(MediaError::MEDIA_ERR_NETWORK));
+ else if (state == MediaPlayer::DecodeError)
+ mediaEngineError(MediaError::create(MediaError::MEDIA_ERR_DECODE));
+ else if ((state == MediaPlayer::FormatError || state == MediaPlayer::NetworkError) && m_loadState == LoadingFromSrcAttr)
+ noneSupported();
+
+ updateDisplayState();
+ if (hasMediaControls())
+ mediaControls()->reportedError();
+}
+
void HTMLMediaElement::setNetworkState(MediaPlayer::NetworkState state)
{
LOG(Media, "HTMLMediaElement::setNetworkState(%d) - current state is %d", static_cast<int>(state), static_cast<int>(m_networkState));
@@ -867,38 +945,7 @@
}
if (state == MediaPlayer::FormatError || state == MediaPlayer::NetworkError || state == MediaPlayer::DecodeError) {
- stopPeriodicTimers();
-
- // If we failed while trying to load a <source> element, the movie was never parsed, and there are more
- // <source> children, schedule the next one
- if (m_readyState < HAVE_METADATA && m_loadState == LoadingFromSourceElement) {
-
- if (m_currentSourceNode)
- m_currentSourceNode->scheduleErrorEvent();
- else
- LOG(Media, "HTMLMediaElement::setNetworkState - error event not sent, <source> was removed");
-
- if (havePotentialSourceChild()) {
- LOG(Media, "HTMLMediaElement::setNetworkState - scheduling next <source>");
- scheduleNextSourceChild();
- } else {
- LOG(Media, "HTMLMediaElement::setNetworkState - no more <source> elements, waiting");
- waitForSourceChange();
- }
-
- return;
- }
-
- if (state == MediaPlayer::NetworkError)
- mediaEngineError(MediaError::create(MediaError::MEDIA_ERR_NETWORK));
- else if (state == MediaPlayer::DecodeError)
- mediaEngineError(MediaError::create(MediaError::MEDIA_ERR_DECODE));
- else if (state == MediaPlayer::FormatError && m_loadState == LoadingFromSrcAttr)
- noneSupported();
-
- updateDisplayState();
- if (hasMediaControls())
- mediaControls()->reportedError();
+ mediaLoadingFailed(state);
return;
}
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (88957 => 88958)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2011-06-15 17:40:03 UTC (rev 88958)
@@ -300,6 +300,7 @@
enum InvalidSourceAction { DoNothing, Complain };
bool isSafeToLoadURL(const KURL&, InvalidSourceAction);
KURL selectNextSourceChild(ContentType*, InvalidSourceAction);
+ void mediaLoadingFailed(MediaPlayer::NetworkState);
// These "internal" functions do not check user gesture restrictions.
void loadInternal();
@@ -362,13 +363,13 @@
unsigned m_previousProgress;
double m_previousProgressTime;
- // the last time a timeupdate event was sent (wall clock)
+ // The last time a timeupdate event was sent (wall clock).
double m_lastTimeUpdateEventWallTime;
- // the last time a timeupdate event was sent in movie time
+ // The last time a timeupdate event was sent in movie time.
float m_lastTimeUpdateEventMovieTime;
- // loading state
+ // Loading state.
enum LoadState { WaitingForSource, LoadingFromSrcAttr, LoadingFromSourceElement };
LoadState m_loadState;
HTMLSourceElement* m_currentSourceNode;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp (88957 => 88958)
--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp 2011-06-15 17:40:03 UTC (rev 88958)
@@ -29,8 +29,6 @@
#include "MediaPlayerPrivateAVFoundation.h"
-#include "ApplicationCacheHost.h"
-#include "ApplicationCacheResource.h"
#include "DocumentLoader.h"
#include "Frame.h"
#include "FrameView.h"
@@ -618,23 +616,8 @@
setDelayCallbacks(true);
if (m_preload >= MediaPlayer::MetaData && assetStatus() == MediaPlayerAVAssetStatusDoesNotExist) {
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- Frame* frame = m_player->frameView() ? m_player->frameView()->frame() : 0;
- ApplicationCacheHost* cacheHost = frame ? frame->loader()->documentLoader()->applicationCacheHost() : 0;
- ApplicationCacheResource* resource;
- if (cacheHost && cacheHost->shouldLoadResourceFromApplicationCache(ResourceRequest(m_assetURL), resource) && resource) {
- // AVFoundation can't open arbitrary data pointers, so if this ApplicationCacheResource doesn't
- // have a valid local path, just open the resource's original URL.
- if (resource->path().isEmpty())
- createAVAssetForURL(resource->url());
- else
- createAVAssetForCacheResource(resource);
- } else
-#endif
- createAVAssetForURL(m_assetURL);
-
+ createAVAssetForURL(m_assetURL);
createAVPlayer();
-
checkPlayability();
}
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h (88957 => 88958)
--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h 2011-06-15 17:40:03 UTC (rev 88958)
@@ -35,8 +35,6 @@
namespace WebCore {
-class ApplicationCacheResource;
-
class MediaPlayerPrivateAVFoundation : public MediaPlayerPrivateInterface {
public:
@@ -160,9 +158,6 @@
virtual void createAVAssetForURL(const String&) = 0;
virtual void createAVPlayer() = 0;
virtual void createAVPlayerItem() = 0;
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- virtual void createAVAssetForCacheResource(ApplicationCacheResource*) = 0;
-#endif
enum ItemStatus {
MediaPlayerAVPlayerItemStatusDoesNotExist,
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h (88957 => 88958)
--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h 2011-06-15 17:40:03 UTC (rev 88958)
@@ -51,8 +51,6 @@
namespace WebCore {
-class ApplicationCacheResource;
-
class MediaPlayerPrivateAVFoundationObjC : public MediaPlayerPrivateAVFoundation {
public:
~MediaPlayerPrivateAVFoundationObjC();
@@ -90,9 +88,6 @@
virtual void createAVPlayer();
virtual void createAVPlayerItem();
virtual void createAVAssetForURL(const String& url);
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- virtual void createAVAssetForCacheResource(ApplicationCacheResource*);
-#endif
virtual MediaPlayerPrivateAVFoundation::ItemStatus playerItemStatus() const;
virtual MediaPlayerPrivateAVFoundation::AssetStatus assetStatus() const;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm (88957 => 88958)
--- trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm 2011-06-15 17:40:03 UTC (rev 88958)
@@ -29,7 +29,6 @@
#import "MediaPlayerPrivateAVFoundationObjC.h"
-#import "ApplicationCacheResource.h"
#import "BlockExceptions.h"
#import "FloatConversion.h"
#import "FrameView.h"
@@ -269,27 +268,6 @@
setDelayCallbacks(false);
}
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
-void MediaPlayerPrivateAVFoundationObjC::createAVAssetForCacheResource(ApplicationCacheResource* resource)
-{
- if (m_avAsset)
- return;
-
- LOG(Media, "MediaPlayerPrivateAVFoundationObjC::createAVAssetForCacheResource(%p)", this);
-
- // AVFoundation can't open arbitrary data pointers.
- ASSERT(!resource->path().isEmpty());
-
- setDelayCallbacks(true);
-
- NSURL* localURL = [NSURL fileURLWithPath:resource->path()];
- m_avAsset.adoptNS([[AVURLAsset alloc] initWithURL:localURL options:nil]);
- m_haveCheckedPlayability = false;
-
- setDelayCallbacks(false);
-}
-#endif
-
void MediaPlayerPrivateAVFoundationObjC::createAVPlayer()
{
if (m_avPlayer)
Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h (88957 => 88958)
--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h 2011-06-15 17:40:03 UTC (rev 88958)
@@ -57,8 +57,6 @@
namespace WebCore {
-class ApplicationCacheResource;
-
class MediaPlayerPrivateQTKit : public MediaPlayerPrivateInterface {
public:
~MediaPlayerPrivateQTKit();
@@ -149,7 +147,6 @@
void createQTMovie(const String& url);
void createQTMovie(NSURL *, NSDictionary *movieAttributes);
- void createQTMovie(ApplicationCacheResource*);
enum MediaRenderingMode { MediaRenderingNone, MediaRenderingMovieView, MediaRenderingSoftwareRenderer, MediaRenderingMovieLayer };
MediaRenderingMode currentRenderingMode() const;
Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm (88957 => 88958)
--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm 2011-06-15 17:40:03 UTC (rev 88958)
@@ -29,11 +29,6 @@
#import "MediaPlayerPrivateQTKit.h"
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
-#include "ApplicationCacheHost.h"
-#include "ApplicationCacheResource.h"
-#endif
-
#import "BlockExceptions.h"
#import "DocumentLoader.h"
#import "Frame.h"
@@ -294,33 +289,6 @@
createQTMovie(cocoaURL, movieAttributes);
}
-void MediaPlayerPrivateQTKit::createQTMovie(ApplicationCacheResource* resource)
-{
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- ASSERT(resource);
-
- NSMutableDictionary *movieAttributes = commonMovieAttributes();
- [movieAttributes setObject:[NSNumber numberWithBool:YES] forKey:@"QTMovieOpenForPlaybackAttribute"];
-
- // ApplicationCacheResources can supply either a data pointer, or a path to a locally cached
- // flat file. We would prefer the path over the data, but QTKit can handle either:
- String localPath = resource->path();
- NSURL* cocoaURL = !localPath.isEmpty() ? [NSURL fileURLWithPath:localPath isDirectory:NO] : nil;
- if (cocoaURL)
- [movieAttributes setValue:cocoaURL forKey:QTMovieURLAttribute];
- else {
- NSData* movieData = resource->data()->createNSData();
- [movieAttributes setValue:movieData forKey:QTMovieDataAttribute];
- [movieData release];
- }
-
- createQTMovie(cocoaURL, movieAttributes);
-
-#else
- ASSERT_NOT_REACHED();
-#endif
-}
-
static void disableComponentsOnce()
{
static bool sComponentsDisabled = false;
@@ -682,14 +650,6 @@
[m_objcObserver.get() setDelayCallbacks:YES];
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- Frame* frame = m_player->frameView() ? m_player->frameView()->frame() : NULL;
- ApplicationCacheHost* cacheHost = frame ? frame->loader()->documentLoader()->applicationCacheHost() : NULL;
- ApplicationCacheResource* resource = NULL;
- if (cacheHost && cacheHost->shouldLoadResourceFromApplicationCache(ResourceRequest(url), resource) && resource)
- createQTMovie(resource);
- else
-#endif
createQTMovie(url);
[m_objcObserver.get() loadStateChanged:nil];
Modified: trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp (88957 => 88958)
--- trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp 2011-06-15 17:33:22 UTC (rev 88957)
+++ trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp 2011-06-15 17:40:03 UTC (rev 88958)
@@ -28,8 +28,6 @@
#if ENABLE(VIDEO)
#include "MediaPlayerPrivateQuickTimeVisualContext.h"
-#include "ApplicationCacheHost.h"
-#include "ApplicationCacheResource.h"
#include "Cookie.h"
#include "CookieJar.h"
#include "DocumentLoader.h"
@@ -374,15 +372,7 @@
m_movie = adoptRef(new QTMovie(m_movieClient.get()));
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
- Frame* frame = m_player->frameView() ? m_player->frameView()->frame() : 0;
- ApplicationCacheHost* cacheHost = frame ? frame->loader()->documentLoader()->applicationCacheHost() : 0;
- ApplicationCacheResource* resource = 0;
- if (cacheHost && cacheHost->shouldLoadResourceFromApplicationCache(ResourceRequest(url), resource) && resource && !resource->path().isEmpty())
- m_movie->load(resource->path().characters(), resource->path().length(), m_player->preservesPitch());
- else
-#endif
- m_movie->load(url.characters(), url.length(), m_player->preservesPitch());
+ m_movie->load(url.characters(), url.length(), m_player->preservesPitch());
m_movie->setVolume(m_player->volume());
}