Title: [177699] trunk/Source/WebKit2
Revision
177699
Author
[email protected]
Date
2014-12-23 15:07:40 -0800 (Tue, 23 Dec 2014)

Log Message

Rename ImmutableDictionary to API::Dictionary and merge MutableDictionary into it
https://bugs.webkit.org/show_bug.cgi?id=139917

Reviewed by Anders Carlsson.

- Renames ImmutableDictionary -> API::Dictionary
- Merges MutableDictionary into the new API::Dictionary
    (as a result WKDictionaryIsMutable() now always returns true)

* File list elided *

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (177698 => 177699)


--- trunk/Source/WebKit2/ChangeLog	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/ChangeLog	2014-12-23 23:07:40 UTC (rev 177699)
@@ -1,3 +1,16 @@
+2014-12-23  Sam Weinig  <[email protected]>
+
+        Rename ImmutableDictionary to API::Dictionary and merge MutableDictionary into it
+        https://bugs.webkit.org/show_bug.cgi?id=139917
+
+        Reviewed by Anders Carlsson.
+
+        - Renames ImmutableDictionary -> API::Dictionary
+        - Merges MutableDictionary into the new API::Dictionary
+            (as a result WKDictionaryIsMutable() now always returns true)
+
+        * File list elided *
+
 2014-12-23  Anders Carlsson  <[email protected]>
 
         Add WebProcess::transformObjectsToHandles

Copied: trunk/Source/WebKit2/Shared/API/APIDictionary.cpp (from rev 177692, trunk/Source/WebKit2/Shared/ImmutableDictionary.cpp) (0 => 177699)


--- trunk/Source/WebKit2/Shared/API/APIDictionary.cpp	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/API/APIDictionary.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "APIDictionary.h"
+
+#include "APIArray.h"
+#include "APIString.h"
+
+namespace API {
+
+RefPtr<Dictionary> Dictionary::create()
+{
+    return create({ });
+}
+
+RefPtr<Dictionary> Dictionary::create(MapType map)
+{
+    return adoptRef(new Dictionary(WTF::move(map)));
+}
+
+Dictionary::Dictionary(MapType map)
+    : m_map(WTF::move(map))
+{
+}
+
+Dictionary::~Dictionary()
+{
+}
+
+PassRefPtr<Array> Dictionary::keys() const
+{
+    if (m_map.isEmpty())
+        return API::Array::create();
+
+    Vector<RefPtr<API::Object>> keys;
+    keys.reserveInitialCapacity(m_map.size());
+
+    for (const auto& key : m_map.keys())
+        keys.uncheckedAppend(API::String::create(key));
+
+    return API::Array::create(WTF::move(keys));
+}
+
+bool Dictionary::add(const WTF::String& key, PassRefPtr<API::Object> item)
+{
+    MapType::AddResult result = m_map.add(key, item);
+    return result.isNewEntry;
+}
+
+bool Dictionary::set(const WTF::String& key, PassRefPtr<API::Object> item)
+{
+    MapType::AddResult result = m_map.set(key, item);
+    return result.isNewEntry;
+}
+
+void Dictionary::remove(const WTF::String& key)
+{
+    m_map.remove(key);
+}
+
+} // namespace API

Copied: trunk/Source/WebKit2/Shared/API/APIDictionary.h (from rev 177692, trunk/Source/WebKit2/Shared/ImmutableDictionary.h) (0 => 177699)


--- trunk/Source/WebKit2/Shared/API/APIDictionary.h	                        (rev 0)
+++ trunk/Source/WebKit2/Shared/API/APIDictionary.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APIDictionary_h
+#define APIDictionary_h
+
+#include "APIObject.h"
+#include <wtf/HashMap.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+namespace API {
+
+class Array;
+
+class Dictionary final : public ObjectImpl<Object::Type::Dictionary> {
+public:
+    typedef HashMap<WTF::String, RefPtr<Object>> MapType;
+
+    static RefPtr<Dictionary> create();
+    static RefPtr<Dictionary> create(MapType);
+
+    virtual ~Dictionary();
+
+    template<typename T>
+    T* get(const WTF::String& key) const
+    {
+        RefPtr<Object> item = m_map.get(key);
+        if (!item)
+            return 0;
+
+        if (item->type() != T::APIType)
+            return 0;
+
+        return static_cast<T*>(item.get());
+    }
+
+    Object* get(const WTF::String& key) const
+    {
+        return m_map.get(key);
+    }
+
+    Object* get(const WTF::String& key, bool& exists) const
+    {
+        auto it = m_map.find(key);
+        exists = it != m_map.end();
+        return it->value.get();
+    }
+
+    PassRefPtr<Array> keys() const;
+
+    bool add(const WTF::String& key, PassRefPtr<Object>);
+    bool set(const WTF::String& key, PassRefPtr<Object>);
+    void remove(const WTF::String& key);
+
+    size_t size() const { return m_map.size(); }
+
+    const MapType& map() const { return m_map; }
+
+protected:
+    explicit Dictionary(MapType);
+
+    MapType m_map;
+};
+
+} // namespace API
+
+#endif // APIDictionary_h

Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.h (177698 => 177699)


--- trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,21 +27,21 @@
 
 #if WK_API_ENABLED
 
-namespace WebKit {
-class ImmutableDictionary;
+namespace API {
+class Dictionary;
 }
 
 @class _WKRemoteObjectInterface;
 
 @interface WKRemoteObjectEncoder : NSCoder
 
-- (WebKit::ImmutableDictionary*)rootObjectDictionary;
+- (API::Dictionary*)rootObjectDictionary;
 
 @end
 
 @interface WKRemoteObjectDecoder : NSCoder
 
-- (id)initWithInterface:(_WKRemoteObjectInterface *)interface rootObjectDictionary:(const WebKit::ImmutableDictionary*)rootObjectDictionary;
+- (id)initWithInterface:(_WKRemoteObjectInterface *)interface rootObjectDictionary:(const API::Dictionary*)rootObjectDictionary;
 
 @end
 

Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm (177698 => 177699)


--- trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm	2014-12-23 23:07:40 UTC (rev 177699)
@@ -30,9 +30,9 @@
 
 #import "APIArray.h"
 #import "APIData.h"
+#import "APIDictionary.h"
 #import "APINumber.h"
 #import "APIString.h"
-#import "MutableDictionary.h"
 #import "_WKRemoteObjectInterfaceInternal.h"
 #import <objc/runtime.h>
 #import <wtf/RetainPtr.h>
@@ -45,10 +45,8 @@
 static NSString * const selectorKey = @"selector";
 static NSString * const typeStringKey = @"typeString";
 
-using namespace WebKit;
+static PassRefPtr<API::Dictionary> createEncodedObject(WKRemoteObjectEncoder *, id);
 
-static PassRefPtr<ImmutableDictionary> createEncodedObject(WKRemoteObjectEncoder *, id);
-
 @interface NSMethodSignature (Details)
 - (NSString *)_typeString;
 @end
@@ -58,10 +56,10 @@
 @end
 
 @implementation WKRemoteObjectEncoder {
-    RefPtr<MutableDictionary> _rootDictionary;
+    RefPtr<API::Dictionary> _rootDictionary;
     API::Array* _objectStream;
 
-    MutableDictionary* _currentDictionary;
+    API::Dictionary* _currentDictionary;
 }
 
 - (id)init
@@ -69,7 +67,7 @@
     if (!(self = [super init]))
         return nil;
 
-    _rootDictionary = MutableDictionary::create();
+    _rootDictionary = API::Dictionary::create();
     _currentDictionary = _rootDictionary.get();
 
     return self;
@@ -84,7 +82,7 @@
 }
 #endif
 
-- (ImmutableDictionary*)rootObjectDictionary
+- (API::Dictionary*)rootObjectDictionary
 {
     return _rootDictionary.get();
 }
@@ -107,7 +105,7 @@
     size_t position = encoder->_objectStream->size();
     encoder->_objectStream->elements().append(nullptr);
 
-    RefPtr<ImmutableDictionary> encodedObject = createEncodedObject(encoder, value);
+    RefPtr<API::Dictionary> encodedObject = createEncodedObject(encoder, value);
     ASSERT(!encoder->_objectStream->elements()[position]);
     encoder->_objectStream->elements()[position] = encodedObject.release();
 }
@@ -240,13 +238,13 @@
     [object encodeWithCoder:encoder];
 }
 
