<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[189809] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/189809">189809</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2015-09-15 08:51:02 -0700 (Tue, 15 Sep 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make the enum IDBKey::Type into a utility enum class.
https://bugs.webkit.org/show_bug.cgi?id=149149
Reviewed by Alex Christensen.
Source/WebCore:
No new tests (Cleanup, no behavior change).
* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::isValid):
(WebCore::IDBKey::compare):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::createNumber):
(WebCore::IDBKey::createDate):
(WebCore::IDBKey::createMultiEntryArray):
(WebCore::IDBKey::createArray):
(WebCore::IDBKey::type):
(WebCore::IDBKey::array):
(WebCore::IDBKey::string):
(WebCore::IDBKey::date):
(WebCore::IDBKey::number):
(WebCore::IDBKey::compareTypes):
(WebCore::IDBKey::IDBKey):
* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare):
(WebCore::IDBKeyData::loggingString):
(WebCore::IDBKeyData::setArrayValue):
(WebCore::IDBKeyData::setStringValue):
(WebCore::IDBKeyData::setDateValue):
(WebCore::IDBKeyData::setNumberValue):
* Modules/indexeddb/IDBKeyData.h:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::minimum):
(WebCore::IDBKeyData::maximum):
* Modules/indexeddb/IndexedDB.h:
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyToJSValue):
(WebCore::createIDBKeyFromValue):
(WebCore::createIDBKeyFromScriptValueAndKeyPath):
(WebCore::generateIndexKeysForValue):
* inspector/InspectorIndexedDBAgent.cpp:
Source/WebKit2:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::putRecordInBackingStore):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<IDBKeyData>::encode):
(IPC::ArgumentCoder<IDBKeyData>::decode):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeycpp">trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyh">trunk/Source/WebCore/Modules/indexeddb/IDBKey.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp">trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBKeyDatah">trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIndexedDBh">trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp">trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp">trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/ChangeLog        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -1,3 +1,51 @@
</span><ins>+2015-09-14 Brady Eidson <beidson@apple.com>
+
+ Make the enum IDBKey::Type into a utility enum class.
+ https://bugs.webkit.org/show_bug.cgi?id=149149
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Cleanup, no behavior change).
+
+ * Modules/indexeddb/IDBKey.cpp:
+ (WebCore::IDBKey::isValid):
+ (WebCore::IDBKey::compare):
+ * Modules/indexeddb/IDBKey.h:
+ (WebCore::IDBKey::createNumber):
+ (WebCore::IDBKey::createDate):
+ (WebCore::IDBKey::createMultiEntryArray):
+ (WebCore::IDBKey::createArray):
+ (WebCore::IDBKey::type):
+ (WebCore::IDBKey::array):
+ (WebCore::IDBKey::string):
+ (WebCore::IDBKey::date):
+ (WebCore::IDBKey::number):
+ (WebCore::IDBKey::compareTypes):
+ (WebCore::IDBKey::IDBKey):
+ * Modules/indexeddb/IDBKeyData.cpp:
+ (WebCore::IDBKeyData::IDBKeyData):
+ (WebCore::IDBKeyData::maybeCreateIDBKey):
+ (WebCore::IDBKeyData::isolatedCopy):
+ (WebCore::IDBKeyData::encode):
+ (WebCore::IDBKeyData::decode):
+ (WebCore::IDBKeyData::compare):
+ (WebCore::IDBKeyData::loggingString):
+ (WebCore::IDBKeyData::setArrayValue):
+ (WebCore::IDBKeyData::setStringValue):
+ (WebCore::IDBKeyData::setDateValue):
+ (WebCore::IDBKeyData::setNumberValue):
+ * Modules/indexeddb/IDBKeyData.h:
+ (WebCore::IDBKeyData::IDBKeyData):
+ (WebCore::IDBKeyData::minimum):
+ (WebCore::IDBKeyData::maximum):
+ * Modules/indexeddb/IndexedDB.h:
+ * bindings/js/IDBBindingUtilities.cpp:
+ (WebCore::idbKeyToJSValue):
+ (WebCore::createIDBKeyFromValue):
+ (WebCore::createIDBKeyFromScriptValueAndKeyPath):
+ (WebCore::generateIndexKeysForValue):
+ * inspector/InspectorIndexedDBAgent.cpp:
+
</ins><span class="cx"> 2015-09-15 Javier Fernandez <jfernandez@igalia.com>
</span><span class="cx">
</span><span class="cx"> [CSS Grid Layout] Using {row, column}-axis terms in alignment related logic
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.cpp        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -38,10 +38,10 @@
</span><span class="cx">
</span><span class="cx"> bool IDBKey::isValid() const
</span><span class="cx"> {
</span><del>- if (m_type == InvalidType)
</del><ins>+ if (m_type == KeyType::Invalid)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (m_type == ArrayType) {
</del><ins>+ if (m_type == KeyType::Array) {
</ins><span class="cx"> for (auto& key : m_array) {
</span><span class="cx"> if (!key->isValid())
</span><span class="cx"> return false;
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> return m_type > other->m_type ? -1 : 1;
</span><span class="cx">
</span><span class="cx"> switch (m_type) {
</span><del>- case ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> for (size_t i = 0; i < m_array.size() && i < other->m_array.size(); ++i) {
</span><span class="cx"> if (int result = m_array[i]->compare(other->m_array[i].get()))
</span><span class="cx"> return result;
</span><span class="lines">@@ -68,15 +68,15 @@
</span><span class="cx"> if (m_array.size() > other->m_array.size())
</span><span class="cx"> return 1;
</span><span class="cx"> return 0;
</span><del>- case StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> return -codePointCompare(other->m_string, m_string);
</span><del>- case DateType:
- case NumberType:
</del><ins>+ case KeyType::Date:
+ case KeyType::Number:
</ins><span class="cx"> return (m_number < other->m_number) ? -1 :
</span><span class="cx"> (m_number > other-> m_number) ? 1 : 0;
</span><del>- case InvalidType:
- case MinType:
- case MaxType:
</del><ins>+ case KeyType::Invalid:
+ case KeyType::Min:
+ case KeyType::Max:
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKey.h (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKey.h        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKey.h        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -28,17 +28,18 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span><span class="cx">
</span><ins>+#include "IndexedDB.h"
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><ins>+using WebCore::IndexedDB::KeyType;
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class IDBKey : public RefCounted<IDBKey> {
</span><span class="cx"> public:
</span><del>- typedef Vector<RefPtr<IDBKey>> KeyArray;
-
</del><span class="cx"> static Ref<IDBKey> createInvalid()
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(*new IDBKey());
</span><span class="lines">@@ -46,7 +47,7 @@
</span><span class="cx">
</span><span class="cx"> static Ref<IDBKey> createNumber(double number)
</span><span class="cx"> {
</span><del>- return adoptRef(*new IDBKey(NumberType, number));
</del><ins>+ return adoptRef(*new IDBKey(KeyType::Number, number));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static Ref<IDBKey> createString(const String& string)
</span><span class="lines">@@ -56,12 +57,12 @@
</span><span class="cx">
</span><span class="cx"> static Ref<IDBKey> createDate(double date)
</span><span class="cx"> {
</span><del>- return adoptRef(*new IDBKey(DateType, date));
</del><ins>+ return adoptRef(*new IDBKey(KeyType::Date, date));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- static PassRefPtr<IDBKey> createMultiEntryArray(const KeyArray& array)
</del><ins>+ static PassRefPtr<IDBKey> createMultiEntryArray(const Vector<RefPtr<IDBKey>>& array)
</ins><span class="cx"> {
</span><del>- KeyArray result;
</del><ins>+ Vector<RefPtr<IDBKey>> result;
</ins><span class="cx">
</span><span class="cx"> size_t sizeEstimate = 0;
</span><span class="cx"> for (auto& key : array) {
</span><span class="lines">@@ -85,7 +86,7 @@
</span><span class="cx"> return idbKey.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- static Ref<IDBKey> createArray(const KeyArray& array)
</del><ins>+ static Ref<IDBKey> createArray(const Vector<RefPtr<IDBKey>>& array)
</ins><span class="cx"> {
</span><span class="cx"> size_t sizeEstimate = 0;
</span><span class="cx"> for (auto& key : array)
</span><span class="lines">@@ -96,41 +97,30 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT ~IDBKey();
</span><span class="cx">
</span><del>- // In order of the least to the highest precedent in terms of sort order.
- enum Type {
- MaxType = -1,
- InvalidType = 0,
- ArrayType,
- StringType,
- DateType,
- NumberType,
- MinType
- };
-
- Type type() const { return m_type; }
</del><ins>+ KeyType type() const { return m_type; }
</ins><span class="cx"> WEBCORE_EXPORT bool isValid() const;
</span><span class="cx">
</span><del>- const KeyArray& array() const
</del><ins>+ const Vector<RefPtr<IDBKey>>& array() const
</ins><span class="cx"> {
</span><del>- ASSERT(m_type == ArrayType);
</del><ins>+ ASSERT(m_type == KeyType::Array);
</ins><span class="cx"> return m_array;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const String& string() const
</span><span class="cx"> {
</span><del>- ASSERT(m_type == StringType);
</del><ins>+ ASSERT(m_type == KeyType::String);
</ins><span class="cx"> return m_string;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double date() const
</span><span class="cx"> {
</span><del>- ASSERT(m_type == DateType);
</del><ins>+ ASSERT(m_type == KeyType::Date);
</ins><span class="cx"> return m_number;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double number() const
</span><span class="cx"> {
</span><del>- ASSERT(m_type == NumberType);
</del><ins>+ ASSERT(m_type == KeyType::Number);
</ins><span class="cx"> return m_number;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -140,7 +130,7 @@
</span><span class="cx">
</span><span class="cx"> size_t sizeEstimate() const { return m_sizeEstimate; }
</span><span class="cx">
</span><del>- static int compareTypes(Type a, Type b)
</del><ins>+ static int compareTypes(KeyType a, KeyType b)
</ins><span class="cx"> {
</span><span class="cx"> return b - a;
</span><span class="cx"> }
</span><span class="lines">@@ -153,13 +143,13 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- IDBKey() : m_type(InvalidType), m_number(0), m_sizeEstimate(OverheadSize) { }
- IDBKey(Type type, double number) : m_type(type), m_number(number), m_sizeEstimate(OverheadSize + sizeof(double)) { }
- explicit IDBKey(const String& value) : m_type(StringType), m_string(value), m_number(0), m_sizeEstimate(OverheadSize + value.length() * sizeof(UChar)) { }
- IDBKey(const KeyArray& keyArray, size_t arraySize) : m_type(ArrayType), m_array(keyArray), m_number(0), m_sizeEstimate(OverheadSize + arraySize) { }
</del><ins>+ IDBKey() : m_type(KeyType::Invalid), m_number(0), m_sizeEstimate(OverheadSize) { }
+ IDBKey(KeyType type, double number) : m_type(type), m_number(number), m_sizeEstimate(OverheadSize + sizeof(double)) { }
+ explicit IDBKey(const String& value) : m_type(KeyType::String), m_string(value), m_number(0), m_sizeEstimate(OverheadSize + value.length() * sizeof(UChar)) { }
+ IDBKey(const Vector<RefPtr<IDBKey>>& keyArray, size_t arraySize) : m_type(KeyType::Array), m_array(keyArray), m_number(0), m_sizeEstimate(OverheadSize + arraySize) { }
</ins><span class="cx">
</span><del>- const Type m_type;
- const KeyArray m_array;
</del><ins>+ const KeyType m_type;
+ const Vector<RefPtr<IDBKey>> m_array;
</ins><span class="cx"> const String m_string;
</span><span class="cx"> const double m_number;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.cpp        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> IDBKeyData::IDBKeyData(const IDBKey* key)
</span><del>- : type(IDBKey::InvalidType)
</del><ins>+ : type(KeyType::Invalid)
</ins><span class="cx"> , numberValue(0)
</span><span class="cx"> , isNull(false)
</span><span class="cx"> {
</span><span class="lines">@@ -47,23 +47,23 @@
</span><span class="cx"> numberValue = 0;
</span><span class="cx">
</span><span class="cx"> switch (type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> break;
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> for (auto& key2 : key->array())
</span><span class="cx"> arrayValue.append(IDBKeyData(key2.get()));
</span><span class="cx"> break;
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> stringValue = key->string();
</span><span class="cx"> break;
</span><del>- case IDBKey::DateType:
</del><ins>+ case KeyType::Date:
</ins><span class="cx"> numberValue = key->date();
</span><span class="cx"> break;
</span><del>- case IDBKey::NumberType:
</del><ins>+ case KeyType::Number:
</ins><span class="cx"> numberValue = key->number();
</span><span class="cx"> break;
</span><del>- case IDBKey::MaxType:
- case IDBKey::MinType:
</del><ins>+ case KeyType::Max:
+ case KeyType::Min:
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -74,25 +74,25 @@
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> switch (type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> return IDBKey::createInvalid();
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> {
</span><del>- IDBKey::KeyArray array;
</del><ins>+ Vector<RefPtr<IDBKey>> array;
</ins><span class="cx"> for (auto& keyData : arrayValue) {
</span><span class="cx"> array.append(keyData.maybeCreateIDBKey());
</span><span class="cx"> ASSERT(array.last());
</span><span class="cx"> }
</span><span class="cx"> return IDBKey::createArray(array);
</span><span class="cx"> }
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> return IDBKey::createString(stringValue);
</span><del>- case IDBKey::DateType:
</del><ins>+ case KeyType::Date:
</ins><span class="cx"> return IDBKey::createDate(numberValue);
</span><del>- case IDBKey::NumberType:
</del><ins>+ case KeyType::Number:
</ins><span class="cx"> return IDBKey::createNumber(numberValue);
</span><del>- case IDBKey::MaxType:
- case IDBKey::MinType:
</del><ins>+ case KeyType::Max:
+ case KeyType::Min:
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -108,21 +108,21 @@
</span><span class="cx"> result.isNull = isNull;
</span><span class="cx">
</span><span class="cx"> switch (type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> return result;
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> for (auto& key : arrayValue)
</span><span class="cx"> result.arrayValue.append(key.isolatedCopy());
</span><span class="cx"> return result;
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> result.stringValue = stringValue.isolatedCopy();
</span><span class="cx"> return result;
</span><del>- case IDBKey::DateType:
- case IDBKey::NumberType:
</del><ins>+ case KeyType::Date:
+ case KeyType::Number:
</ins><span class="cx"> result.numberValue = numberValue;
</span><span class="cx"> return result;
</span><del>- case IDBKey::MaxType:
- case IDBKey::MinType:
</del><ins>+ case KeyType::Max:
+ case KeyType::Min:
</ins><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -139,22 +139,22 @@
</span><span class="cx"> encoder.encodeEnum("type", type);
</span><span class="cx">
</span><span class="cx"> switch (type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> return;
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> encoder.encodeObjects("array", arrayValue.begin(), arrayValue.end(), [](KeyedEncoder& encoder, const IDBKeyData& key) {
</span><span class="cx"> key.encode(encoder);
</span><span class="cx"> });
</span><span class="cx"> return;
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> encoder.encodeString("string", stringValue);
</span><span class="cx"> return;
</span><del>- case IDBKey::DateType:
- case IDBKey::NumberType:
</del><ins>+ case KeyType::Date:
+ case KeyType::Number:
</ins><span class="cx"> encoder.encodeDouble("number", numberValue);
</span><span class="cx"> return;
</span><del>- case IDBKey::MaxType:
- case IDBKey::MinType:
</del><ins>+ case KeyType::Max:
+ case KeyType::Min:
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -170,33 +170,33 @@
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> auto enumFunction = [](int64_t value) {
</span><del>- return value == IDBKey::MaxType
- || value == IDBKey::InvalidType
- || value == IDBKey::ArrayType
- || value == IDBKey::StringType
- || value == IDBKey::DateType
- || value == IDBKey::NumberType
- || value == IDBKey::MinType;
</del><ins>+ return value == KeyType::Max
+ || value == KeyType::Invalid
+ || value == KeyType::Array
+ || value == KeyType::String
+ || value == KeyType::Date
+ || value == KeyType::Number
+ || value == KeyType::Min;
</ins><span class="cx"> };
</span><span class="cx"> if (!decoder.decodeEnum("type", result.type, enumFunction))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (result.type == IDBKey::InvalidType)
</del><ins>+ if (result.type == KeyType::Invalid)
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (result.type == IDBKey::MaxType)
</del><ins>+ if (result.type == KeyType::Max)
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (result.type == IDBKey::MinType)
</del><ins>+ if (result.type == KeyType::Min)
</ins><span class="cx"> return true;
</span><span class="cx">
</span><del>- if (result.type == IDBKey::StringType)
</del><ins>+ if (result.type == KeyType::String)
</ins><span class="cx"> return decoder.decodeString("string", result.stringValue);
</span><span class="cx">
</span><del>- if (result.type == IDBKey::NumberType || result.type == IDBKey::DateType)
</del><ins>+ if (result.type == KeyType::Number || result.type == KeyType::Date)
</ins><span class="cx"> return decoder.decodeDouble("number", result.numberValue);
</span><span class="cx">
</span><del>- ASSERT(result.type == IDBKey::ArrayType);
</del><ins>+ ASSERT(result.type == KeyType::Array);
</ins><span class="cx">
</span><span class="cx"> auto arrayFunction = [](KeyedDecoder& decoder, IDBKeyData& result) {
</span><span class="cx"> return decode(decoder, result);
</span><span class="lines">@@ -208,12 +208,12 @@
</span><span class="cx">
</span><span class="cx"> int IDBKeyData::compare(const IDBKeyData& other) const
</span><span class="cx"> {
</span><del>- if (type == IDBKey::InvalidType) {
- if (other.type != IDBKey::InvalidType)
</del><ins>+ if (type == KeyType::Invalid) {
+ if (other.type != KeyType::Invalid)
</ins><span class="cx"> return -1;
</span><del>- if (other.type == IDBKey::InvalidType)
</del><ins>+ if (other.type == KeyType::Invalid)
</ins><span class="cx"> return 0;
</span><del>- } else if (other.type == IDBKey::InvalidType)
</del><ins>+ } else if (other.type == KeyType::Invalid)
</ins><span class="cx"> return 1;
</span><span class="cx">
</span><span class="cx"> // The IDBKey::Type enum is in reverse sort order.
</span><span class="lines">@@ -222,11 +222,11 @@
</span><span class="cx">
</span><span class="cx"> // The types are the same, so handle actual value comparison.
</span><span class="cx"> switch (type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> // InvalidType should have been fully handled above
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> for (size_t i = 0; i < arrayValue.size() && i < other.arrayValue.size(); ++i) {
</span><span class="cx"> if (int result = arrayValue[i].compare(other.arrayValue[i]))
</span><span class="cx"> return result;
</span><span class="lines">@@ -236,15 +236,15 @@
</span><span class="cx"> if (arrayValue.size() > other.arrayValue.size())
</span><span class="cx"> return 1;
</span><span class="cx"> return 0;
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> return codePointCompare(stringValue, other.stringValue);
</span><del>- case IDBKey::DateType:
- case IDBKey::NumberType:
</del><ins>+ case KeyType::Date:
+ case KeyType::Number:
</ins><span class="cx"> if (numberValue == other.numberValue)
</span><span class="cx"> return 0;
</span><span class="cx"> return numberValue > other.numberValue ? 1 : -1;
</span><del>- case IDBKey::MaxType:
- case IDBKey::MinType:
</del><ins>+ case KeyType::Max:
+ case KeyType::Min:
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -259,9 +259,9 @@
</span><span class="cx"> return "<null>";
</span><span class="cx">
</span><span class="cx"> switch (type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> return "<invalid>";
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> {
</span><span class="cx"> StringBuilder result;
</span><span class="cx"> result.appendLiteral("<array> - { ");
</span><span class="lines">@@ -273,15 +273,15 @@
</span><span class="cx"> result.appendLiteral(" }");
</span><span class="cx"> return result.toString();
</span><span class="cx"> }
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> return "<string> - " + stringValue;
</span><del>- case IDBKey::DateType:
</del><ins>+ case KeyType::Date:
</ins><span class="cx"> return String::format("Date type - %f", numberValue);
</span><del>- case IDBKey::NumberType:
</del><ins>+ case KeyType::Number:
</ins><span class="cx"> return String::format("<number> - %f", numberValue);
</span><del>- case IDBKey::MaxType:
</del><ins>+ case KeyType::Max:
</ins><span class="cx"> return "<maximum>";
</span><del>- case IDBKey::MinType:
</del><ins>+ case KeyType::Min:
</ins><span class="cx"> return "<minimum>";
</span><span class="cx"> default:
</span><span class="cx"> return String();
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx"> {
</span><span class="cx"> *this = IDBKeyData();
</span><span class="cx"> arrayValue = value;
</span><del>- type = IDBKey::ArrayType;
</del><ins>+ type = KeyType::Array;
</ins><span class="cx"> isNull = false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -302,7 +302,7 @@
</span><span class="cx"> {
</span><span class="cx"> *this = IDBKeyData();
</span><span class="cx"> stringValue = value;
</span><del>- type = IDBKey::StringType;
</del><ins>+ type = KeyType::String;
</ins><span class="cx"> isNull = false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -310,7 +310,7 @@
</span><span class="cx"> {
</span><span class="cx"> *this = IDBKeyData();
</span><span class="cx"> numberValue = value;
</span><del>- type = IDBKey::DateType;
</del><ins>+ type = KeyType::Date;
</ins><span class="cx"> isNull = false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -318,7 +318,7 @@
</span><span class="cx"> {
</span><span class="cx"> *this = IDBKeyData();
</span><span class="cx"> numberValue = value;
</span><del>- type = IDBKey::NumberType;
</del><ins>+ type = KeyType::Number;
</ins><span class="cx"> isNull = false;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBKeyDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyData.h        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">
</span><span class="cx"> struct IDBKeyData {
</span><span class="cx"> IDBKeyData()
</span><del>- : type(IDBKey::InvalidType)
</del><ins>+ : type(KeyType::Invalid)
</ins><span class="cx"> , numberValue(0)
</span><span class="cx"> , isNull(true)
</span><span class="cx"> {
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> static IDBKeyData minimum()
</span><span class="cx"> {
</span><span class="cx"> IDBKeyData result;
</span><del>- result.type = IDBKey::MinType;
</del><ins>+ result.type = KeyType::Min;
</ins><span class="cx"> result.isNull = false;
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> static IDBKeyData maximum()
</span><span class="cx"> {
</span><span class="cx"> IDBKeyData result;
</span><del>- result.type = IDBKey::MaxType;
</del><ins>+ result.type = KeyType::Max;
</ins><span class="cx"> result.isNull = false;
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> WEBCORE_EXPORT String loggingString() const;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- IDBKey::Type type;
</del><ins>+ KeyType type;
</ins><span class="cx"> Vector<IDBKeyData> arrayValue;
</span><span class="cx"> String stringValue;
</span><span class="cx"> double numberValue;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIndexedDBh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/Modules/indexeddb/IndexedDB.h        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -57,6 +57,17 @@
</span><span class="cx"> Null,
</span><span class="cx"> NonNull,
</span><span class="cx"> };
</span><ins>+
+// In order of the least to the highest precedent in terms of sort order.
+enum KeyType {
+ Max = -1,
+ Invalid = 0,
+ Array,
+ String,
+ Date,
+ Number,
+ Min,
+};
</ins><span class="cx">
</span><span class="cx"> } // namespace IndexedDB
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsIDBBindingUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -84,9 +84,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> switch (key->type()) {
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> {
</span><del>- const IDBKey::KeyArray& inArray = key->array();
</del><ins>+ const Vector<RefPtr<IDBKey>>& inArray = key->array();
</ins><span class="cx"> size_t size = inArray.size();
</span><span class="cx"> JSArray* outArray = constructEmptyArray(exec, 0, globalObject, size);
</span><span class="cx"> for (size_t i = 0; i < size; ++i) {
</span><span class="lines">@@ -95,15 +95,15 @@
</span><span class="cx"> }
</span><span class="cx"> return JSValue(outArray);
</span><span class="cx"> }
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> return jsStringWithCache(exec, key->string());
</span><del>- case IDBKey::DateType:
</del><ins>+ case KeyType::Date:
</ins><span class="cx"> return jsDateOrNull(exec, key->date());
</span><del>- case IDBKey::NumberType:
</del><ins>+ case KeyType::Number:
</ins><span class="cx"> return jsNumber(key->number());
</span><del>- case IDBKey::MinType:
- case IDBKey::MaxType:
- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Min:
+ case KeyType::Max:
+ case KeyType::Invalid:
</ins><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return jsUndefined();
</span><span class="cx"> }
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> stack.append(array);
</span><span class="cx">
</span><del>- IDBKey::KeyArray subkeys;
</del><ins>+ Vector<RefPtr<IDBKey>> subkeys;
</ins><span class="cx"> for (size_t i = 0; i < length; i++) {
</span><span class="cx"> JSValue item = array->getIndex(exec, i);
</span><span class="cx"> RefPtr<IDBKey> subkey = createIDBKeyFromValue(exec, item, stack);
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> ASSERT(!keyPath.isNull());
</span><span class="cx">
</span><span class="cx"> if (keyPath.type() == IDBKeyPath::ArrayType) {
</span><del>- IDBKey::KeyArray result;
</del><ins>+ Vector<RefPtr<IDBKey>> result;
</ins><span class="cx"> const Vector<String>& array = keyPath.array();
</span><span class="cx"> for (size_t i = 0; i < array.size(); i++) {
</span><span class="cx"> RefPtr<IDBKey> key = internalCreateIDBKeyFromScriptValueAndKeyPath(exec, value, array[i]);
</span><span class="lines">@@ -357,14 +357,14 @@
</span><span class="cx"> if (!indexKey)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!indexMetadata.multiEntry || indexKey->type() != IDBKey::ArrayType) {
</del><ins>+ if (!indexMetadata.multiEntry || indexKey->type() != KeyType::Array) {
</ins><span class="cx"> if (!indexKey->isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> indexKeys.append(IDBKeyData(indexKey.get()));
</span><span class="cx"> } else {
</span><span class="cx"> ASSERT(indexMetadata.multiEntry);
</span><del>- ASSERT(indexKey->type() == IDBKey::ArrayType);
</del><ins>+ ASSERT(indexKey->type() == KeyType::Array);
</ins><span class="cx"> indexKey = IDBKey::createMultiEntryArray(indexKey->array());
</span><span class="cx">
</span><span class="cx"> if (!indexKey->isValid())
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -362,7 +362,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> idbKey = IDBKey::createDate(date);
</span><span class="cx"> } else if (type == arrayType) {
</span><del>- IDBKey::KeyArray keyArray;
</del><ins>+ Vector<RefPtr<IDBKey>> keyArray;
</ins><span class="cx"> RefPtr<InspectorArray> array;
</span><span class="cx"> if (!key->getArray("array", array))
</span><span class="cx"> return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebKit2/ChangeLog        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-09-14 Brady Eidson <beidson@apple.com>
+
+ Make the enum IDBKey::Type into a utility enum class.
+ https://bugs.webkit.org/show_bug.cgi?id=149149
+
+ Reviewed by Alex Christensen.
+
+ * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
+ (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
+
+ * Shared/WebCoreArgumentCoders.cpp:
+ (IPC::ArgumentCoder<IDBKeyData>::encode):
+ (IPC::ArgumentCoder<IDBKeyData>::decode):
+
</ins><span class="cx"> 2015-09-14 Wenson Hsieh <wenson_hsieh@apple.com>
</span><span class="cx">
</span><span class="cx"> WKWebView scroll deceleration rate is not being set properly
</span></span></pre></div>
<a id="trunkSourceWebKit2DatabaseProcessIndexedDBUniqueIDBDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -875,7 +875,7 @@
</span><span class="cx">
</span><span class="cx"> m_backingStore->notifyCursorsOfChanges(transaction, objectStoreMetadata.id);
</span><span class="cx">
</span><del>- if (putMode != IDBDatabaseBackend::CursorUpdate && objectStoreMetadata.autoIncrement && key.type == IDBKey::NumberType) {
</del><ins>+ if (putMode != IDBDatabaseBackend::CursorUpdate && objectStoreMetadata.autoIncrement && key.type == KeyType::Number) {
</ins><span class="cx"> if (!m_backingStore->updateKeyGeneratorNumber(transaction, objectStoreMetadata.id, keyNumber, keyWasGenerated)) {
</span><span class="cx"> postMainThreadTask(createAsyncTask(*this, &UniqueIDBDatabase::didPutRecordInBackingStore, requestID, IDBKeyData(), IDBDatabaseException::UnknownError, ASCIILiteral("Internal backing store error updating key generator")));
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (189808 => 189809)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2015-09-15 15:33:09 UTC (rev 189808)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2015-09-15 15:51:02 UTC (rev 189809)
</span><span class="lines">@@ -1905,21 +1905,21 @@
</span><span class="cx"> encoder.encodeEnum(keyData.type);
</span><span class="cx">
</span><span class="cx"> switch (keyData.type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> break;
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> encoder << keyData.arrayValue;
</span><span class="cx"> break;
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> encoder << keyData.stringValue;
</span><span class="cx"> break;
</span><del>- case IDBKey::DateType:
- case IDBKey::NumberType:
</del><ins>+ case KeyType::Date:
+ case KeyType::Number:
</ins><span class="cx"> encoder << keyData.numberValue;
</span><span class="cx"> break;
</span><del>- case IDBKey::MaxType:
- case IDBKey::MinType:
- // MaxType and MinType are only used for comparison to other keys.
</del><ins>+ case KeyType::Max:
+ case KeyType::Min:
+ // KeyType::Max and KeyType::Min are only used for comparison to other keys.
</ins><span class="cx"> // They should never be sent across the wire.
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> break;
</span><span class="lines">@@ -1938,24 +1938,24 @@
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> switch (keyData.type) {
</span><del>- case IDBKey::InvalidType:
</del><ins>+ case KeyType::Invalid:
</ins><span class="cx"> break;
</span><del>- case IDBKey::ArrayType:
</del><ins>+ case KeyType::Array:
</ins><span class="cx"> if (!decoder.decode(keyData.arrayValue))
</span><span class="cx"> return false;
</span><span class="cx"> break;
</span><del>- case IDBKey::StringType:
</del><ins>+ case KeyType::String:
</ins><span class="cx"> if (!decoder.decode(keyData.stringValue))
</span><span class="cx"> return false;
</span><span class="cx"> break;
</span><del>- case IDBKey::DateType:
- case IDBKey::NumberType:
</del><ins>+ case KeyType::Date:
+ case KeyType::Number:
</ins><span class="cx"> if (!decoder.decode(keyData.numberValue))
</span><span class="cx"> return false;
</span><span class="cx"> break;
</span><del>- case IDBKey::MaxType:
- case IDBKey::MinType:
- // MaxType and MinType are only used for comparison to other keys.
</del><ins>+ case KeyType::Max:
+ case KeyType::Min:
+ // KeyType::Max and KeyType::Min are only used for comparison to other keys.
</ins><span class="cx"> // They should never be sent across the wire.
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> decoder.markInvalid();
</span></span></pre>
</div>
</div>
</body>
</html>