diff options
author | Steve Block <steveblock@google.com> | 2009-10-08 17:19:54 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-10-20 00:41:58 +0100 |
commit | 231d4e3152a9c27a73b6ac7badbe6be673aa3ddf (patch) | |
tree | a6c7e2d6cd7bfa7011cc39abbb436142d7a4a7c8 /WebCore/loader/appcache/ApplicationCacheHost.cpp | |
parent | e196732677050bd463301566a68a643b6d14b907 (diff) | |
download | external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.zip external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.gz external_webkit-231d4e3152a9c27a73b6ac7badbe6be673aa3ddf.tar.bz2 |
Merge webkit.org at R49305 : Automatic merge by git.
Change-Id: I8968561bc1bfd72b8923b7118d3728579c6dbcc7
Diffstat (limited to 'WebCore/loader/appcache/ApplicationCacheHost.cpp')
-rw-r--r-- | WebCore/loader/appcache/ApplicationCacheHost.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/WebCore/loader/appcache/ApplicationCacheHost.cpp b/WebCore/loader/appcache/ApplicationCacheHost.cpp index b0c9e74..751efc1 100644 --- a/WebCore/loader/appcache/ApplicationCacheHost.cpp +++ b/WebCore/loader/appcache/ApplicationCacheHost.cpp @@ -227,10 +227,13 @@ void ApplicationCacheHost::setDOMApplicationCache(DOMApplicationCache* domApplic m_domApplicationCache = domApplicationCache; } -void ApplicationCacheHost::notifyEventListener(EventID id) +void ApplicationCacheHost::notifyDOMApplicationCache(EventID id) { - if (m_domApplicationCache) - m_domApplicationCache->callEventListener(id); + if (m_domApplicationCache) { + ExceptionCode ec = 0; + m_domApplicationCache->dispatchEvent(Event::create(DOMApplicationCache::toEventType(id), false, false), ec); + ASSERT(!ec); + } } void ApplicationCacheHost::setCandidateApplicationCacheGroup(ApplicationCacheGroup* group) @@ -255,8 +258,9 @@ bool ApplicationCacheHost::shouldLoadResourceFromApplicationCache(const Resource if (!cache || !cache->isComplete()) return false; - // If the resource is not a HTTP/HTTPS GET, then abort - if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request)) + // If the resource is not to be fetched using the HTTP GET mechanism or equivalent, or if its URL has a different + // <scheme> component than the application cache's manifest, then fetch the resource normally. + if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request) || !equalIgnoringCase(request.url().protocol(), cache->manifestResource()->url().protocol())) return false; // If the resource's URL is an master entry, the manifest, an explicit entry, or a fallback entry |