-static PassRefPtr<ImmutableDictionary> createEncodedObject(WKRemoteObjectEncoder *encoder, id object)
+static PassRefPtr<API::Dictionary> createEncodedObject(WKRemoteObjectEncoder *encoder, id object)
 {
     if (!object)
         return nil;
 
-    RefPtr<MutableDictionary> dictionary = MutableDictionary::create();
-    TemporaryChange<MutableDictionary*> dictionaryChange(encoder->_currentDictionary, dictionary.get());
+    RefPtr<API::Dictionary> dictionary = API::Dictionary::create();
+    TemporaryChange<API::Dictionary*> dictionaryChange(encoder->_currentDictionary, dictionary.get());
 
     encodeObject(encoder, object);
 
@@ -329,8 +327,8 @@
 @implementation WKRemoteObjectDecoder {
     RetainPtr<_WKRemoteObjectInterface> _interface;
 
-    const ImmutableDictionary* _rootDictionary;
-    const ImmutableDictionary* _currentDictionary;
+    const API::Dictionary* _rootDictionary;
+    const API::Dictionary* _currentDictionary;
 
     const API::Array* _objectStream;
     size_t _objectStreamPosition;
@@ -338,7 +336,7 @@
     NSSet *_allowedClasses;
 }
 
-- (id)initWithInterface:(_WKRemoteObjectInterface *)interface rootObjectDictionary:(const WebKit::ImmutableDictionary*)rootObjectDictionary
+- (id)initWithInterface:(_WKRemoteObjectInterface *)interface rootObjectDictionary:(const API::Dictionary*)rootObjectDictionary
 {
     if (!(self = [super init]))
         return nil;
@@ -381,7 +379,7 @@
     return [self decodeObjectOfClasses:nil forKey:key];
 }
 
-static id decodeObject(WKRemoteObjectDecoder *, const ImmutableDictionary*, NSSet *allowedClasses);
+static id decodeObject(WKRemoteObjectDecoder *, const API::Dictionary*, NSSet *allowedClasses);
 
 static id decodeObjectFromObjectStream(WKRemoteObjectDecoder *decoder, NSSet *allowedClasses)
 {
@@ -391,7 +389,7 @@
     if (decoder->_objectStreamPosition == decoder->_objectStream->size())
         return nil;
 
-    const ImmutableDictionary* dictionary = decoder->_objectStream->at<ImmutableDictionary>(decoder->_objectStreamPosition++);
+    const API::Dictionary* dictionary = decoder->_objectStream->at<API::Dictionary>(decoder->_objectStreamPosition++);
 
     return decodeObject(decoder, dictionary, allowedClasses);
 }
@@ -570,12 +568,12 @@
     return [result autorelease];
 }
 
-static id decodeObject(WKRemoteObjectDecoder *decoder, const ImmutableDictionary* dictionary, NSSet *allowedClasses)
+static id decodeObject(WKRemoteObjectDecoder *decoder, const API::Dictionary* dictionary, NSSet *allowedClasses)
 {
     if (!dictionary)
         return nil;
 
-    TemporaryChange<const ImmutableDictionary*> dictionaryChange(decoder->_currentDictionary, dictionary);
+    TemporaryChange<const API::Dictionary*> dictionaryChange(decoder->_currentDictionary, dictionary);
 
     // If no allowed classes were listed, just use the currently allowed classes.
     if (!allowedClasses)
@@ -641,7 +639,7 @@
 
 - (id)decodeObjectOfClasses:(NSSet *)classes forKey:(NSString *)key
 {
-    return decodeObject(self, _currentDictionary->get<ImmutableDictionary>(escapeKey(key)), classes);
+    return decodeObject(self, _currentDictionary->get<API::Dictionary>(escapeKey(key)), classes);
 }
 
 - (NSSet *)allowedClasses

Modified: trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm (177698 => 177699)


--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm	2014-12-23 23:07:40 UTC (rev 177699)
@@ -28,9 +28,8 @@
 
 #if WK_API_ENABLED
 
+#import "APIDictionary.h"
 #import "Connection.h"
-#import "ImmutableDictionary.h"
-#import "MutableDictionary.h"
 #import "RemoteObjectRegistry.h"
 #import "UserData.h"
 #import "WKConnectionRef.h"
@@ -103,7 +102,7 @@
     RetainPtr<WKRemoteObjectEncoder> encoder = adoptNS([[WKRemoteObjectEncoder alloc] init]);
     [encoder encodeObject:invocation forKey:invocationKey];
 
-    RefPtr<MutableDictionary> body = MutableDictionary::create();
+    RefPtr<API::Dictionary> body = API::Dictionary::create();
     body->set(interfaceIdentifierKey, API::String::create(interface.identifier));
     body->set(encodedInvocationKey, [encoder rootObjectDictionary]);
 
@@ -123,13 +122,13 @@
     if (!invocation.object() || invocation.object()->type() != API::Object::Type::Dictionary)
         return NO;
     
-    const ImmutableDictionary& dictionary = static_cast<const ImmutableDictionary&>(*invocation.object());
+    const API::Dictionary& dictionary = static_cast<const API::Dictionary&>(*invocation.object());
 
     API::String* interfaceIdentifier = dictionary.get<API::String>(interfaceIdentifierKey);
     if (!interfaceIdentifier)
         return NO;
 
-    const ImmutableDictionary* encodedInvocation = dictionary.get<ImmutableDictionary>(encodedInvocationKey);
+    const API::Dictionary* encodedInvocation = dictionary.get<API::Dictionary>(encodedInvocationKey);
     if (!encodedInvocationKey)
         return NO;
 
@@ -138,7 +137,7 @@
     return YES;
 }
 
-- (void)_invokeMessageWithInterfaceIdentifier:(const String&)interfaceIdentifier encodedInvocation:(const ImmutableDictionary*)encodedInvocation
+- (void)_invokeMessageWithInterfaceIdentifier:(const String&)interfaceIdentifier encodedInvocation:(const API::Dictionary*)encodedInvocation
 {
     auto interfaceAndObject = _exportedObjects.get(interfaceIdentifier);
     if (!interfaceAndObject.second) {

Modified: trunk/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp (177698 => 177699)


--- trunk/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/API/c/WKDeprecatedFunctions.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#include "MutableDictionary.h"
+#include "APIDictionary.h"
 #include "WKArray.h"
 #include "WKMutableDictionary.h"
 #include "WKSharedAPICast.h"
@@ -43,8 +43,8 @@
 
 WK_EXPORT void WKPageSetVisibilityState(WKPageRef, WKPageVisibilityState, bool);
 
+WK_EXPORT bool WKDictionaryIsMutable(WKDictionaryRef dictionary);
 WK_EXPORT bool WKDictionaryAddItem(WKMutableDictionaryRef dictionary, WKStringRef key, WKTypeRef item);
-WK_EXPORT bool WKDictionaryIsMutable(WKDictionaryRef dictionary);
 WK_EXPORT void WKDictionaryRemoveItem(WKMutableDictionaryRef dictionary, WKStringRef key);
 
 WK_EXPORT void WKPreferencesSetRegionBasedColumnsEnabled(WKPreferencesRef, bool flag);
@@ -73,9 +73,9 @@
 {
 }
 
-bool WKDictionaryIsMutable(WKDictionaryRef dictionaryRef)
+bool WKDictionaryIsMutable(WKDictionaryRef)
 {
-    return toImpl(dictionaryRef)->isMutable();
+    return true;
 }
 
 bool WKDictionaryAddItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef)

Modified: trunk/Source/WebKit2/Shared/API/c/WKDictionary.cpp (177698 => 177699)


--- trunk/Source/WebKit2/Shared/API/c/WKDictionary.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/API/c/WKDictionary.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,23 +27,23 @@
 #include "WKDictionary.h"
 
 #include "APIArray.h"
-#include "ImmutableDictionary.h"
+#include "APIDictionary.h"
 #include "WKAPICast.h"
 
 using namespace WebKit;
 
 WKTypeID WKDictionaryGetTypeID()
 {
-    return toAPI(ImmutableDictionary::APIType);
+    return toAPI(API::Dictionary::APIType);
 }
 
 WK_EXPORT WKDictionaryRef WKDictionaryCreate(const WKStringRef* keys, const WKTypeRef* values, size_t numberOfValues)
 {
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
     for (size_t i = 0; i < numberOfValues; ++i)
         map.add(toImpl(keys[i])->string(), toImpl(values[i]));
 
-    return toAPI(ImmutableDictionary::create(WTF::move(map)).release().leakRef());
+    return toAPI(API::Dictionary::create(WTF::move(map)).release().leakRef());
 }
 
 WKTypeRef WKDictionaryGetItemForKey(WKDictionaryRef dictionaryRef, WKStringRef key)

Modified: trunk/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp (177698 => 177699)


--- trunk/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -26,15 +26,15 @@
 #include "config.h"
 #include "WKMutableDictionary.h"
 
-#include "MutableDictionary.h"
+#include "APIDictionary.h"
 #include "WKAPICast.h"
 
 using namespace WebKit;
 
 WKMutableDictionaryRef WKMutableDictionaryCreate()
 {
-    RefPtr<MutableDictionary> dictionary = MutableDictionary::create();
-    return toAPI(dictionary.release().leakRef());
+    RefPtr<API::Dictionary> dictionary = API::Dictionary::create();
+    return const_cast<WKMutableDictionaryRef>(toAPI(dictionary.release().leakRef()));
 }
 
 bool WKDictionarySetItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef)

Modified: trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h (177698 => 177699)


--- trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -61,6 +61,7 @@
 
 namespace API {
 class Array;
+class Dictionary;
 class Data;
 class Point;
 class Rect;
@@ -74,8 +75,6 @@
 
 namespace WebKit {
 
-class ImmutableDictionary;
-class MutableDictionary;
 class ObjCObjectGraph;
 class WebCertificateInfo;
 class WebConnection;
@@ -96,12 +95,11 @@
 WK_ADD_API_MAPPING(WKConnectionRef, WebConnection)
 WK_ADD_API_MAPPING(WKContextMenuItemRef, WebContextMenuItem)
 WK_ADD_API_MAPPING(WKDataRef, API::Data)
-WK_ADD_API_MAPPING(WKDictionaryRef, ImmutableDictionary)
+WK_ADD_API_MAPPING(WKDictionaryRef, API::Dictionary)
 WK_ADD_API_MAPPING(WKDoubleRef, API::Double)
 WK_ADD_API_MAPPING(WKErrorRef, API::Error)
 WK_ADD_API_MAPPING(WKGraphicsContextRef, WebGraphicsContext)
 WK_ADD_API_MAPPING(WKImageRef, WebImage)
-WK_ADD_API_MAPPING(WKMutableDictionaryRef, MutableDictionary)
 WK_ADD_API_MAPPING(WKPointRef, API::Point)
 WK_ADD_API_MAPPING(WKRectRef, API::Rect)
 WK_ADD_API_MAPPING(WKSecurityOriginRef, API::SecurityOrigin)
@@ -117,6 +115,7 @@
 WK_ADD_API_MAPPING(WKSessionRef, API::Session)
 
 template<> struct APITypeInfo<WKMutableArrayRef> { typedef API::Array* ImplType; };
+template<> struct APITypeInfo<WKMutableDictionaryRef> { typedef API::Dictionary* ImplType; };
 
 #if PLATFORM(COCOA)
 WK_ADD_API_MAPPING(WKWebArchiveRef, API::WebArchive)

Modified: trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.h (177698 => 177699)


--- trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,11 +27,11 @@
 
 #if WK_API_ENABLED
 
-#import "ImmutableDictionary.h"
+#import "APIDictionary.h"
 #import "WKObject.h"
 
 namespace WebKit {
-inline NSDictionary *wrapper(ImmutableDictionary& dictionary) { ASSERT([dictionary.wrapper() isKindOfClass:[NSDictionary class]]); return (NSDictionary *)dictionary.wrapper(); }
+inline NSDictionary *wrapper(API::Dictionary& dictionary) { ASSERT([dictionary.wrapper() isKindOfClass:[NSDictionary class]]); return (NSDictionary *)dictionary.wrapper(); }
 }
 
 @interface WKNSDictionary : NSDictionary <WKObject>

Modified: trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm (177698 => 177699)


--- trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm	2014-12-23 23:07:40 UTC (rev 177699)
@@ -33,12 +33,12 @@
 using namespace WebKit;
 
 @implementation WKNSDictionary {
-    API::ObjectStorage<ImmutableDictionary> _dictionary;
+    API::ObjectStorage<API::Dictionary> _dictionary;
 }
 
 - (void)dealloc
 {
-    _dictionary->~ImmutableDictionary();
+    _dictionary->~Dictionary();
 
     [super dealloc];
 }
@@ -78,11 +78,7 @@
 
 - (id)copyWithZone:(NSZone *)zone
 {
-    if (!_dictionary->isMutable())
-        return [self retain];
-
-    auto map = _dictionary->map();
-    return ImmutableDictionary::create(WTF::move(map)).release().leakRef()->wrapper();
+    return [self retain];
 }
 
 #pragma mark WKObject protocol implementation

Deleted: trunk/Source/WebKit2/Shared/ImmutableDictionary.cpp (177698 => 177699)


--- trunk/Source/WebKit2/Shared/ImmutableDictionary.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/ImmutableDictionary.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "ImmutableDictionary.h"
-
-#include "APIArray.h"
-#include "APIString.h"
-
-namespace WebKit {
-
-RefPtr<ImmutableDictionary> ImmutableDictionary::create()
-{
-    return create({ });
-}
-
-RefPtr<ImmutableDictionary> ImmutableDictionary::create(MapType map)
-{
-    return adoptRef(new ImmutableDictionary(WTF::move(map)));
-}
-
-ImmutableDictionary::ImmutableDictionary(MapType map)
-    : m_map(WTF::move(map))
-{
-}
-
-ImmutableDictionary::~ImmutableDictionary()
-{
-}
-
-PassRefPtr<API::Array> ImmutableDictionary::keys() const
-{
-    if (m_map.isEmpty())
-        return API::Array::create();
-
-    Vector<RefPtr<API::Object>> keys;
-    keys.reserveInitialCapacity(m_map.size());
-
-    for (const auto& key : m_map.keys())
-        keys.uncheckedAppend(API::String::create(key));
-
-    return API::Array::create(WTF::move(keys));
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/Shared/ImmutableDictionary.h (177698 => 177699)


--- trunk/Source/WebKit2/Shared/ImmutableDictionary.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/ImmutableDictionary.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ImmutableDictionary_h
-#define ImmutableDictionary_h
-
-#include "APIObject.h"
-#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-namespace API {
-class Array;
-}
-
-namespace WebKit {
-
-// ImmutableDictionary - An immutable dictionary type suitable for vending to an API.
-
-class ImmutableDictionary : public API::ObjectImpl<API::Object::Type::Dictionary> {
-public:
-    typedef HashMap<String, RefPtr<API::Object>> MapType;
-
-    static RefPtr<ImmutableDictionary> create();
-    static RefPtr<ImmutableDictionary> create(MapType);
-
-    virtual ~ImmutableDictionary();
-
-    virtual bool isMutable() { return false; }
-
-    template<typename T>
-    T* get(const String& key) const
-    {
-        RefPtr<API::Object> item = m_map.get(key);
-        if (!item)
-            return 0;
-
-        if (item->type() != T::APIType)
-            return 0;
-
-        return static_cast<T*>(item.get());
-    }
-
-    API::Object* get(const String& key) const
-    {
-        return m_map.get(key);
-    }
-
-    API::Object* get(const String& key, bool& exists) const
-    {
-        auto it = m_map.find(key);
-        exists = it != m_map.end();
-        return it->value.get();
-    }
-
-    PassRefPtr<API::Array> keys() const;
-
-    size_t size() const { return m_map.size(); }
-
-    const MapType& map() const { return m_map; }
-
-protected:
-    explicit ImmutableDictionary(MapType);
-
-    MapType m_map;
-};
-
-} // namespace WebKit
-
-#endif // ImmutableDictionary_h

Deleted: trunk/Source/WebKit2/Shared/MutableDictionary.cpp (177698 => 177699)


--- trunk/Source/WebKit2/Shared/MutableDictionary.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/MutableDictionary.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "MutableDictionary.h"
-
-namespace WebKit {
-
-MutableDictionary::MutableDictionary()
-    : ImmutableDictionary({ })
-{
-}
-
-MutableDictionary::~MutableDictionary()
-{
-}
-
-bool MutableDictionary::add(const String& key, PassRefPtr<API::Object> item)
-{
-    MapType::AddResult result = m_map.add(key, item);
-    return result.isNewEntry;
-}
-
-bool MutableDictionary::set(const String& key, PassRefPtr<API::Object> item)
-{
-    MapType::AddResult result = m_map.set(key, item);
-    return result.isNewEntry;
-}
-
-void MutableDictionary::remove(const String& key)
-{
-    m_map.remove(key);
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/Shared/MutableDictionary.h (177698 => 177699)


--- trunk/Source/WebKit2/Shared/MutableDictionary.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/MutableDictionary.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MutableDictionary_h
-#define MutableDictionary_h
-
-#include "ImmutableDictionary.h"
-
-namespace WebKit {
-
-// MutableDictionary - A mutable dictionary type suitable for vending to an API.
-
-class MutableDictionary : public ImmutableDictionary {
-public:
-    static PassRefPtr<MutableDictionary> create()
-    {
-        return adoptRef(new MutableDictionary);
-    }
-
-    ~MutableDictionary();
-
-    bool add(const String& key, PassRefPtr<API::Object>);
-    bool set(const String& key, PassRefPtr<API::Object>);
-    void remove(const String& key);
-
-    virtual bool isMutable() { return true; }
-
-private:
-    MutableDictionary();
-};
-
-} // namespace WebKit
-
-#endif // MutableDictionary_h

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp (177698 => 177699)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -108,7 +108,7 @@
     return ASCIILiteral("PlugInInformationReplacementObscured");
 }
 
-void getPluginModuleInformation(const PluginModuleInfo& plugin, ImmutableDictionary::MapType& map)
+void getPluginModuleInformation(const PluginModuleInfo& plugin, API::Dictionary::MapType& map)
 {
 #if ENABLE(NETSCAPE_PLUGIN_API)
     map.set(pluginInformationPathKey(), API::String::create(plugin.path));
@@ -122,17 +122,17 @@
 #endif
 }
 
-PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin)
+PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin)
 {
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
     getPluginModuleInformation(plugin, map);
 
-    return ImmutableDictionary::create(WTF::move(map));
+    return API::Dictionary::create(WTF::move(map));
 }
 
-PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured)
+PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured)
 {
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
     getPluginModuleInformation(plugin, map);
 
     if (!frameURLString.isEmpty())
@@ -147,12 +147,12 @@
         map.set(pluginInformationPluginURLKey(), API::URL::create(pluginURLString));
     map.set(plugInInformationReplacementObscuredKey(), API::Boolean::create(replacementObscured));
 
-    return ImmutableDictionary::create(WTF::move(map));
+    return API::Dictionary::create(WTF::move(map));
 }
 
-PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString)
+PassRefPtr<API::Dictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString)
 {
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
 
     if (!frameURLString.isEmpty())
         map.set(pluginInformationFrameURLKey(), API::URL::create(frameURLString));
@@ -161,11 +161,11 @@
     if (!pageURLString.isEmpty())
         map.set(pluginInformationPageURLKey(), API::URL::create(pageURLString));
 
-    return ImmutableDictionary::create(WTF::move(map));
+    return API::Dictionary::create(WTF::move(map));
 }
 
 #if !PLATFORM(COCOA)
-void getPlatformPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&)
+void getPlatformPluginModuleInformation(const PluginModuleInfo&, API::Dictionary::MapType&)
 {
 }
 #endif

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h (177698 => 177699)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -26,7 +26,7 @@
 #ifndef PluginInformation_h
 #define PluginInformation_h
 
