summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/loader/appcache
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/loader/appcache')
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp28
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h9
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h3
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.cpp60
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.h6
-rw-r--r--src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.idl11
9 files changed, 5 insertions, 121 deletions
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp
index 42f5b6a..3033718 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.cpp
@@ -81,7 +81,7 @@ void ApplicationCache::addResource(PassRefPtr<ApplicationCacheResource> resource
if (m_storageID) {
ASSERT(!resource->storageID());
- ASSERT(resource->type() & (ApplicationCacheResource::Dynamic | ApplicationCacheResource::Master));
+ ASSERT(resource->type() & ApplicationCacheResource::Master);
// Add the resource to the storage.
cacheStorage().store(resource.get(), this);
@@ -129,32 +129,6 @@ ApplicationCacheResource* ApplicationCache::resourceForRequest(const ResourceReq
return resourceForURL(request.url());
}
-unsigned ApplicationCache::numDynamicEntries() const
-{
- // FIXME: Implement
- return 0;
-}
-
-String ApplicationCache::dynamicEntry(unsigned) const
-{
- // FIXME: Implement
- return String();
-}
-
-bool ApplicationCache::addDynamicEntry(const String& url)
-{
- if (!equalIgnoringCase(m_group->manifestURL().protocol(), KURL(url).protocol()))
- return false;
-
- // FIXME: Implement (be sure to respect private browsing state).
- return true;
-}
-
-void ApplicationCache::removeDynamicEntry(const String&)
-{
- // FIXME: Implement (be sure to respect private browsing state).
-}
-
void ApplicationCache::setOnlineWhitelist(const Vector<KURL>& onlineWhitelist)
{
ASSERT(m_onlineWhitelist.isEmpty());
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h
index afdab27..9609f8d 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCache.h
@@ -65,12 +65,6 @@ public:
ApplicationCacheResource* resourceForRequest(const ResourceRequest&);
ApplicationCacheResource* resourceForURL(const String& url);
- unsigned numDynamicEntries() const;
- String dynamicEntry(unsigned index) const;
-
- bool addDynamicEntry(const String& url);
- void removeDynamicEntry(const String& url);
-
void setOnlineWhitelist(const Vector<KURL>& onlineWhitelist);
const Vector<KURL>& onlineWhitelist() const { return m_onlineWhitelist; }
bool isURLInOnlineWhitelist(const KURL&); // There is an entry in online whitelist that has the same origin as the resource's URL and that is a prefix match for the resource's URL.
@@ -103,9 +97,6 @@ private:
Vector<KURL> m_onlineWhitelist;
FallbackURLVector m_fallbackURLs;
- // While an update is in progress, changes in dynamic entries are queued for later execution.
- Vector<std::pair<KURL, bool> > m_pendingDynamicEntryActions;
-
unsigned m_storageID;
};
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp
index 48d3942..642ec61 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp
@@ -451,6 +451,7 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data()));
m_currentHandle->cancel();
m_currentHandle = 0;
+ m_pendingEntries.remove(handle->request().url());
// Load the next resource, if any.
startLoadingEntry();
return;
@@ -478,6 +479,7 @@ void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data()));
m_currentHandle->cancel();
m_currentHandle = 0;
+ m_pendingEntries.remove(handle->request().url());
// Load the next resource, if any.
startLoadingEntry();
}
@@ -631,7 +633,7 @@ void ApplicationCacheGroup::didFinishLoadingManifest()
ApplicationCache::ResourceMap::const_iterator end = m_newestCache->end();
for (ApplicationCache::ResourceMap::const_iterator it = m_newestCache->begin(); it != end; ++it) {
unsigned type = it->second->type();
- if (type & (ApplicationCacheResource::Master | ApplicationCacheResource::Dynamic))
+ if (type & ApplicationCacheResource::Master)
addEntry(it->first, type);
}
}
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp
index 7c1241b..4beb76a 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.cpp
@@ -57,8 +57,6 @@ void ApplicationCacheResource::dumpType(unsigned type)
printf("foreign ");
if (type & Fallback)
printf("fallback ");
- if (type & Dynamic)
- printf("dynamic ");
printf("\n");
}
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h
index 28d8280..0a8d6c2 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheResource.h
@@ -39,8 +39,7 @@ public:
Manifest = 1 << 1,
Explicit = 1 << 2,
Foreign = 1 << 3,
- Fallback = 1 << 4,
- Dynamic = 1 << 5
+ Fallback = 1 << 4
};
static PassRefPtr<ApplicationCacheResource> create(const KURL& url, const ResourceResponse& response, unsigned type, PassRefPtr<SharedBuffer> buffer = SharedBuffer::create())
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp
index 1c59581..7e611cd 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/ApplicationCacheStorage.cpp
@@ -615,9 +615,6 @@ bool ApplicationCacheStorage::storeUpdatedType(ApplicationCacheResource* resourc
ASSERT_UNUSED(cache, cache->storageID());
ASSERT(resource->storageID());
- // FIXME: If the resource gained a Dynamic bit, it should be re-inserted at the end for correct order.
- ASSERT(!(resource->type() & ApplicationCacheResource::Dynamic));
-
// First, insert the data
SQLiteStatement entryStatement(m_database, "UPDATE CacheEntries SET type=? WHERE resource=?");
if (entryStatement.prepare() != SQLResultOk)
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.cpp b/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.cpp
index 90d2930..5ea5d4f 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.cpp
@@ -38,7 +38,6 @@
#include "EventNames.h"
#include "Frame.h"
#include "FrameLoader.h"
-#include "StaticStringList.h"
namespace WebCore {
@@ -127,65 +126,6 @@ void DOMApplicationCache::swapCache(ExceptionCode& ec)
ec = INVALID_STATE_ERR;
}
-PassRefPtr<DOMStringList> DOMApplicationCache::items()
-{
- Vector<String> result;
- if (ApplicationCache* cache = associatedCache()) {
- unsigned numEntries = cache->numDynamicEntries();
- result.reserveInitialCapacity(numEntries);
- for (unsigned i = 0; i < numEntries; ++i)
- result.append(cache->dynamicEntry(i));
- }
- return StaticStringList::adopt(result);
-}
-
-bool DOMApplicationCache::hasItem(const KURL& url, ExceptionCode& ec)
-{
- ApplicationCache* cache = associatedCache();
- if (!cache) {
- ec = INVALID_STATE_ERR;
- return false;
- }
-
- if (!url.isValid()) {
- ec = SYNTAX_ERR;
- return false;
- }
-
- ApplicationCacheResource* resource = cache->resourceForURL(url.string());
- return resource && (resource->type() & ApplicationCacheResource::Dynamic);
-}
-
-void DOMApplicationCache::add(const KURL& url, ExceptionCode& ec)
-{
- ApplicationCache* cache = associatedCache();
- if (!cache) {
- ec = INVALID_STATE_ERR;
- return;
- }
-
- if (!url.isValid()) {
- ec = SYNTAX_ERR;
- return;
- }
-
- if (!cache->addDynamicEntry(url)) {
- // This should use the (currently not specified) security exceptions in HTML5 4.3.4
- ec = SECURITY_ERR;
- }
-}
-
-void DOMApplicationCache::remove(const KURL& url, ExceptionCode& ec)
-{
- ApplicationCache* cache = associatedCache();
- if (!cache) {
- ec = INVALID_STATE_ERR;
- return;
- }
-
- cache->removeDynamicEntry(url);
-}
-
ScriptExecutionContext* DOMApplicationCache::scriptExecutionContext() const
{
return m_frame->document();
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.h b/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.h
index b76542d..4fe1511 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.h
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.h
@@ -40,7 +40,6 @@ namespace WebCore {
class ApplicationCache;
class AtomicStringImpl;
-class DOMStringList;
class Frame;
class KURL;
class String;
@@ -64,11 +63,6 @@ public:
void update(ExceptionCode&);
void swapCache(ExceptionCode&);
- PassRefPtr<DOMStringList> items();
- bool hasItem(const KURL&, ExceptionCode&);
- void add(const KURL&, ExceptionCode&);
- void remove(const KURL&, ExceptionCode&);
-
virtual void addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
virtual void removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture);
virtual bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&);
diff --git a/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.idl b/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.idl
index 1156c9c..ebc1d19 100644
--- a/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.idl
+++ b/src/3rdparty/webkit/WebCore/loader/appcache/DOMApplicationCache.idl
@@ -43,17 +43,6 @@ module offline {
void swapCache()
raises(DOMException);
-#if defined(ENABLE_APPLICATION_CACHE_DYNAMIC_ENTRIES) && ENABLE_APPLICATION_CACHE_DYNAMIC_ENTRIES
- // dynamic entries
- readonly attribute DOMStringList items;
- [Custom] boolean hasItem(in DOMString url)
- raises(DOMException);
- [Custom] void add(in DOMString uri)
- raises(DOMException);
- [Custom] void remove(in DOMString uri)
- raises(DOMException);
-#endif
-
// events
attribute EventListener onchecking;
attribute EventListener onerror;