summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebIDBMetadata.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-17 16:21:14 +0200
commit8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch)
tree17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebKit/chromium/src/WebIDBMetadata.cpp
parentb9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff)
downloadqtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well as the previously cherry-picked changes
Diffstat (limited to 'Source/WebKit/chromium/src/WebIDBMetadata.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebIDBMetadata.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/WebKit/chromium/src/WebIDBMetadata.cpp b/Source/WebKit/chromium/src/WebIDBMetadata.cpp
index 01d878a0a..dd1c2c8e5 100644
--- a/Source/WebKit/chromium/src/WebIDBMetadata.cpp
+++ b/Source/WebKit/chromium/src/WebIDBMetadata.cpp
@@ -31,7 +31,7 @@
#include "IDBMetadata.h"
#include "WebIDBKeyPath.h"
#include "platform/WebString.h"
-#include "platform/WebVector.h"
+#include <public/WebVector.h>
using namespace WebCore;
@@ -43,19 +43,21 @@ WebIDBMetadata::WebIDBMetadata(const WebCore::IDBDatabaseMetadata& metadata)
version = metadata.version;
intVersion = metadata.intVersion;
objectStores = WebVector<ObjectStore>(static_cast<size_t>(metadata.objectStores.size()));
+ maxObjectStoreId = metadata.maxObjectStoreId;
size_t i = 0;
for (IDBDatabaseMetadata::ObjectStoreMap::const_iterator storeIterator = metadata.objectStores.begin(); storeIterator != metadata.objectStores.end(); ++storeIterator) {
- const IDBObjectStoreMetadata& objectStore = storeIterator->second;
+ const IDBObjectStoreMetadata& objectStore = storeIterator->value;
ObjectStore webObjectStore;
webObjectStore.name = objectStore.name;
webObjectStore.keyPath = objectStore.keyPath;
webObjectStore.autoIncrement = objectStore.autoIncrement;
webObjectStore.indexes = WebVector<Index>(static_cast<size_t>(objectStore.indexes.size()));
+ webObjectStore.maxIndexId = objectStore.maxIndexId;
size_t j = 0;
for (IDBObjectStoreMetadata::IndexMap::const_iterator indexIterator = objectStore.indexes.begin(); indexIterator != objectStore.indexes.end(); ++indexIterator) {
- const IDBIndexMetadata& index = indexIterator->second;
+ const IDBIndexMetadata& index = indexIterator->value;
Index webIndex;
webIndex.name = index.name;
webIndex.keyPath = index.keyPath;
@@ -69,14 +71,14 @@ WebIDBMetadata::WebIDBMetadata(const WebCore::IDBDatabaseMetadata& metadata)
WebIDBMetadata::operator IDBDatabaseMetadata() const
{
- IDBDatabaseMetadata db(name, version, intVersion);
+ IDBDatabaseMetadata db(name, id, version, intVersion, maxObjectStoreId);
for (size_t i = 0; i < objectStores.size(); ++i) {
const ObjectStore webObjectStore = objectStores[i];
- IDBObjectStoreMetadata objectStore(webObjectStore.name, webObjectStore.keyPath, webObjectStore.autoIncrement);
+ IDBObjectStoreMetadata objectStore(webObjectStore.name, webObjectStore.id, webObjectStore.keyPath, webObjectStore.autoIncrement, webObjectStore.maxIndexId);
for (size_t j = 0; j < webObjectStore.indexes.size(); ++j) {
const Index webIndex = webObjectStore.indexes[j];
- IDBIndexMetadata index(webIndex.name, webIndex.keyPath, webIndex.unique, webIndex.multiEntry);
+ IDBIndexMetadata index(webIndex.name, webIndex.id, webIndex.keyPath, webIndex.unique, webIndex.multiEntry);
objectStore.indexes.set(index.name, index);
}
db.objectStores.set(objectStore.name, objectStore);