-#include "ImmutableDictionary.h"
+#include "APIDictionary.h"
 #include <wtf/Forward.h>
 
 namespace WebKit {
@@ -51,12 +51,12 @@
 String pluginInformationPluginURLKey();
 String plugInInformationReplacementObscuredKey();
 
-PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo&);
-PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const PluginModuleInfo&, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured = false);
-PassRefPtr<ImmutableDictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString);
+PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo&);
+PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo&, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured = false);
+PassRefPtr<API::Dictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString);
 
-void getPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&);
-void getPlatformPluginModuleInformation(const PluginModuleInfo&, ImmutableDictionary::MapType&);
+void getPluginModuleInformation(const PluginModuleInfo&, API::Dictionary::MapType&);
+void getPlatformPluginModuleInformation(const PluginModuleInfo&, API::Dictionary::MapType&);
 
 } // namespace WebKit
 

Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm (177698 => 177699)


--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/PluginInformationMac.mm	2014-12-23 23:07:40 UTC (rev 177699)
@@ -36,7 +36,7 @@
 
 namespace WebKit {
 
-void getPlatformPluginModuleInformation(const PluginModuleInfo& plugin, ImmutableDictionary::MapType& map)
+void getPlatformPluginModuleInformation(const PluginModuleInfo& plugin, API::Dictionary::MapType& map)
 {
     map.set(pluginInformationBundleIdentifierKey(), API::String::create(plugin.bundleIdentifier));
     map.set(pluginInformationBundleVersionKey(), API::String::create(plugin.versionString));

Modified: trunk/Source/WebKit2/Shared/UserData.cpp (177698 => 177699)


--- trunk/Source/WebKit2/Shared/UserData.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/UserData.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -28,6 +28,7 @@
 
 #include "APIArray.h"
 #include "APIData.h"
+#include "APIDictionary.h"
 #include "APIError.h"
 #include "APIFrameHandle.h"
 #include "APIGeometry.h"
@@ -40,7 +41,6 @@
 #include "APIURLResponse.h"
 #include "ArgumentCoders.h"
 #include "ArgumentEncoder.h"
-#include "MutableDictionary.h"
 
 namespace WebKit {
 
@@ -72,7 +72,7 @@
     }
 
     if (object.type() == API::Object::Type::Dictionary) {
-        const auto& dictionary = static_cast<const ImmutableDictionary&>(object);
+        const auto& dictionary = static_cast<const API::Dictionary&>(object);
 
         for (const auto& keyValuePair : dictionary.map()) {
             if (!keyValuePair.value)
@@ -104,16 +104,16 @@
     }
 
     if (object.type() == API::Object::Type::Dictionary) {
-        auto& dictionary = static_cast<ImmutableDictionary&>(object);
+        auto& dictionary = static_cast<API::Dictionary&>(object);
 
-        ImmutableDictionary::MapType map;
+        API::Dictionary::MapType map;
         for (const auto& keyValuePair : dictionary.map()) {
             if (!keyValuePair.value)
                 map.add(keyValuePair.key, nullptr);
             else
                 map.add(keyValuePair.key, transformGraph(*keyValuePair.value, transformer));
         }
-        return ImmutableDictionary::create(WTF::move(map));
+        return API::Dictionary::create(WTF::move(map));
     }
 
     return transformer.transformObject(object);
@@ -173,7 +173,7 @@
         break;
     
     case API::Object::Type::Dictionary: {
-        auto& dictionary = static_cast<const ImmutableDictionary&>(object);
+        auto& dictionary = static_cast<const API::Dictionary&>(object);
         auto& map = dictionary.map();
 
         encoder << static_cast<uint64_t>(map.size());
@@ -290,7 +290,7 @@
         if (!decoder.decode(size))
             return false;
 
-        ImmutableDictionary::MapType map;
+        API::Dictionary::MapType map;
         for (size_t i = 0; i < size; ++i) {
             String key;
             if (!decoder.decode(key))
@@ -304,7 +304,7 @@
                 return false;
         }
 
-        result = ImmutableDictionary::create(WTF::move(map));
+        result = API::Dictionary::create(WTF::move(map));
         break;
     }
 

Modified: trunk/Source/WebKit2/Shared/UserMessageCoders.h (177698 => 177699)


--- trunk/Source/WebKit2/Shared/UserMessageCoders.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/Shared/UserMessageCoders.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -28,6 +28,7 @@
 
 #include "APIArray.h"
 #include "APIData.h"
+#include "APIDictionary.h"
 #include "APIError.h"
 #include "APIGeometry.h"
 #include "APINumber.h"
@@ -40,7 +41,6 @@
 #include "ArgumentDecoder.h"
 #include "ArgumentEncoder.h"
 #include "DataReference.h"
-#include "ImmutableDictionary.h"
 #include "ShareableBitmap.h"
 #include "WebCertificateInfo.h"
 #include "WebCoreArgumentCoders.h"
@@ -52,7 +52,7 @@
 
 //   - Null -> Null
 //   - API::Array -> API::Array
-//   - Dictionary -> Dictionary
+//   - API::Dictionary -> API::Dictionary
 //   - SerializedScriptValue -> SerializedScriptValue
 //   - API::String -> API::String
 //   - UserContentURLPattern -> UserContentURLPattern
@@ -90,12 +90,12 @@
             return true;
         }
         case API::Object::Type::Dictionary: {
-            ImmutableDictionary* dictionary = static_cast<ImmutableDictionary*>(m_root);
-            const ImmutableDictionary::MapType& map = dictionary->map();
+            API::Dictionary* dictionary = static_cast<API::Dictionary*>(m_root);
+            const API::Dictionary::MapType& map = dictionary->map();
             encoder << static_cast<uint64_t>(map.size());
 
-            ImmutableDictionary::MapType::const_iterator it = map.begin();
-            ImmutableDictionary::MapType::const_iterator end = map.end();
+            API::Dictionary::MapType::const_iterator it = map.begin();
+            API::Dictionary::MapType::const_iterator end = map.end();
             for (; it != end; ++it) {
                 encoder << it->key;
                 encoder << Owner(coder, it->value.get());
@@ -295,7 +295,7 @@
             if (!decoder.decode(size))
                 return false;
 
-            ImmutableDictionary::MapType map;
+            API::Dictionary::MapType map;
             for (size_t i = 0; i < size; ++i) {
                 String key;
                 if (!decoder.decode(key))
@@ -306,12 +306,12 @@
                 if (!decoder.decode(messageCoder))
                     return false;
 
-                ImmutableDictionary::MapType::AddResult result = map.set(key, element.release());
+                API::Dictionary::MapType::AddResult result = map.set(key, element.release());
                 if (!result.isNewEntry)
                     return false;
             }
 
-            coder.m_root = ImmutableDictionary::create(WTF::move(map));
+            coder.m_root = API::Dictionary::create(WTF::move(map));
             break;
         }
         case API::Object::Type::String: {

Modified: trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -39,7 +39,6 @@
 
 namespace WebKit {
 class AuthenticationChallengeProxy;
-class ImmutableDictionary;
 class QuickLookDocumentData;
 class WebBackForwardListItem;
 class WebFrameProxy;
@@ -50,6 +49,7 @@
 
 namespace API {
 
+class Dictionary;
 class Object;
 
 class LoaderClient {
@@ -103,9 +103,9 @@
     virtual void didUpdateHistoryTitle(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& /* unavailabilityDescription */) { return currentPluginLoadPolicy; }
-    virtual void didFailToInitializePlugin(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
-    virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
+    virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, API::Dictionary*, WTF::String& /* unavailabilityDescription */) { return currentPluginLoadPolicy; }
+    virtual void didFailToInitializePlugin(WebKit::WebPageProxy*, API::Dictionary*) { }
+    virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy*, API::Dictionary*) { }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
 #if ENABLE(WEBGL)

Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -46,7 +46,6 @@
 
 namespace WebKit {
 class GeolocationPermissionRequestProxy;
-class ImmutableDictionary;
 class NativeWebKeyboardEvent;
 class NativeWebWheelEvent;
 class NotificationPermissionRequest;
@@ -62,6 +61,7 @@
 namespace API {
 
 class Data;
+class Dictionary;
 class Object;
 class SecurityOrigin;
 
@@ -87,7 +87,7 @@
     virtual void setStatusText(WebKit::WebPageProxy*, const WTF::String&) { }
     virtual void mouseDidMoveOverElement(WebKit::WebPageProxy*, const WebKit::WebHitTestResult::Data&, WebKit::WebEvent::Modifiers, API::Object*) { }
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    virtual void unavailablePluginButtonClicked(WebKit::WebPageProxy*, WKPluginUnavailabilityReason, WebKit::ImmutableDictionary*) { }
+    virtual void unavailablePluginButtonClicked(WebKit::WebPageProxy*, WKPluginUnavailabilityReason, API::Dictionary*) { }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
 
     virtual bool implementsDidNotHandleKeyEvent() const { return false; }

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -29,13 +29,13 @@
 
 #include "APIArray.h"
 #include "APIData.h"
+#include "APIDictionary.h"
 #include "APIFindClient.h"
 #include "APILoaderClient.h"
 #include "APIPolicyClient.h"
 #include "APISessionState.h"
 #include "APIUIClient.h"
 #include "AuthenticationChallengeProxy.h"
-#include "ImmutableDictionary.h"
 #include "LegacySessionStateCoding.h"
 #include "NativeWebKeyboardEvent.h"
 #include "NativeWebWheelEvent.h"
@@ -1023,7 +1023,7 @@
         }
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-        virtual void didFailToInitializePlugin(WebPageProxy* page, ImmutableDictionary* pluginInformation) override
+        virtual void didFailToInitializePlugin(WebPageProxy* page, API::Dictionary* pluginInformation) override
         {
             if (m_client.didFailToInitializePlugin_deprecatedForUseWithV0)
                 m_client.didFailToInitializePlugin_deprecatedForUseWithV0(toAPI(page), toAPI(pluginInformation->get<API::String>(pluginInformationMIMETypeKey())), m_client.base.clientInfo);
@@ -1035,7 +1035,7 @@
                 m_client.pluginDidFail(toAPI(page), kWKErrorCodeCannotLoadPlugIn, toAPI(pluginInformation), m_client.base.clientInfo);
         }
 
-        virtual void didBlockInsecurePluginVersion(WebPageProxy* page, ImmutableDictionary* pluginInformation) override
+        virtual void didBlockInsecurePluginVersion(WebPageProxy* page, API::Dictionary* pluginInformation) override
         {
             if (m_client.pluginDidFail_deprecatedForUseWithV1)
                 m_client.pluginDidFail_deprecatedForUseWithV1(toAPI(page), kWKErrorCodeInsecurePlugInVersion, toAPI(pluginInformation->get<API::String>(pluginInformationMIMETypeKey())), toAPI(pluginInformation->get<API::String>(pluginInformationBundleIdentifierKey())), toAPI(pluginInformation->get<API::String>(pluginInformationBundleVersionKey())), m_client.base.clientInfo);
@@ -1044,7 +1044,7 @@
                 m_client.pluginDidFail(toAPI(page), kWKErrorCodeInsecurePlugInVersion, toAPI(pluginInformation), m_client.base.clientInfo);
         }
 
-        virtual PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy* page, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary* pluginInformation, String& unavailabilityDescription) override
+        virtual PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy* page, PluginModuleLoadPolicy currentPluginLoadPolicy, API::Dictionary* pluginInformation, String& unavailabilityDescription) override
         {
             WKStringRef unavailabilityDescriptionOut = 0;
             PluginModuleLoadPolicy loadPolicy = currentPluginLoadPolicy;
@@ -1192,7 +1192,7 @@
             if (m_client.base.version > 0 && !m_client.createNewPage)
                 return 0;
 
-            ImmutableDictionary::MapType map;
+            API::Dictionary::MapType map;
             if (windowFeatures.xSet)
                 map.set("x", API::Double::create(windowFeatures.x));
             if (windowFeatures.ySet)
@@ -1209,7 +1209,7 @@
             map.set("resizable", API::Boolean::create(windowFeatures.resizable));
             map.set("fullscreen", API::Boolean::create(windowFeatures.fullscreen));
             map.set("dialog", API::Boolean::create(windowFeatures.dialog));
-            RefPtr<ImmutableDictionary> featuresMap = ImmutableDictionary::create(WTF::move(map));
+            RefPtr<API::Dictionary> featuresMap = API::Dictionary::create(WTF::move(map));
 
             if (!m_client.base.version)
                 return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV0(toAPI(page), toAPI(featuresMap.get()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
@@ -1322,7 +1322,7 @@
         }
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-        virtual void unavailablePluginButtonClicked(WebPageProxy* page, WKPluginUnavailabilityReason pluginUnavailabilityReason, ImmutableDictionary* pluginInformation) override
+        virtual void unavailablePluginButtonClicked(WebPageProxy* page, WKPluginUnavailabilityReason pluginUnavailabilityReason, API::Dictionary* pluginInformation) override
         {
             if (pluginUnavailabilityReason == kWKPluginUnavailabilityReasonPluginMissing) {
                 if (m_client.missingPluginButtonClicked_deprecatedForUseWithV0)

Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,9 +27,9 @@
 #import "WKContextPrivateMac.h"
 
 #import "APIArray.h"
+#import "APIDictionary.h"
 #import "APINumber.h"
 #import "APIString.h"
-#import "ImmutableDictionary.h"
 #import "PluginInfoStore.h"
 #import "PluginInformation.h"
 #import "StringUtilities.h"
@@ -59,7 +59,7 @@
     if (plugin.path.isNull())
         return 0;
 
-    RefPtr<ImmutableDictionary> dictionary = createPluginInformationDictionary(plugin);
+    RefPtr<API::Dictionary> dictionary = createPluginInformationDictionary(plugin);
     return toAPI(dictionary.release().leakRef());
 #else
     return 0;

Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,8 +27,8 @@
 #include "WebNotificationManagerProxy.h"
 
 #include "APIArray.h"
+#include "APIDictionary.h"
 #include "APISecurityOrigin.h"
-#include "ImmutableDictionary.h"
 #include "WebNotification.h"
 #include "WebNotificationManagerMessages.h"
 #include "WebPageProxy.h"
@@ -85,7 +85,7 @@
 
 void WebNotificationManagerProxy::populateCopyOfNotificationPermissions(HashMap<String, bool>& permissions)
 {
-    RefPtr<ImmutableDictionary> knownPermissions = m_provider.notificationPermissions();
+    RefPtr<API::Dictionary> knownPermissions = m_provider.notificationPermissions();
 
     if (!knownPermissions)
         return;

Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,9 +27,9 @@
 #include "WebNotificationProvider.h"
 
 #include "APIArray.h"
+#include "APIDictionary.h"
 #include "APINumber.h"
 #include "APISecurityOrigin.h"
-#include "ImmutableDictionary.h"
 #include "WKAPICast.h"
 #include "WebNotification.h"
 #include "WebNotificationManagerProxy.h"
@@ -91,10 +91,10 @@
     m_client.removeNotificationManager(toAPI(manager), m_client.base.clientInfo);
 }
 
-PassRefPtr<ImmutableDictionary> WebNotificationProvider::notificationPermissions()
+PassRefPtr<API::Dictionary> WebNotificationProvider::notificationPermissions()
 {
     if (!m_client.notificationPermissions)
-        return ImmutableDictionary::create();
+        return API::Dictionary::create();
 
     return adoptRef(toImpl(m_client.notificationPermissions(m_client.base.clientInfo)));
 }

Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.h (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationProvider.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -32,6 +32,9 @@
 #include <wtf/Vector.h>
 
 namespace API {
+
+class Dictionary;
+
 template<> struct ClientTraits<WKNotificationProviderBase> {
     typedef std::tuple<WKNotificationProviderV0> Versions;
 };
@@ -39,7 +42,6 @@
 
 namespace WebKit {
 
-class ImmutableDictionary;
 class WebNotification;
 class WebNotificationManagerProxy;
 class WebPageProxy;
@@ -54,7 +56,7 @@
     void addNotificationManager(WebNotificationManagerProxy*);
     void removeNotificationManager(WebNotificationManagerProxy*);
     
-    PassRefPtr<ImmutableDictionary> notificationPermissions();
+    PassRefPtr<API::Dictionary> notificationPermissions();
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,7 +27,7 @@
 #include "PlugInAutoStartProvider.h"
 
 #include "APIArray.h"
-#include "ImmutableDictionary.h"
+#include "APIDictionary.h"
 #include "WebContextClient.h"
 #include "WebProcessMessages.h"
 #include "WebProcessPool.h"
@@ -87,32 +87,32 @@
     return sessionMap;
 }
 
-PassRefPtr<ImmutableDictionary> PlugInAutoStartProvider::autoStartOriginsTableCopy() const
+PassRefPtr<API::Dictionary> PlugInAutoStartProvider::autoStartOriginsTableCopy() const
 {
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
 
     double now = currentTime();
     for (const auto& stringOriginHash : m_autoStartTable.get(SessionID::defaultSessionID())) {
-        ImmutableDictionary::MapType hashMap;
+        API::Dictionary::MapType hashMap;
         for (const auto& originHash : stringOriginHash.value) {
             if (now <= originHash.value)
                 hashMap.set(String::number(originHash.key), API::Double::create(originHash.value));
         }
         if (hashMap.size())
-            map.set(stringOriginHash.key, ImmutableDictionary::create(WTF::move(hashMap)));
+            map.set(stringOriginHash.key, API::Dictionary::create(WTF::move(hashMap)));
     }
 
-    return ImmutableDictionary::create(WTF::move(map));
+    return API::Dictionary::create(WTF::move(map));
 }
 
-void PlugInAutoStartProvider::setAutoStartOriginsTable(ImmutableDictionary& table)
+void PlugInAutoStartProvider::setAutoStartOriginsTable(API::Dictionary& table)
 {
     setAutoStartOriginsTableWithItemsPassingTest(table, [](double) {
         return true;
     });
 }
 
-void PlugInAutoStartProvider::setAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary& table, double time)
+void PlugInAutoStartProvider::setAutoStartOriginsFilteringOutEntriesAddedAfterTime(API::Dictionary& table, double time)
 {
     double adjustedTimestamp = time + plugInAutoStartExpirationTimeThreshold;
     setAutoStartOriginsTableWithItemsPassingTest(table, [adjustedTimestamp](double expirationTimestamp) {
@@ -120,7 +120,7 @@
     });
 }
 
-void PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest(ImmutableDictionary& table, std::function<bool(double expirationTimestamp)> isExpirationTimeAcceptable)
+void PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest(API::Dictionary& table, std::function<bool(double expirationTimestamp)> isExpirationTimeAcceptable)
 {
     ASSERT(isExpirationTimeAcceptable);
 
@@ -132,7 +132,7 @@
 
     for (auto& strDict : table.map()) {
         PlugInAutoStartOriginMap hashes;
-        for (auto& hashTime : static_cast<ImmutableDictionary*>(strDict.value.get())->map()) {
+        for (auto& hashTime : static_cast<API::Dictionary*>(strDict.value.get())->map()) {
             bool ok;
             unsigned hash = hashTime.key.toUInt(&ok);
             if (!ok)

Modified: trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -37,11 +37,11 @@
 
 namespace API {
 class Array;
+class Dictionary;
 }
 
 namespace WebKit {
 
-class ImmutableDictionary;
 class WebProcessPool;
 
 typedef HashMap<unsigned, double> PlugInAutoStartOriginMap;
@@ -56,9 +56,9 @@
     void addAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash, WebCore::SessionID);
     void didReceiveUserInteraction(unsigned plugInOriginHash, WebCore::SessionID);
 
-    PassRefPtr<ImmutableDictionary> autoStartOriginsTableCopy() const;
-    void setAutoStartOriginsTable(ImmutableDictionary&);
-    void setAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary&, double time);
+    PassRefPtr<API::Dictionary> autoStartOriginsTableCopy() const;
+    void setAutoStartOriginsTable(API::Dictionary&);
+    void setAutoStartOriginsFilteringOutEntriesAddedAfterTime(API::Dictionary&, double time);
     void setAutoStartOriginsArray(API::Array&);
 
     SessionPlugInAutoStartOriginMap autoStartOriginHashesCopy() const;
@@ -67,7 +67,7 @@
 private:
     WebProcessPool* m_processPool;
 
-    void setAutoStartOriginsTableWithItemsPassingTest(ImmutableDictionary&, std::function<bool(double expirationTimestamp)>);
+    void setAutoStartOriginsTableWithItemsPassingTest(API::Dictionary&, std::function<bool(double expirationTimestamp)>);
 
     typedef HashMap<String, PlugInAutoStartOriginMap, CaseFoldingHash> AutoStartTable;
     typedef HashMap<WebCore::SessionID, AutoStartTable> SessionAutoStartTable;

Modified: trunk/Source/WebKit2/UIProcess/StatisticsRequest.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/StatisticsRequest.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/StatisticsRequest.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,7 +27,7 @@
 #include "StatisticsRequest.h"
 
 #include "APIArray.h"
-#include "MutableDictionary.h"
+#include "APIDictionary.h"
 
 namespace WebKit {
 
@@ -51,16 +51,16 @@
     return requestID;
 }
 
-static void addToDictionaryFromHashMap(MutableDictionary* dictionary, const HashMap<String, uint64_t>& map)
+static void addToDictionaryFromHashMap(API::Dictionary* dictionary, const HashMap<String, uint64_t>& map)
 {
     HashMap<String, uint64_t>::const_iterator end = map.end();
     for (HashMap<String, uint64_t>::const_iterator it = map.begin(); it != end; ++it)
         dictionary->set(it->key, RefPtr<API::UInt64>(API::UInt64::create(it->value)).get());
 }
 
-static PassRefPtr<MutableDictionary> createDictionaryFromHashMap(const HashMap<String, uint64_t>& map)
+static PassRefPtr<API::Dictionary> createDictionaryFromHashMap(const HashMap<String, uint64_t>& map)
 {
-    RefPtr<MutableDictionary> result = MutableDictionary::create();
+    RefPtr<API::Dictionary> result = API::Dictionary::create();
     addToDictionaryFromHashMap(result.get(), map);
     return result;
 }
@@ -71,7 +71,7 @@
     m_outstandingRequests.remove(requestID);
 
     if (!m_responseDictionary)
-        m_responseDictionary = MutableDictionary::create();
+        m_responseDictionary = API::Dictionary::create();
     
     // FIXME (Multi-WebProcess) <rdar://problem/13200059>: This code overwrites any previous response data received.
     // When getting responses from multiple WebProcesses we need to combine items instead of clobbering them.

Modified: trunk/Source/WebKit2/UIProcess/StatisticsRequest.h (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/StatisticsRequest.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/StatisticsRequest.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -35,7 +35,7 @@
 
 struct StatisticsData;
 
-typedef GenericCallback<ImmutableDictionary*> DictionaryCallback;
+typedef GenericCallback<API::Dictionary*> DictionaryCallback;
 
 enum StatisticsRequestType {
     StatisticsRequestTypeWebContent = 0x00000001,
@@ -61,7 +61,7 @@
     HashSet<uint64_t> m_outstandingRequests;
     RefPtr<DictionaryCallback> m_callback;
 
-    RefPtr<MutableDictionary> m_responseDictionary;
+    RefPtr<API::Dictionary> m_responseDictionary;
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -29,8 +29,8 @@
 #if ENABLE(SQL_DATABASE)
 
 #include "APIArray.h"
+#include "APIDictionary.h"
 #include "APISecurityOrigin.h"
-#include "ImmutableDictionary.h"
 #include "WebDatabaseManagerMessages.h"
 #include "WebDatabaseManagerProxyMessages.h"
 #include "WebProcessPool.h"
@@ -190,7 +190,7 @@
             if (databaseDetails.modificationTime())
                 detailsMap.set(databaseDetailsModificationTimeKey(), API::Double::create(databaseDetails.modificationTime()));
 
-            databases.uncheckedAppend(ImmutableDictionary::create(WTF::move(detailsMap)));
+            databases.uncheckedAppend(API::Dictionary::create(WTF::move(detailsMap)));
         }
 
         HashMap<String, RefPtr<API::Object>> originAndDatabasesMap;
@@ -199,7 +199,7 @@
         originAndDatabasesMap.set(originUsageKey(), API::UInt64::create(originAndDatabases.originUsage));
         originAndDatabasesMap.set(databaseDetailsKey(), API::Array::create(WTF::move(databases)));
 
-        result.uncheckedAppend(ImmutableDictionary::create(WTF::move(originAndDatabasesMap)));
+        result.uncheckedAppend(API::Dictionary::create(WTF::move(originAndDatabasesMap)));
     }
 
     callback->performCallbackWithReturnValue(API::Array::create(WTF::move(result)).get());

Modified: trunk/Source/WebKit2/UIProcess/WebFormClient.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/WebFormClient.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/WebFormClient.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -26,8 +26,8 @@
 #include "config.h"
 #include "WebFormClient.h"
 
+#include "APIDictionary.h"
 #include "APIString.h"
-#include "ImmutableDictionary.h"
 #include "WKAPICast.h"
 #include "WebFormSubmissionListenerProxy.h"
 #include "WebPageProxy.h"
@@ -44,10 +44,10 @@
     if (!m_client.willSubmitForm)
         return false;
 
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
     for (size_t i = 0; i < textFieldValues.size(); ++i)
         map.set(textFieldValues[i].first, API::String::create(textFieldValues[i].second));
-    RefPtr<ImmutableDictionary> textFieldsMap = ImmutableDictionary::create(WTF::move(map));
+    RefPtr<API::Dictionary> textFieldsMap = API::Dictionary::create(WTF::move(map));
 
     m_client.willSubmitForm(toAPI(page), toAPI(frame), toAPI(sourceFrame), toAPI(textFieldsMap.get()), toAPI(userData), toAPI(listener), m_client.base.clientInfo);
     return true;

Modified: trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -116,7 +116,7 @@
             if (originDetails.modificationTime)
                 detailsMap.set(WebKeyValueStorageManager::modificationTimeKey(), API::Double::create(originDetails.modificationTime.valueOr(0)));
 
-            result.uncheckedAppend(ImmutableDictionary::create(WTF::move(detailsMap)));
+            result.uncheckedAppend(API::Dictionary::create(WTF::move(detailsMap)));
         }
 
         callbackFunction(API::Array::create(WTF::move(result)).get(), CallbackBase::Error::None);

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -1673,7 +1673,7 @@
     pluginLoadPolicy = PluginInfoStore::defaultLoadPolicyForPlugin(plugin);
 
 #if PLATFORM(COCOA)
-    RefPtr<ImmutableDictionary> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, String(), pageURLString, String(), String());
+    RefPtr<API::Dictionary> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, String(), pageURLString, String(), String());
     pluginLoadPolicy = m_loaderClient->pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), unavailabilityDescription);
 #else
     UNUSED_PARAM(frameURLString);
@@ -3294,7 +3294,7 @@
     MESSAGE_CHECK_URL(frameURLString);
     MESSAGE_CHECK_URL(pageURLString);
 
-    RefPtr<ImmutableDictionary> pluginInformation;
+    RefPtr<API::Dictionary> pluginInformation;
     String newMimeType = mimeType;
     PluginModuleInfo plugin = m_process->processPool().pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
     pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, pluginspageAttributeURLString, pluginURLString);
@@ -4962,7 +4962,7 @@
 
 void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured)
 {
-    RefPtr<ImmutableDictionary> pluginInformation;
+    RefPtr<API::Dictionary> pluginInformation;
 
 #if PLATFORM(COCOA) && ENABLE(NETSCAPE_PLUGIN_API)
     String newMimeType = mimeType;

Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -33,7 +33,6 @@
 #include "DownloadProxy.h"
 #include "DownloadProxyMessages.h"
 #include "Logging.h"
-#include "MutableDictionary.h"
 #include "SandboxExtension.h"
 #include "StatisticsData.h"
 #include "TextChecker.h"
@@ -1327,7 +1326,7 @@
 #endif
 }
 
-void WebProcessPool::getStatistics(uint32_t statisticsMask, std::function<void (ImmutableDictionary*, CallbackBase::Error)> callbackFunction)
+void WebProcessPool::getStatistics(uint32_t statisticsMask, std::function<void (API::Dictionary*, CallbackBase::Error)> callbackFunction)
 {
     if (!statisticsMask) {
         callbackFunction(nullptr, CallbackBase::Error::Unknown);
@@ -1418,12 +1417,12 @@
     m_plugInAutoStartProvider.didReceiveUserInteraction(plugInOriginHash, sessionID);
 }
 
-PassRefPtr<ImmutableDictionary> WebProcessPool::plugInAutoStartOriginHashes() const
+PassRefPtr<API::Dictionary> WebProcessPool::plugInAutoStartOriginHashes() const
 {
     return m_plugInAutoStartProvider.autoStartOriginsTableCopy();
 }
 
-void WebProcessPool::setPlugInAutoStartOriginHashes(ImmutableDictionary& dictionary)
+void WebProcessPool::setPlugInAutoStartOriginHashes(API::Dictionary& dictionary)
 {
     m_plugInAutoStartProvider.setAutoStartOriginsTable(dictionary);
 }
@@ -1433,7 +1432,7 @@
     m_plugInAutoStartProvider.setAutoStartOriginsArray(array);
 }
 
-void WebProcessPool::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary& dictionary, double time)
+void WebProcessPool::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(API::Dictionary& dictionary, double time)
 {
     m_plugInAutoStartProvider.setAutoStartOriginsFilteringOutEntriesAddedAfterTime(dictionary, time);
 }
@@ -1462,7 +1461,7 @@
     plugins.reserveInitialCapacity(pluginModules.size());
 
     for (const auto& pluginModule : pluginModules) {
-        ImmutableDictionary::MapType map;
+        API::Dictionary::MapType map;
         map.set(ASCIILiteral("path"), API::String::create(pluginModule.path));
         map.set(ASCIILiteral("name"), API::String::create(pluginModule.info.name));
         map.set(ASCIILiteral("file"), API::String::create(pluginModule.info.file));
@@ -1479,7 +1478,7 @@
         map.set(ASCIILiteral("version"), API::String::create(pluginModule.versionString));
 #endif
 
-        plugins.uncheckedAppend(ImmutableDictionary::create(WTF::move(map)));
+        plugins.uncheckedAppend(API::Dictionary::create(WTF::move(map)));
     }
 
     m_client.plugInInformationBecameAvailable(this, API::Array::create(WTF::move(plugins)).get());

Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h	2014-12-23 23:07:40 UTC (rev 177699)
@@ -26,10 +26,10 @@
 #ifndef WebProcessPool_h
 #define WebProcessPool_h
 
+#include "APIDictionary.h"
 #include "APIObject.h"
 #include "DownloadProxyMap.h"
 #include "GenericCallback.h"
-#include "ImmutableDictionary.h"
 #include "MessageReceiver.h"
 #include "MessageReceiverMap.h"
 #include "PlugInAutoStartProvider.h"
@@ -84,7 +84,7 @@
 struct WebPageConfiguration;
 struct WebProcessCreationParameters;
     
-typedef GenericCallback<ImmutableDictionary*> DictionaryCallback;
+typedef GenericCallback<API::Dictionary*> DictionaryCallback;
 
 #if ENABLE(NETWORK_PROCESS)
 struct NetworkProcessCreationParameters;
@@ -276,7 +276,7 @@
     void setHTTPPipeliningEnabled(bool);
     bool httpPipeliningEnabled() const;
 
-    void getStatistics(uint32_t statisticsMask, std::function<void (ImmutableDictionary*, CallbackBase::Error)>);
+    void getStatistics(uint32_t statisticsMask, std::function<void (API::Dictionary*, CallbackBase::Error)>);
     
     void garbageCollectJavaScriptObjects();
     void setJavaScriptGarbageCollectorTimerEnabled(bool flag);
@@ -289,10 +289,10 @@
 
     void textCheckerStateChanged();
 
-    PassRefPtr<ImmutableDictionary> plugInAutoStartOriginHashes() const;
-    void setPlugInAutoStartOriginHashes(ImmutableDictionary&);
+    PassRefPtr<API::Dictionary> plugInAutoStartOriginHashes() const;
+    void setPlugInAutoStartOriginHashes(API::Dictionary&);
     void setPlugInAutoStartOrigins(API::Array&);
-    void setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary&, double time);
+    void setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(API::Dictionary&, double time);
 
     // Network Process Management
 

Modified: trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp (177698 => 177699)


--- trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -26,8 +26,8 @@
 #include "config.h"
 #include "WebResourceCacheManagerProxy.h"
 
+#include "APIDictionary.h"
 #include "APISecurityOrigin.h"
-#include "ImmutableDictionary.h"
 #include "SecurityOriginData.h"
 #include "WebProcessPool.h"
 #include "WebResourceCacheManagerMessages.h"

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (177698 => 177699)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2014-12-23 23:07:40 UTC (rev 177699)
@@ -1046,6 +1046,8 @@
 		7C135AA8173B0BCA00586AE2 /* WKPluginInformation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */; };
 		7C135AA9173B0BCA00586AE2 /* WKPluginInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		7C135AAC173B0CFF00586AE2 /* PluginInformationMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C135AAA173B0CFF00586AE2 /* PluginInformationMac.mm */; };
+		7C1BA33D1A4A0E600043E249 /* APIDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1BA33B1A4A0E600043E249 /* APIDictionary.cpp */; };
+		7C1BA33E1A4A0E600043E249 /* APIDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1BA33C1A4A0E600043E249 /* APIDictionary.h */; };
 		7C361D721927FA360036A59D /* WebScriptMessageHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C361D6F1927FA360036A59D /* WebScriptMessageHandler.cpp */; };
 		7C361D731927FA360036A59D /* WebScriptMessageHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C361D701927FA360036A59D /* WebScriptMessageHandler.h */; };
 		7C361D78192803BD0036A59D /* WebUserContentControllerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C361D76192803BD0036A59D /* WebUserContentControllerProxyMessageReceiver.cpp */; };
