Rename OptionsObject to Dictionary
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 08:48:36 +0000 (08:48 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Mar 2012 08:48:36 +0000 (08:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80802

Reviewed by Adam Barth.

For clarification, rename OptionsObject.{h,cpp} to Dictionary.{h,cpp}.
This patch just renames and sorts alphabetically.

No tests. No change in behavior.

* GNUmakefile.list.am:
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
* Modules/indexeddb/IDBDatabase.h:
(WebCore::IDBDatabase::createObjectStore):
(IDBDatabase):
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBKeyRange.h:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::createIndex):
* Modules/indexeddb/IDBObjectStore.h:
(WebCore::IDBObjectStore::createIndex):
(IDBObjectStore):
* Modules/indexeddb/IDBObjectStore.idl:
* Target.pri:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* bindings/js/Dictionary.h: Renamed from Source/WebCore/bindings/js/OptionsObject.h.
(WebCore):
(Dictionary):
(WebCore::Dictionary::Dictionary):
(WebCore::Dictionary::isObject):
(WebCore::Dictionary::isUndefinedOrNull):
(WebCore::Dictionary::get):
(WebCore::Dictionary::getWithUndefinedOrNullCheck):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createDictionaryFromValue):
* bindings/js/IDBBindingUtilities.h:
(WebCore):
* bindings/scripts/CodeGeneratorJS.pm:
(JSValueToNative):
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateParametersCheck):
(GenerateEventConstructorCallback):
(GetNativeType):
(JSValueToNative):
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::optionsObject):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_options_object):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionIdbKey):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj optionsObject:ooo:]):
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::constructorCallback):
(WebCore::fillTestEventConstructorInit):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjInternal::optionsObjectCallback):
* bindings/v8/Dictionary.cpp: Renamed from Source/WebCore/bindings/v8/OptionsObject.cpp.
(WebCore):
(WebCore::Dictionary::Dictionary):
(WebCore::Dictionary::~Dictionary):
(WebCore::Dictionary::operator=):
(WebCore::Dictionary::isObject):
(WebCore::Dictionary::isUndefinedOrNull):
(WebCore::Dictionary::getKey):
(WebCore::Dictionary::get):
(WebCore::Dictionary::getWithUndefinedOrNullCheck):
* bindings/v8/Dictionary.h: Renamed from Source/WebCore/bindings/v8/OptionsObject.h.
(WebCore):
(Dictionary):
* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
(WebCore::V8WebKitMutationObserver::observeCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110547 268f45cc-cd09-0410-ab3c-d52691b4dbfc

32 files changed:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBDatabase.h
Source/WebCore/Modules/indexeddb/IDBDatabase.idl
Source/WebCore/Modules/indexeddb/IDBKeyRange.h
Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
Source/WebCore/Modules/indexeddb/IDBObjectStore.h
Source/WebCore/Modules/indexeddb/IDBObjectStore.idl
Source/WebCore/Target.pri
Source/WebCore/UseV8.cmake
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/bindings/js/Dictionary.h [moved from Source/WebCore/bindings/js/OptionsObject.h with 95% similarity]
Source/WebCore/bindings/js/IDBBindingUtilities.cpp
Source/WebCore/bindings/js/IDBBindingUtilities.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h
Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
Source/WebCore/bindings/v8/Dictionary.cpp [moved from Source/WebCore/bindings/v8/OptionsObject.cpp with 84% similarity]
Source/WebCore/bindings/v8/Dictionary.h [moved from Source/WebCore/bindings/v8/OptionsObject.h with 92% similarity]
Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp

index 687763f..4604a2a 100644 (file)
@@ -1,3 +1,89 @@
+2012-03-12  Kentaro Hara  <haraken@chromium.org>
+
+        Rename OptionsObject to Dictionary
+        https://bugs.webkit.org/show_bug.cgi?id=80802
+
+        Reviewed by Adam Barth.
+
+        For clarification, rename OptionsObject.{h,cpp} to Dictionary.{h,cpp}.
+        This patch just renames and sorts alphabetically.
+
+        No tests. No change in behavior.
+
+        * GNUmakefile.list.am:
+        * Modules/indexeddb/IDBDatabase.cpp:
+        (WebCore::IDBDatabase::createObjectStore):
+        * Modules/indexeddb/IDBDatabase.h:
+        (WebCore::IDBDatabase::createObjectStore):
+        (IDBDatabase):
+        * Modules/indexeddb/IDBDatabase.idl:
+        * Modules/indexeddb/IDBKeyRange.h:
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::createIndex):
+        * Modules/indexeddb/IDBObjectStore.h:
+        (WebCore::IDBObjectStore::createIndex):
+        (IDBObjectStore):
+        * Modules/indexeddb/IDBObjectStore.idl:
+        * Target.pri:
+        * UseV8.cmake:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * bindings/js/Dictionary.h: Renamed from Source/WebCore/bindings/js/OptionsObject.h.
+        (WebCore):
+        (Dictionary):
+        (WebCore::Dictionary::Dictionary):
+        (WebCore::Dictionary::isObject):
+        (WebCore::Dictionary::isUndefinedOrNull):
+        (WebCore::Dictionary::get):
+        (WebCore::Dictionary::getWithUndefinedOrNullCheck):
+        * bindings/js/IDBBindingUtilities.cpp:
+        (WebCore::createDictionaryFromValue):
+        * bindings/js/IDBBindingUtilities.h:
+        (WebCore):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (JSValueToNative):
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateHeader):
+        (GenerateParametersCheck):
+        (GenerateEventConstructorCallback):
+        (GetNativeType):
+        (JSValueToNative):
+        * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
+        (WebDOMTestObj::optionsObject):
+        * bindings/scripts/test/CPP/WebDOMTestObj.h:
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        (webkit_dom_test_obj_options_object):
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionIdbKey):
+        (WebCore::jsTestObjPrototypeFunctionOptionsObject):
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        (-[DOMTestObj optionsObject:ooo:]):
+        * bindings/scripts/test/TestObj.idl:
+        * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
+        (WebCore::V8TestEventConstructor::constructorCallback):
+        (WebCore::fillTestEventConstructorInit):
+        * bindings/scripts/test/V8/V8TestEventConstructor.h:
+        (WebCore):
+        * bindings/scripts/test/V8/V8TestObj.cpp:
+        (WebCore::TestObjInternal::optionsObjectCallback):
+        * bindings/v8/Dictionary.cpp: Renamed from Source/WebCore/bindings/v8/OptionsObject.cpp.
+        (WebCore):
+        (WebCore::Dictionary::Dictionary):
+        (WebCore::Dictionary::~Dictionary):
+        (WebCore::Dictionary::operator=):
+        (WebCore::Dictionary::isObject):
+        (WebCore::Dictionary::isUndefinedOrNull):
+        (WebCore::Dictionary::getKey):
+        (WebCore::Dictionary::get):
+        (WebCore::Dictionary::getWithUndefinedOrNullCheck):
+        * bindings/v8/Dictionary.h: Renamed from Source/WebCore/bindings/v8/OptionsObject.h.
+        (WebCore):
+        (Dictionary):
+        * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
+        (WebCore::V8WebKitMutationObserver::observeCallback):
+
 2012-03-12  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         SVG Animations update baseVal instead of animVal