@@ -1444,8 +1446,6 @@
 		BCAF361F16CA28CD00D4E9FC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3DE46815A91763008D26FC /* Foundation.framework */; };
 		BCAF362016CA28D600D4E9FC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3DE46815A91763008D26FC /* Foundation.framework */; };
 		BCAF362216CA292B00D4E9FC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC3DE46815A91763008D26FC /* Foundation.framework */; };
-		BCB0AEE9122F53E300B1341E /* MutableDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB0AEE7122F53E300B1341E /* MutableDictionary.h */; };
-		BCB0AEEA122F53E300B1341E /* MutableDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB0AEE8122F53E300B1341E /* MutableDictionary.cpp */; };
 		BCB0B0DC12305A2500B1341E /* WebContextUserMessageCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB0B0DB12305A2500B1341E /* WebContextUserMessageCoders.h */; };
 		BCB0B0DE12305A8C00B1341E /* InjectedBundleUserMessageCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB0B0DD12305A8C00B1341E /* InjectedBundleUserMessageCoders.h */; };
 		BCB0B0E012305AB100B1341E /* UserMessageCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */; };
@@ -1466,8 +1466,6 @@
 		BCBAACF51452324F0053F82F /* WKBrowsingContextGroup.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCBAACEF145232440053F82F /* WKBrowsingContextGroup.mm */; };
 		BCBAACF61452324F0053F82F /* WKBrowsingContextGroupPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBAACF0145232480053F82F /* WKBrowsingContextGroupPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		BCBAAD0B14560A430053F82F /* WKBrowsingContextLoadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBAAD0A14560A430053F82F /* WKBrowsingContextLoadDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		BCBCB0CB1215E32100DE59CA /* ImmutableDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBCB0CA1215E32100DE59CA /* ImmutableDictionary.h */; };
-		BCBCB0CD1215E33A00DE59CA /* ImmutableDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBCB0CC1215E33A00DE59CA /* ImmutableDictionary.cpp */; };
 		BCBD3914125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */; };
 		BCBD3915125BB1A800D2C29F /* WebPageProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBD3913125BB1A800D2C29F /* WebPageProxyMessages.h */; };
 		BCBECDE716B6416800047A1A /* XPCServiceEntryPoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCBECDE516B6416700047A1A /* XPCServiceEntryPoint.mm */; };
@@ -3139,6 +3137,8 @@
 		7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKPluginInformation.cpp; sourceTree = "<group>"; };
 		7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPluginInformation.h; sourceTree = "<group>"; };
 		7C135AAA173B0CFF00586AE2 /* PluginInformationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginInformationMac.mm; sourceTree = "<group>"; };
+		7C1BA33B1A4A0E600043E249 /* APIDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIDictionary.cpp; sourceTree = "<group>"; };
+		7C1BA33C1A4A0E600043E249 /* APIDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIDictionary.h; sourceTree = "<group>"; };
 		7C361D6F1927FA360036A59D /* WebScriptMessageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebScriptMessageHandler.cpp; sourceTree = "<group>"; };
 		7C361D701927FA360036A59D /* WebScriptMessageHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebScriptMessageHandler.h; sourceTree = "<group>"; };
 		7C361D751928028B0036A59D /* WebUserContentControllerProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebUserContentControllerProxy.messages.in; sourceTree = "<group>"; };
@@ -3564,8 +3564,6 @@
 		BCACC44016B24CAA00B6E092 /* Info-OSX.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-OSX.plist"; sourceTree = "<group>"; };
 		BCACC44316B24CAA00B6E092 /* Info-OSX.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-OSX.plist"; sourceTree = "<group>"; };
 		BCAE9DE9160C097400A33217 /* com.apple.WebKit.WebContent.Development.xpc */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = com.apple.WebKit.WebContent.Development.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