index a344436..fa2d691 100644 (file)
@@ -1386,7 +1386,7 @@ webcore_sources += \
        Source/WebCore/bindings/js/JSXSLTProcessorCustom.cpp \
        Source/WebCore/bindings/js/JavaScriptCallFrame.cpp \
        Source/WebCore/bindings/js/JavaScriptCallFrame.h \
-       Source/WebCore/bindings/js/OptionsObject.h \
+       Source/WebCore/bindings/js/Dictionary.h \
        Source/WebCore/bindings/js/PageScriptDebugServer.cpp \
        Source/WebCore/bindings/js/PageScriptDebugServer.h \
        Source/WebCore/bindings/js/ScheduledAction.cpp \
index cc53a88..ca65907 100644 (file)
@@ -85,7 +85,7 @@ void IDBDatabase::clearVersionChangeTransaction(IDBTransaction* transaction)
     m_versionChangeTransaction = 0;
 }
 
-PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const OptionsObject& options, ExceptionCode& ec)
+PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, const Dictionary& options, ExceptionCode& ec)
 {
     if (!m_versionChangeTransaction) {
         ec = IDBDatabaseException::NOT_ALLOWED_ERR;
index ffe21d8..3d0bb9a 100644 (file)
 
 #include "ActiveDOMObject.h"
 #include "DOMStringList.h"
+#include "Dictionary.h"
 #include "Event.h"
 #include "EventTarget.h"
 #include "IDBDatabaseBackendInterface.h"
 #include "IDBDatabaseCallbacksImpl.h"
 #include "IDBObjectStore.h"
 #include "IDBTransaction.h"
-#include "OptionsObject.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -62,8 +62,8 @@ public:
     PassRefPtr<DOMStringList> objectStoreNames() const { return m_backend->objectStoreNames(); }
 
     // FIXME: Try to modify the code generator so this is unneeded.
-    PassRefPtr<IDBObjectStore> createObjectStore(const String& name, ExceptionCode& ec) { return createObjectStore(name, OptionsObject(), ec); }
-    PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const OptionsObject&, ExceptionCode&);
+    PassRefPtr<IDBObjectStore> createObjectStore(const String& name, ExceptionCode& ec) { return createObjectStore(name, Dictionary(), ec); }
+    PassRefPtr<IDBObjectStore> createObjectStore(const String& name, const Dictionary&, ExceptionCode&);
     PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, PassRefPtr<DOMStringList>, unsigned short mode, ExceptionCode&);
     PassRefPtr<IDBTransaction> transaction(ScriptExecutionContext*, const String&, unsigned short mode, ExceptionCode&);
     void deleteObjectStore(const String& name, ExceptionCode&);
index 9abb38d..bd9f7d0 100644 (file)
@@ -39,7 +39,7 @@ module storage {
         attribute EventListener onerror;
         attribute EventListener onversionchange;
 
-        IDBObjectStore createObjectStore(in DOMString name, in [Optional] OptionsObject options)
+        IDBObjectStore createObjectStore(in DOMString name, in [Optional] Dictionary options)
             raises (IDBDatabaseException);
         void deleteObjectStore(in DOMString name)
             raises (IDBDatabaseException);
index b9a98da..1d3c5df 100644 (file)
@@ -28,8 +28,8 @@
 
 #if ENABLE(INDEXED_DATABASE)
 
+#include "Dictionary.h"
 #include "IDBKey.h"
-#include "OptionsObject.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/Threading.h>
 
index 5c34666..3a5a073 100644 (file)
@@ -175,7 +175,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::clear(ScriptExecutionContext* context, Ex
     return request.release();
 }
 
-PassRefPtr<IDBIndex> IDBObjectStore::createIndex(const String& name, const String& keyPath, const OptionsObject& options, ExceptionCode& ec)
+PassRefPtr<IDBIndex> IDBObjectStore::createIndex(const String& name, const String& keyPath, const Dictionary& options, ExceptionCode& ec)
 {
     IDB_TRACE("IDBObjectStore::createIndex");
     if (!IDBIsValidKeyPath(keyPath)) {
index 509090e..703a1ae 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef IDBObjectStore_h
 #define IDBObjectStore_h
 
+#include "Dictionary.h"
 #include "IDBCursor.h"
 #include "IDBIndex.h"
 #include "IDBKey.h"
@@ -33,7 +34,6 @@
 #include "IDBObjectStoreBackendInterface.h"
 #include "IDBRequest.h"
 #include "IDBTransaction.h"
-#include "OptionsObject.h"
 #include "PlatformString.h"
 #include "SerializedScriptValue.h"
 #include <wtf/PassRefPtr.h>
@@ -63,7 +63,7 @@ public:
     // FIXME: Try to modify the code generator so this is unneeded.
     PassRefPtr<IDBRequest> add(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return add(context, value, 0, ec);  }
     PassRefPtr<IDBRequest> put(ScriptExecutionContext* context, PassRefPtr<SerializedScriptValue> value, ExceptionCode& ec) { return put(context, value, 0, ec);  }
-    PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, ExceptionCode& ec) { return createIndex(name, keyPath, OptionsObject(), ec); }
+    PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, ExceptionCode& ec) { return createIndex(name, keyPath, Dictionary(), ec); }
     PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, 0, ec); } 
     PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::NEXT, ec); } 
 