-		BCB0AEE7122F53E300B1341E /* MutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MutableDictionary.h; sourceTree = "<group>"; };
-		BCB0AEE8122F53E300B1341E /* MutableDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MutableDictionary.cpp; sourceTree = "<group>"; };
 		BCB0B0DB12305A2500B1341E /* WebContextUserMessageCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextUserMessageCoders.h; sourceTree = "<group>"; };
 		BCB0B0DD12305A8C00B1341E /* InjectedBundleUserMessageCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleUserMessageCoders.h; sourceTree = "<group>"; };
 		BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMessageCoders.h; sourceTree = "<group>"; };
@@ -3587,8 +3585,6 @@
 		BCBAACEF145232440053F82F /* WKBrowsingContextGroup.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKBrowsingContextGroup.mm; sourceTree = "<group>"; };
 		BCBAACF0145232480053F82F /* WKBrowsingContextGroupPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextGroupPrivate.h; sourceTree = "<group>"; };
 		BCBAAD0A14560A430053F82F /* WKBrowsingContextLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextLoadDelegate.h; sourceTree = "<group>"; };
-		BCBCB0CA1215E32100DE59CA /* ImmutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImmutableDictionary.h; sourceTree = "<group>"; };
-		BCBCB0CC1215E33A00DE59CA /* ImmutableDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImmutableDictionary.cpp; sourceTree = "<group>"; };
 		BCBD38FA125BAB9A00D2C29F /* WebPageProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebPageProxy.messages.in; sourceTree = "<group>"; };
 		BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageProxyMessageReceiver.cpp; sourceTree = "<group>"; };
 		BCBD3913125BB1A800D2C29F /* WebPageProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageProxyMessages.h; sourceTree = "<group>"; };
@@ -4499,14 +4495,10 @@
 				762B7481120BBA0100819339 /* FontSmoothingLevel.h */,
 				F638954F133BEF38008941D5 /* HTTPCookieAcceptPolicy.h */,
 				BCCF6B2312C93E7A008F9C35 /* ImageOptions.h */,