@@ -74,7 +74,7 @@ public:
     PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, PassRefPtr<IDBKey> key, ExceptionCode&);
     PassRefPtr<IDBRequest> clear(ScriptExecutionContext*, ExceptionCode&);
 
-    PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, const OptionsObject&, ExceptionCode&);
+    PassRefPtr<IDBIndex> createIndex(const String& name, const String& keyPath, const Dictionary&, ExceptionCode&);
     PassRefPtr<IDBIndex> index(const String& name, ExceptionCode&);
     void deleteIndex(const String& name, ExceptionCode&);
 
@@ -101,4 +101,3 @@ private:
 #endif
 
 #endif // IDBObjectStore_h
-
index ab1200c..c2bd709 100644 (file)
@@ -47,7 +47,7 @@ module storage {
             raises (IDBDatabaseException);
         [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange range, in [Optional] unsigned short direction)
             raises (IDBDatabaseException);
-        IDBIndex createIndex(in DOMString name, in DOMString keyPath, in [Optional] OptionsObject options)
+        IDBIndex createIndex(in DOMString name, in DOMString keyPath, in [Optional] Dictionary options)
             raises (IDBDatabaseException);
         IDBIndex index(in DOMString name)
             raises (IDBDatabaseException);
index 74343f0..e93cfa8 100644 (file)
@@ -109,7 +109,7 @@ v8 {
         bindings/v8/DOMDataStore.cpp \
         bindings/v8/NPV8Object.cpp \
         bindings/v8/NPObjectWrapper.cpp \
-        bindings/v8/OptionsObject.cpp \
+        bindings/v8/Dictionary.cpp \
         bindings/v8/PageScriptDebugServer.cpp \
         bindings/v8/RetainedDOMInfo.cpp \
         bindings/v8/ScheduledAction.cpp \
index b8f5fd2..09f2908 100755 (executable)
@@ -23,7 +23,7 @@ LIST(APPEND WebCore_SOURCES
     bindings/v8/DateExtension.cpp
     bindings/v8/IDBBindingUtilities.cpp
     bindings/v8/IsolatedWorld.cpp
-    bindings/v8/OptionsObject.cpp
+    bindings/v8/Dictionary.cpp
     bindings/v8/PageScriptDebugServer.cpp
     bindings/v8/RetainedDOMInfo.cpp
     bindings/v8/ScheduledAction.cpp
index b8171ec..26b5aa2 100644 (file)
             'bindings/js/JSXSLTProcessorCustom.cpp',
             'bindings/js/JavaScriptCallFrame.cpp',
             'bindings/js/JavaScriptCallFrame.h',
-            'bindings/js/OptionsObject.h',
+            'bindings/js/Dictionary.h',
             'bindings/js/ScheduledAction.cpp',
             'bindings/js/ScheduledAction.h',
             'bindings/js/ScriptCachedFrameData.cpp',
             'bindings/v8/NPObjectWrapper.h',
             'bindings/v8/NPV8Object.cpp',
             'bindings/v8/NPV8Object.h',
-            'bindings/v8/OptionsObject.cpp',
-            'bindings/v8/OptionsObject.h',
+            'bindings/v8/Dictionary.cpp',
+            'bindings/v8/Dictionary.h',
             'bindings/v8/OwnHandle.h',
             'bindings/v8/PageScriptDebugServer.cpp',
             'bindings/v8/PageScriptDebugServer.h',
index 216bff5..f66a911 100755 (executable)
                                        </FileConfiguration>
                                </File>
                                <File
-                                       RelativePath="..\bindings\js\OptionsObject.h"
+                                       RelativePath="..\bindings\js\Dictionary.h"
                                        >
                                </File>
                                <File
similarity index 95%
rename from Source/WebCore/bindings/js/OptionsObject.h
rename to Source/WebCore/bindings/js/Dictionary.h
index 4078ae1..1d94445 100644 (file)
@@ -23,8 +23,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef OptionsObject_h
-#define OptionsObject_h
+#ifndef Dictionary_h
+#define Dictionary_h
 
 #include "SerializedScriptValue.h"
 #include <wtf/HashSet.h>
@@ -40,9 +40,9 @@ class Storage;
 class TrackBase;
 
 // FIXME: Implement.
-class OptionsObject {
+class Dictionary {
 public:
-    OptionsObject() { }
+    Dictionary() { }
 
     bool isObject() const { return false; }
     bool isUndefinedOrNull() const { return false; }
@@ -68,4 +68,4 @@ public:
 
 }
 
-#endif // OptionsObject_h
+#endif // Dictionary_h
index 8d3dad5..72f49f8 100644 (file)
@@ -46,10 +46,10 @@ PassRefPtr<IDBKey> createIDBKeyFromValue(JSC::ExecState* exec, JSC::JSValue valu
     return 0;
 }
 
-OptionsObject createOptionsObjectFromValue(JSC::ExecState*, JSC::JSValue)
+Dictionary createDictionaryFromValue(JSC::ExecState*, JSC::JSValue)
 {
     // FIXME: Implement Database Options.
-    return OptionsObject();
+    return Dictionary();
 }
 
 } // namespace WebCore
index fa93347..18787a5 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(INDEXED_DATABASE)
 
-#include "OptionsObject.h"
+#include "Dictionary.h"
 #include "ScriptValue.h" 
 #include <wtf/Forward.h>
 
@@ -37,7 +37,7 @@ namespace WebCore {
 class IDBKey;
 
 PassRefPtr<IDBKey> createIDBKeyFromValue(JSC::ExecState*, JSC::JSValue);
-OptionsObject createOptionsObjectFromValue(JSC::ExecState*, JSC::JSValue);
+Dictionary createDictionaryFromValue(JSC::ExecState*, JSC::JSValue);
 
 }
 
index 0a8ba0a..9d60063 100644 (file)
@@ -2789,7 +2789,7 @@ my %nativeType = (
     "NodeFilter" => "RefPtr<NodeFilter>",
     "SerializedScriptValue" => "RefPtr<SerializedScriptValue>",
     "IDBKey" => "PassRefPtr<IDBKey>",
-    "OptionsObject" => "OptionsObject",
+    "Dictionary" => "Dictionary",
     "boolean" => "bool",
     "double" => "double",
     "float" => "float",
@@ -2925,10 +2925,10 @@ sub JSValueToNative
         return "createIDBKeyFromValue(exec, $value)";
     }
 
-    if ($type eq "OptionsObject") {
+    if ($type eq "Dictionary") {
         AddToImplIncludes("IDBBindingUtilities.h", $conditional);
-        AddToImplIncludes("OptionsObject.h", $conditional);
-        return "createOptionsObjectFromValue(exec, $value)";
+        AddToImplIncludes("Dictionary.h", $conditional);
+        return "createDictionaryFromValue(exec, $value)";
     }
 
     if ($type eq "DOMString[]") {
index c58f1f5..aa49496 100644 (file)
@@ -289,7 +289,7 @@ sub GenerateHeader
 
     push(@headerContent, "\n");
     push(@headerContent, "class FloatRect;\n") if $svgPropertyType && $svgPropertyType eq "FloatRect";
-    push(@headerContent, "class OptionsObject;\n") if IsConstructorTemplate($dataNode, "Event");
+    push(@headerContent, "class Dictionary;\n") if IsConstructorTemplate($dataNode, "Event");
 
     my $nativeType = GetNativeTypeForConversions($dataNode, $interfaceName);
     if ($dataNode->extendedAttributes->{"NamedConstructor"}) {
@@ -492,7 +492,7 @@ END
     }
 
     if (IsConstructorTemplate($dataNode, "Event")) {
-        push(@headerContent, "\nbool fill${implClassName}Init(${implClassName}Init&, const OptionsObject&);\n");
+        push(@headerContent, "\nbool fill${implClassName}Init(${implClassName}Init&, const Dictionary&);\n");
     }
 
     push(@headerContent, "\n}\n\n");
@@ -1591,7 +1591,7 @@ sub GenerateParametersCheck
             }
             $parameterCheckString .= "    EXCEPTION_BLOCK($nativeType, $parameterName, " .
                  JSValueToNative($parameter, "MAYBE_MISSING_PARAMETER(args, $paramIndex, $parameterDefaultPolicy)") . ");\n";
-            if ($nativeType eq 'OptionsObject') {
+            if ($nativeType eq 'Dictionary') {
                $parameterCheckString .= "    if (args.Length() > $paramIndex && !$parameterName.isUndefinedOrNull() && !$parameterName.isObject()) {\n";
                $parameterCheckString .= "        ec = TYPE_MISMATCH_ERR;\n";
                $parameterCheckString .= "        V8Proxy::setDOMException(ec);\n";
@@ -1716,7 +1716,7 @@ sub GenerateEventConstructorCallback
     my $dataNode = shift;
     my $implClassName = shift;
 
-    AddToImplIncludes("OptionsObject.h");
+    AddToImplIncludes("Dictionary.h");
     AddToImplIncludes("V8BindingMacros.h");
     push(@implContent, <<END);
 v8::Handle<v8::Value> V8${implClassName}::constructorCallback(const v8::Arguments& args)
@@ -1735,7 +1735,7 @@ v8::Handle<v8::Value> V8${implClassName}::constructorCallback(const v8::Argument
     STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, type, args[0]);
     ${implClassName}Init eventInit;
     if (args.Length() >= 2) {
-        EXCEPTION_BLOCK(OptionsObject, options, args[1]);
+        EXCEPTION_BLOCK(Dictionary, options, args[1]);
         if (!fill${implClassName}Init(eventInit, options))
             return v8::Undefined();
     }
@@ -1746,7 +1746,7 @@ v8::Handle<v8::Value> V8${implClassName}::constructorCallback(const v8::Argument
     return toV8(event.release(), args.Holder());
 }
 
-bool fill${implClassName}Init(${implClassName}Init& eventInit, const OptionsObject& options)
+bool fill${implClassName}Init(${implClassName}Init& eventInit, const Dictionary& options)
 {
 END
 
@@ -3355,7 +3355,7 @@ sub GetNativeType
     return "Node*" if $type eq "EventTarget" and $isParameter;
     return "double" if $type eq "Date";
     return "ScriptValue" if $type eq "DOMObject";
-    return "OptionsObject" if $type eq "OptionsObject";
+    return "Dictionary" if $type eq "Dictionary";
 
     return "String" if $type eq "DOMUserData";  # FIXME: Temporary hack?
 
@@ -3458,8 +3458,8 @@ sub JSValueToNative
         return "createIDBKeyFromValue($value)";
     }
 
-    if ($type eq "OptionsObject") {
-        AddToImplIncludes("OptionsObject.h");
+    if ($type eq "Dictionary") {
+        AddToImplIncludes("Dictionary.h");
         return $value;
     }
 
@@ -3607,7 +3607,7 @@ my %non_wrapper_types = (
     'NodeFilter' => 1,
     'EventListener' => 1,
     'IDBKey' => 1,
-    'OptionsObject' => 1,
+    'Dictionary' => 1,
     'Date' => 1,
     'MediaQueryListListener' => 1
 );
index 9d63fdd..2fbc393 100644 (file)
 #include "config.h"
 #include "WebDOMTestObj.h"
 
+#include "Dictionary.h"
 #include "Document.h"
 #include "HTMLNames.h"
 #include "IDBKey.h"
 #include "KURL.h"
-#include "OptionsObject.h"
 #include "SVGPoint.h"
 #include "SerializedScriptValue.h"
 #include "TestObj.h"
+#include "WebDOMDictionary.h"
 #include "WebDOMDocument.h"
 #include "WebDOMIDBKey.h"
-#include "WebDOMOptionsObject.h"
 #include "WebDOMSVGPoint.h"
 #include "WebDOMString.h"
 #include "WebDOMa.h"
@@ -704,7 +704,7 @@ void WebDOMTestObj::idbKey(const WebDOMIDBKey& key)
     impl()->idbKey(toWebCore(key));
 }
 
-void WebDOMTestObj::optionsObject(const WebDOMOptionsObject& oo, const WebDOMOptionsObject& ooo)
+void WebDOMTestObj::optionsObject(const WebDOMDictionary& oo, const WebDOMDictionary& ooo)
 {
     if (!impl())
         return;
index 8c72f23..f46f9be 100644 (file)
@@ -30,10 +30,10 @@ namespace WebCore {
 class TestObj;
 };
 
+class WebDOMDictionary;
 class WebDOMDocument;
 class WebDOMEventListener;
 class WebDOMIDBKey;
-class WebDOMOptionsObject;
 class WebDOMSVGPoint;
 class WebDOMString;
 class WebDOMTestObj;
@@ -150,7 +150,7 @@ public:
     WebDOMTestObj methodThatRequiresAllArgsAndThrows(const WebDOMString& strArg, const WebDOMTestObj& objArg);
     void serializedValue(const WebDOMString& serializedArg);
     void idbKey(const WebDOMIDBKey& key);
-    void optionsObject(const WebDOMOptionsObject& oo, const WebDOMOptionsObject& ooo);
+    void optionsObject(const WebDOMDictionary& oo, const WebDOMDictionary& ooo);
     void methodWithException();
     void addEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture);
     void removeEventListener(const WebDOMString& type, const WebDOMEventListener& listener, bool useCapture);
index 35add30..a6d0168 100644 (file)
 #include "WebKitDOMBinding.h"
 #include "bool.h"
 #include "gobject/ConvertToUTF8String.h"
+#include "webkit/WebKitDOMDictionary.h"
+#include "webkit/WebKitDOMDictionaryPrivate.h"
 #include "webkit/WebKitDOMDocument.h"
 #include "webkit/WebKitDOMDocumentPrivate.h"
 #include "webkit/WebKitDOMIDBKey.h"
 #include "webkit/WebKitDOMIDBKeyPrivate.h"
-#include "webkit/WebKitDOMOptionsObject.h"
-#include "webkit/WebKitDOMOptionsObjectPrivate.h"
 #include "webkit/WebKitDOMSVGPoint.h"
 #include "webkit/WebKitDOMSVGPointPrivate.h"
 #include "webkit/WebKitDOMSerializedScriptValue.h"
@@ -214,19 +214,19 @@ webkit_dom_test_obj_idb_key(WebKitDOMTestObj* self, WebKitDOMIDBKey* key)
 }
 
 void
-webkit_dom_test_obj_options_object(WebKitDOMTestObj* self, WebKitDOMOptionsObject* oo, WebKitDOMOptionsObject* ooo)
+webkit_dom_test_obj_options_object(WebKitDOMTestObj* self, WebKitDOMDictionary* oo, WebKitDOMDictionary* ooo)
 {
     g_return_if_fail(self);
     WebCore::JSMainThreadNullState state;
     WebCore::TestObj * item = WebKit::core(self);
     g_return_if_fail(oo);
     g_return_if_fail(ooo);
-    WebCore::OptionsObject * converted_oo = NULL;
+    WebCore::Dictionary * converted_oo = NULL;
     if (oo != NULL) {
         converted_oo = WebKit::core(oo);
         g_return_if_fail(converted_oo);
     }
-    WebCore::OptionsObject * converted_ooo = NULL;
+    WebCore::Dictionary * converted_ooo = NULL;
     if (ooo != NULL) {
         converted_ooo = WebKit::core(ooo);
         g_return_if_fail(converted_ooo);
index caeb51f..c4d20c6 100644 (file)
@@ -153,14 +153,14 @@ webkit_dom_test_obj_idb_key(WebKitDOMTestObj* self, WebKitDOMIDBKey* key);
 /**
  * webkit_dom_test_obj_options_object:
  * @self: A #WebKitDOMTestObj
- * @oo: A #WebKitDOMOptionsObject
- * @ooo: A #WebKitDOMOptionsObject
+ * @oo: A #WebKitDOMDictionary
+ * @ooo: A #WebKitDOMDictionary
  *
  * Returns:
  *
 **/
 WEBKIT_API void
-webkit_dom_test_obj_options_object(WebKitDOMTestObj* self, WebKitDOMOptionsObject* oo, WebKitDOMOptionsObject* ooo);
+webkit_dom_test_obj_options_object(WebKitDOMTestObj* self, WebKitDOMDictionary* oo, WebKitDOMDictionary* ooo);
 
 /**
  * webkit_dom_test_obj_method_with_exception:
index 11a20df..7fcf83a 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #include "JSTestObj.h"
 
+#include "Dictionary.h"
 #include "Document.h"
 #include "ExceptionCode.h"
 #include "HTMLNames.h"
@@ -30,7 +31,6 @@
 #include "JSDOMStringList.h"
 #include "JSDocument.h"
 #include "JSEventListener.h"
-#include "JSOptionsObject.h"
 #include "JSSVGDocument.h"
 #include "JSSVGPoint.h"
 #include "JSTestCallback.h"
@@ -1418,7 +1418,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIdbKey(ExecState* exec)
     TestObj* impl = static_cast<TestObj*>(castedThis->impl());
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
-    RefPtr<IDBKey> key(createIDBKeyFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
+    PassRefPtr<IDBKey> key(createIDBKeyFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
     impl->idbKey(key);
@@ -1435,7 +1435,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState*
     TestObj* impl = static_cast<TestObj*>(castedThis->impl());
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
-    OptionsObject* oo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
+    Dictionary oo(createDictionaryFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
 
@@ -1445,7 +1445,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState*
         return JSValue::encode(jsUndefined());
     }
 
-    OptionsObject* ooo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined)));
+    Dictionary ooo(createDictionaryFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 1, DefaultIsUndefined)));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
     impl->optionsObject(oo, ooo);
index aebc39f..8fd341e 100644 (file)
@@ -28,9 +28,9 @@
 
 #if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
 
+@class DOMDictionary;
 @class DOMDocument;
 @class DOMIDBKey;
-@class DOMOptionsObject;
 @class DOMSVGDocument;
 @class DOMSVGPoint;
 @class DOMTestObj;
@@ -174,7 +174,7 @@ enum {
 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg;
 - (void)serializedValue:(NSString *)serializedArg;
 - (void)idbKey:(DOMIDBKey *)key;
-- (void)optionsObject:(DOMOptionsObject *)oo ooo:(DOMOptionsObject *)ooo;
+- (void)optionsObject:(DOMDictionary *)oo ooo:(DOMDictionary *)ooo;
 - (void)methodWithException;
 - (void)customMethod;
 - (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
index abd3b9c..a16a72e 100644 (file)
 #import "DOMBlobInternal.h"
 #import "DOMCSSRuleInternal.h"
 #import "DOMCSSValueInternal.h"
+#import "DOMDictionaryInternal.h"
 #import "DOMDocumentInternal.h"
 #import "DOMEventInternal.h"
 #import "DOMIDBKeyInternal.h"
 #import "DOMNodeInternal.h"
-#import "DOMOptionsObjectInternal.h"
 #import "DOMSVGDocumentInternal.h"
 #import "DOMSVGPointInternal.h"
 #import "DOMStyleSheetInternal.h"
@@ -50,6 +50,7 @@
 #import "DOMcInternal.h"
 #import "DOMdInternal.h"
 #import "DOMeInternal.h"
+#import "Dictionary.h"
 #import "Document.h"
 #import "EventListener.h"
 #import "ExceptionHandlers.h"
@@ -58,7 +59,6 @@
 #import "JSMainThreadExecState.h"
 #import "KURL.h"
 #import "ObjCEventListener.h"
-#import "OptionsObject.h"
 #import "SVGDocument.h"
 #import "SVGStaticPropertyTearOff.h"
 #import "SerializedScriptValue.h"
     IMPL->idbKey(core(key));
 }
 
-- (void)optionsObject:(DOMOptionsObject *)oo ooo:(DOMOptionsObject *)ooo
+- (void)optionsObject:(DOMDictionary *)oo ooo:(DOMDictionary *)ooo
 {
     WebCore::JSMainThreadNullState state;
     IMPL->optionsObject(core(oo), core(ooo));
index fd5dbf9..9dc7ed0 100644 (file)
@@ -75,7 +75,7 @@ module test {
 
         void serializedValue(in SerializedScriptValue serializedArg);
         void idbKey(in IDBKey key);
-        void optionsObject(in OptionsObject oo, in [Optional] OptionsObject ooo);
+        void optionsObject(in Dictionary oo, in [Optional] Dictionary ooo);
 
         // Exceptions
         void methodWithException() raises(DOMException);
index 7c06e34..a3906d1 100644 (file)
@@ -21,7 +21,7 @@
 #include "config.h"
 #include "V8TestEventConstructor.h"
 
-#include "OptionsObject.h"
+#include "Dictionary.h"
 #include "RuntimeEnabledFeatures.h"
 #include "V8Binding.h"
 #include "V8BindingMacros.h"
@@ -78,7 +78,7 @@ v8::Handle<v8::Value> V8TestEventConstructor::constructorCallback(const v8::Argu
     STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, type, args[0]);
     TestEventConstructorInit eventInit;
     if (args.Length() >= 2) {
-        EXCEPTION_BLOCK(OptionsObject, options, args[1]);
+        EXCEPTION_BLOCK(Dictionary, options, args[1]);
         if (!fillTestEventConstructorInit(eventInit, options))
             return v8::Undefined();
     }
@@ -89,7 +89,7 @@ v8::Handle<v8::Value> V8TestEventConstructor::constructorCallback(const v8::Argu
     return toV8(event.release(), args.Holder());
 }
 
-bool fillTestEventConstructorInit(TestEventConstructorInit& eventInit, const OptionsObject& options)
+bool fillTestEventConstructorInit(TestEventConstructorInit& eventInit, const Dictionary& options)
 {
     options.get("attr2", eventInit.attr2);
     return true;
index 7576245..a22d541 100644 (file)
@@ -30,7 +30,7 @@
 
 namespace WebCore {
 
-class OptionsObject;
+class Dictionary;
 class V8TestEventConstructor {
 public:
     static const bool hasDependentLifetime = false;
@@ -69,7 +69,7 @@ inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventConstructor > impl)
     return toV8(impl.get());
 }
 
-bool fillTestEventConstructorInit(TestEventConstructorInit&, const OptionsObject&);
+bool fillTestEventConstructorInit(TestEventConstructorInit&, const Dictionary&);
 
 }
 
index 05b747f..187eeec 100644 (file)
 #include "config.h"
 #include "V8TestObj.h"
 
+#include "Dictionary.h"
 #include "ExceptionCode.h"
 #include "HTMLNames.h"
 #include "IDBBindingUtilities.h"
 #include "IDBKey.h"
-#include "OptionsObject.h"
 #include "RuntimeEnabledFeatures.h"
 #include "SVGPropertyTearOff.h"
 #include "SVGStaticPropertyTearOff.h"
@@ -1086,7 +1086,7 @@ static v8::Handle<v8::Value> optionsObjectCallback(const v8::Arguments& args)
     if (args.Length() < 1)
         return throwError("Not enough arguments", V8Proxy::TypeError);
     TestObj* imp = V8TestObj::toNative(args.Holder());
-    EXCEPTION_BLOCK(OptionsObject, oo, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
+    EXCEPTION_BLOCK(Dictionary, oo, MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined));
     if (args.Length() > 0 && !oo.isUndefinedOrNull() && !oo.isObject()) {
         ec = TYPE_MISMATCH_ERR;
         V8Proxy::setDOMException(ec);
@@ -1096,7 +1096,7 @@ static v8::Handle<v8::Value> optionsObjectCallback(const v8::Arguments& args)
         imp->optionsObject(oo);
         return v8::Handle<v8::Value>();
     }
-    EXCEPTION_BLOCK(OptionsObject, ooo, MAYBE_MISSING_PARAMETER(args, 1, DefaultIsUndefined));
+    EXCEPTION_BLOCK(Dictionary, ooo, MAYBE_MISSING_PARAMETER(args, 1, DefaultIsUndefined));
     if (args.Length() > 1 && !ooo.isUndefinedOrNull() && !ooo.isObject()) {
         ec = TYPE_MISMATCH_ERR;
         V8Proxy::setDOMException(ec);
similarity index 84%
rename from Source/WebCore/bindings/v8/OptionsObject.cpp
rename to Source/WebCore/bindings/v8/Dictionary.cpp
index e8c7dd9..c29f96a 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "OptionsObject.h"
+#include "Dictionary.h"
 
 #include "DOMStringList.h"
 #include "V8Binding.h"
 
 namespace WebCore {
 
-OptionsObject::OptionsObject()
+Dictionary::Dictionary()
 {
 }
 
-OptionsObject::OptionsObject(const v8::Local<v8::Value>& options)
+Dictionary::Dictionary(const v8::Local<v8::Value>& options)
     : m_options(options)
 {
 }
 
-OptionsObject::~OptionsObject()
+Dictionary::~Dictionary()
 {
 }
 
-OptionsObject& OptionsObject::operator=(const OptionsObject& optionsObject)
+Dictionary& Dictionary::operator=(const Dictionary& optionsObject)
 {
     m_options = optionsObject.m_options;
     return *this;
 }
 
-bool OptionsObject::isObject() const
+bool Dictionary::isObject() const
 {
     return !isUndefinedOrNull() && m_options->IsObject();
 }
 
-bool OptionsObject::isUndefinedOrNull() const
+bool Dictionary::isUndefinedOrNull() const
 {
     if (m_options.IsEmpty())
         return true;
     return WebCore::isUndefinedOrNull(m_options);
 }
 
-bool OptionsObject::getKey(const String& key, v8::Local<v8::Value>& value) const
+bool Dictionary::getKey(const String& key, v8::Local<v8::Value>& value) const
 {
     if (isUndefinedOrNull())
         return false;
@@ -101,7 +101,7 @@ bool OptionsObject::getKey(const String& key, v8::Local<v8::Value>& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, bool& value) const
+bool Dictionary::get(const String& key, bool& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -114,7 +114,7 @@ bool OptionsObject::get(const String& key, bool& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, int32_t& value) const
+bool Dictionary::get(const String& key, int32_t& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -127,7 +127,7 @@ bool OptionsObject::get(const String& key, int32_t& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, double& value) const
+bool Dictionary::get(const String& key, double& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -140,7 +140,7 @@ bool OptionsObject::get(const String& key, double& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, String& value) const
+bool Dictionary::get(const String& key, String& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -154,7 +154,7 @@ bool OptionsObject::get(const String& key, String& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, ScriptValue& value) const
+bool Dictionary::get(const String& key, ScriptValue& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -164,7 +164,7 @@ bool OptionsObject::get(const String& key, ScriptValue& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, unsigned short& value) const
+bool Dictionary::get(const String& key, unsigned short& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -177,7 +177,7 @@ bool OptionsObject::get(const String& key, unsigned short& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, short& value) const
+bool Dictionary::get(const String& key, short& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -190,7 +190,7 @@ bool OptionsObject::get(const String& key, short& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, unsigned& value) const
+bool Dictionary::get(const String& key, unsigned& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -203,7 +203,7 @@ bool OptionsObject::get(const String& key, unsigned& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, unsigned long long& value) const
+bool Dictionary::get(const String& key, unsigned long long& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -217,7 +217,7 @@ bool OptionsObject::get(const String& key, unsigned long long& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, RefPtr<DOMWindow>& value) const
+bool Dictionary::get(const String& key, RefPtr<DOMWindow>& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -234,7 +234,7 @@ bool OptionsObject::get(const String& key, RefPtr<DOMWindow>& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, RefPtr<Storage>& value) const
+bool Dictionary::get(const String& key, RefPtr<Storage>& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -251,7 +251,7 @@ bool OptionsObject::get(const String& key, RefPtr<Storage>& value) const
     return true;
 }
 
-bool OptionsObject::get(const String& key, MessagePortArray& value) const
+bool Dictionary::get(const String& key, MessagePortArray& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -260,7 +260,7 @@ bool OptionsObject::get(const String& key, MessagePortArray& value) const
     return getMessagePortArray(v8Value, value);
 }
 
-bool OptionsObject::get(const String& key, HashSet<AtomicString>& value) const
+bool Dictionary::get(const String& key, HashSet<AtomicString>& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -279,7 +279,7 @@ bool OptionsObject::get(const String& key, HashSet<AtomicString>& value) const
     return true;
 }
 
-bool OptionsObject::getWithUndefinedOrNullCheck(const String& key, String& value) const
+bool Dictionary::getWithUndefinedOrNullCheck(const String& key, String& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value) || v8Value->IsNull() || v8Value->IsUndefined())
@@ -294,7 +294,7 @@ bool OptionsObject::getWithUndefinedOrNullCheck(const String& key, String& value
 }
 
 #if ENABLE(VIDEO_TRACK)
-bool OptionsObject::get(const String& key, RefPtr<TrackBase>& value) const
+bool Dictionary::get(const String& key, RefPtr<TrackBase>& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -316,7 +316,7 @@ bool OptionsObject::get(const String& key, RefPtr<TrackBase>& value) const
 #endif
 
 #if ENABLE(SCRIPTED_SPEECH)
-bool OptionsObject::get(const String& key, RefPtr<SpeechRecognitionError>& value) const
+bool Dictionary::get(const String& key, RefPtr<SpeechRecognitionError>& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -333,7 +333,7 @@ bool OptionsObject::get(const String& key, RefPtr<SpeechRecognitionError>& value
     return true;
 }
 
-bool OptionsObject::get(const String& key, RefPtr<SpeechRecognitionResult>& value) const
+bool Dictionary::get(const String& key, RefPtr<SpeechRecognitionResult>& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
@@ -350,7 +350,7 @@ bool OptionsObject::get(const String& key, RefPtr<SpeechRecognitionResult>& valu
     return true;
 }
 
-bool OptionsObject::get(const String& key, RefPtr<SpeechRecognitionResultList>& value) const
+bool Dictionary::get(const String& key, RefPtr<SpeechRecognitionResultList>& value) const
 {
     v8::Local<v8::Value> v8Value;
     if (!getKey(key, v8Value))
similarity index 92%
rename from Source/WebCore/bindings/v8/OptionsObject.h
rename to Source/WebCore/bindings/v8/Dictionary.h
index 3260378..26c4a6b 100644 (file)
@@ -23,8 +23,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef OptionsObject_h
-#define OptionsObject_h
+#ifndef Dictionary_h
+#define Dictionary_h
 
 #include "MessagePort.h"
 #include "PlatformString.h"
@@ -44,13 +44,13 @@ class SpeechRecognitionError;
 class SpeechRecognitionResult;
 class SpeechRecognitionResultList;
 
-class OptionsObject {
+class Dictionary {
 public:
-    OptionsObject();
-    OptionsObject(const v8::Local<v8::Value>& options);
-    ~OptionsObject();
+    Dictionary();
+    Dictionary(const v8::Local<v8::Value>& options);
+    ~Dictionary();
 
-    OptionsObject& operator=(const OptionsObject&);
+    Dictionary& operator=(const Dictionary&);
 
     bool isObject() const;
     bool isUndefinedOrNull() const;
@@ -92,4 +92,4 @@ private:
 
 }
 
-#endif // OptionsObject_h
+#endif // Dictionary_h
index d32b44f..f7189b7 100644 (file)
@@ -34,8 +34,8 @@
 
 #include "V8WebKitMutationObserver.h"
 
+#include "Dictionary.h"
 #include "ExceptionCode.h"
-#include "OptionsObject.h"
 #include "V8Binding.h"
 #include "V8BindingMacros.h"
 #include "V8DOMWrapper.h"
@@ -91,7 +91,7 @@ v8::Handle<v8::Value> V8WebKitMutationObserver::observeCallback(const v8::Argume
     if (!args[1]->IsObject())
         return throwError(TYPE_MISMATCH_ERR);
 
-    OptionsObject optionsObject(args[1]);
+    Dictionary optionsObject(args[1]);
     unsigned options = 0;
     HashSet<AtomicString> attributeFilter;
     bool option;