-				BCBCB0CC1215E33A00DE59CA /* ImmutableDictionary.cpp */,
-				BCBCB0CA1215E32100DE59CA /* ImmutableDictionary.h */,
 				C58CDF2B1887609F00871536 /* InteractionInformationAtPosition.cpp */,
 				C58CDF2C1887609F00871536 /* InteractionInformationAtPosition.h */,
 				1A92DC1212F8BAB90017AF65 /* LayerTreeContext.cpp */,
 				1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */,
-				BCB0AEE8122F53E300B1341E /* MutableDictionary.cpp */,
-				BCB0AEE7122F53E300B1341E /* MutableDictionary.h */,
 				C02BFF1512514FD8009CCBEA /* NativeWebKeyboardEvent.h */,
 				31EA25D3134F78D6005B1452 /* NativeWebMouseEvent.h */,
 				263172CE18B469490065B9C3 /* NativeWebTouchEvent.h */,
@@ -6769,6 +6761,8 @@
 				1A3DD205125E5A2F004515E6 /* APIClient.h */,
 				1AAB037B185F99D800EDF501 /* APIData.cpp */,
 				51578B821209ECEF00A37C4A /* APIData.h */,
+				7C1BA33B1A4A0E600043E249 /* APIDictionary.cpp */,
+				7C1BA33C1A4A0E600043E249 /* APIDictionary.h */,
 				BC575612126E0138006F0F12 /* APIError.cpp */,
 				516A4A5B120A2CCD00C05B7F /* APIError.h */,
 				1AC1336F18566C7C00F3EC05 /* APIFrameHandle.cpp */,
@@ -7271,6 +7265,7 @@
 				1AEFD27911D16C81008219D3 /* ArgumentCoder.h in Headers */,
 				1AEFD2F711D1807B008219D3 /* ArgumentCoders.h in Headers */,
 				1AAF0C4A12B16334008E49E2 /* ArgumentCodersCF.h in Headers */,
+				7C1BA33E1A4A0E600043E249 /* APIDictionary.h in Headers */,
 				E179FD9C134D38060015B883 /* ArgumentCodersMac.h in Headers */,
 				BC032DA610F437D10058C15A /* ArgumentDecoder.h in Headers */,
 				BC032DA810F437D10058C15A /* ArgumentEncoder.h in Headers */,
@@ -7350,7 +7345,6 @@
 				518353DB1885BF8C00D9FE44 /* IDBSerialization.h in Headers */,
 				51E351CB180F2CCC00E53BE9 /* IDBUtilities.h in Headers */,
 				BCCF6B2512C93E7A008F9C35 /* ImageOptions.h in Headers */,
-				BCBCB0CB1215E32100DE59CA /* ImmutableDictionary.h in Headers */,
 				1A1EC69E1872092100B951F0 /* ImportanceAssertion.h in Headers */,
 				BC204EE311C83E98008F3375 /* InjectedBundle.h in Headers */,
 				935EEBA2127761D0003322B8 /* InjectedBundleBackForwardList.h in Headers */,
@@ -7394,7 +7388,6 @@
 				1A3EED0F161A535400AEB4F5 /* MessageReceiverMap.h in Headers */,
 				1AAB037A185A7C6A00EDF501 /* MessageSender.h in Headers */,
 				C0E3AA7C1209E83C00A49D01 /* Module.h in Headers */,
-				BCB0AEE9122F53E300B1341E /* MutableDictionary.h in Headers */,
 				263172CF18B469490065B9C3 /* NativeWebTouchEvent.h in Headers */,
 				1ADCB86B189831B30022EE5A /* NavigationActionData.h in Headers */,
 				1ABC3DF61899E437004F0626 /* NavigationState.h in Headers */,
@@ -9034,7 +9027,6 @@
 				2DA049B7180CCD0A00AAFA9E /* GraphicsLayerCARemote.cpp in Sources */,
 				518353DA1885BF8C00D9FE44 /* IDBSerialization.cpp in Sources */,
 				51E351CA180F2CCC00E53BE9 /* IDBUtilities.cpp in Sources */,
-				BCBCB0CD1215E33A00DE59CA /* ImmutableDictionary.cpp in Sources */,
 				BC204EE211C83E98008F3375 /* InjectedBundle.cpp in Sources */,
 				935EEBA1127761CC003322B8 /* InjectedBundleBackForwardList.cpp in Sources */,
 				935EEBA3127761D3003322B8 /* InjectedBundleBackForwardListItem.cpp in Sources */,
@@ -9079,7 +9071,6 @@
 				1AAB0379185A7C6A00EDF501 /* MessageSender.cpp in Sources */,
 				C0E3AA7B1209E83500A49D01 /* Module.cpp in Sources */,
 				C0E3AA7A1209E83000A49D01 /* ModuleCF.cpp in Sources */,
-				BCB0AEEA122F53E300B1341E /* MutableDictionary.cpp in Sources */,
 				2DA9449E1884E4F000ED86DB /* NativeWebKeyboardEventIOS.mm in Sources */,
 				C02BFF1E1251502E009CCBEA /* NativeWebKeyboardEventMac.mm in Sources */,
 				31EA25D2134F78C0005B1452 /* NativeWebMouseEventMac.mm in Sources */,
@@ -9247,6 +9238,7 @@
 				1A44B95B16B73F9F00B7BBD8 /* StorageManager.cpp in Sources */,
 				1AB31A9616BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp in Sources */,
 				1A44B95716B737AA00B7BBD8 /* StorageNamespaceImpl.cpp in Sources */,
+				7C1BA33D1A4A0E600043E249 /* APIDictionary.cpp in Sources */,
 				1AE00D6B18327C1200087DD7 /* StringReference.cpp in Sources */,
 				296BD85E15019BC30071F424 /* StringUtilities.mm in Sources */,
 				1ZZ417EF12C00D87002BE67B /* TextCheckerCompletion.cpp in Sources */,

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp (177698 => 177699)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp	2014-12-23 23:06:10 UTC (rev 177698)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp	2014-12-23 23:07:40 UTC (rev 177699)
@@ -27,7 +27,7 @@
 #include "InjectedBundlePageFormClient.h"
 
 #include "APIArray.h"
-#include "ImmutableDictionary.h"
+#include "APIDictionary.h"
 #include "InjectedBundleNodeHandle.h"
 #include "WKAPICast.h"
 #include "WKBundleAPICast.h"
@@ -133,10 +133,10 @@
 
     RefPtr<InjectedBundleNodeHandle> nodeHandle = InjectedBundleNodeHandle::getOrCreate(formElement);
 
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
     for (size_t i = 0; i < values.size(); ++i)
         map.set(values[i].first, API::String::create(values[i].second));
-    auto textFieldsMap = ImmutableDictionary::create(WTF::move(map));
+    auto textFieldsMap = API::Dictionary::create(WTF::move(map));
 
     m_client.willSendSubmitEvent(toAPI(page), toAPI(nodeHandle.get()), toAPI(frame), toAPI(sourceFrame), toAPI(textFieldsMap.get()), m_client.base.clientInfo);
 }
@@ -148,10 +148,10 @@
 
     RefPtr<InjectedBundleNodeHandle> nodeHandle = InjectedBundleNodeHandle::getOrCreate(formElement);
 
-    ImmutableDictionary::MapType map;
+    API::Dictionary::MapType map;
     for (size_t i = 0; i < values.size(); ++i)
         map.set(values[i].first, API::String::create(values[i].second));
-    auto textFieldsMap = ImmutableDictionary::create(WTF::move(map));
+    auto textFieldsMap = API::Dictionary::create(WTF::move(map));
 
     WKTypeRef userDataToPass = 0;
     m_client.willSubmitForm(toAPI(page), toAPI(nodeHandle.get()), toAPI(frame), toAPI(sourceFrame), toAPI(textFieldsMap.get()), &userDataToPass, m_client.base.clientInfo);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to