Title: [188126] trunk/Source
Revision
188126
Author
[email protected]
Date
2015-08-07 09:04:49 -0700 (Fri, 07 Aug 2015)

Log Message

Move concrete KeyedDecoder/Encoder implementations to WebCore.
https://bugs.webkit.org/show_bug.cgi?id=147757.

Rubberstamped by Andy Estes.

Source/WebCore:

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebCore.xcodeproj/project.pbxproj:

* platform/KeyedCoding.h:
(WebCore::KeyedDecoder::KeyedDecoder): Static constructor to be implemented per-platform.
(WebCore::KeyedEncoder::KeyedEncoder): Ditto.

* platform/cf/KeyedDecoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.cpp.
(WebCore::KeyedDecoder::decoder):
(WebCore::KeyedDecoderCF::KeyedDecoderCF):
(WebCore::KeyedDecoderCF::~KeyedDecoderCF):
(WebCore::KeyedDecoderCF::decodeBytes):
(WebCore::KeyedDecoderCF::decodeBool):
(WebCore::KeyedDecoderCF::decodeUInt32):
(WebCore::KeyedDecoderCF::decodeInt32):
(WebCore::KeyedDecoderCF::decodeInt64):
(WebCore::KeyedDecoderCF::decodeFloat):
(WebCore::KeyedDecoderCF::decodeDouble):
(WebCore::KeyedDecoderCF::decodeString):
(WebCore::KeyedDecoderCF::beginObject):
(WebCore::KeyedDecoderCF::endObject):
(WebCore::KeyedDecoderCF::beginArray):
(WebCore::KeyedDecoderCF::beginArrayElement):
(WebCore::KeyedDecoderCF::endArrayElement):
(WebCore::KeyedDecoderCF::endArray):
* platform/cf/KeyedDecoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.h.

* platform/cf/KeyedEncoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.cpp.
(WebCore::KeyedEncoder::encoder):
(WebCore::createDictionary):
(WebCore::KeyedEncoderCF::KeyedEncoderCF):
(WebCore::KeyedEncoderCF::~KeyedEncoderCF):
(WebCore::KeyedEncoderCF::encodeBytes):
(WebCore::KeyedEncoderCF::encodeBool):
(WebCore::KeyedEncoderCF::encodeUInt32):
(WebCore::KeyedEncoderCF::encodeInt32):
(WebCore::KeyedEncoderCF::encodeInt64):
(WebCore::KeyedEncoderCF::encodeFloat):
(WebCore::KeyedEncoderCF::encodeDouble):
(WebCore::KeyedEncoderCF::encodeString):
(WebCore::KeyedEncoderCF::beginObject):
(WebCore::KeyedEncoderCF::endObject):
(WebCore::KeyedEncoderCF::beginArray):
(WebCore::KeyedEncoderCF::beginArrayElement):
(WebCore::KeyedEncoderCF::endArrayElement):
(WebCore::KeyedEncoderCF::endArray):
(WebCore::KeyedEncoderCF::finishEncoding):
* platform/cf/KeyedEncoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.h.

* platform/glib/KeyedDecoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.cpp.
(WebCore::KeyedDecoder::decoder):
(WebCore::KeyedDecoderGlib::KeyedDecoderGlib):
(WebCore::KeyedDecoderGlib::~KeyedDecoderGlib):
(WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
(WebCore::KeyedDecoderGlib::decodeBytes):
(WebCore::KeyedDecoderGlib::decodeSimpleValue):
(WebCore::KeyedDecoderGlib::decodeBool):
(WebCore::KeyedDecoderGlib::decodeUInt32):
(WebCore::KeyedDecoderGlib::decodeInt32):
(WebCore::KeyedDecoderGlib::decodeInt64):
(WebCore::KeyedDecoderGlib::decodeFloat):
(WebCore::KeyedDecoderGlib::decodeDouble):
(WebCore::KeyedDecoderGlib::decodeString):
(WebCore::KeyedDecoderGlib::beginObject):
(WebCore::KeyedDecoderGlib::endObject):
(WebCore::KeyedDecoderGlib::beginArray):
(WebCore::KeyedDecoderGlib::beginArrayElement):
(WebCore::KeyedDecoderGlib::endArrayElement):
(WebCore::KeyedDecoderGlib::endArray):
* platform/glib/KeyedDecoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.h.

* platform/glib/KeyedEncoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.cpp.
(WebCore::KeyedEncoder::encoder):
(WebCore::KeyedEncoderGlib::KeyedEncoderGlib):
(WebCore::KeyedEncoderGlib::~KeyedEncoderGlib):
(WebCore::KeyedEncoderGlib::encodeBytes):
(WebCore::KeyedEncoderGlib::encodeBool):
(WebCore::KeyedEncoderGlib::encodeUInt32):
(WebCore::KeyedEncoderGlib::encodeInt32):
(WebCore::KeyedEncoderGlib::encodeInt64):
(WebCore::KeyedEncoderGlib::encodeFloat):
(WebCore::KeyedEncoderGlib::encodeDouble):
(WebCore::KeyedEncoderGlib::encodeString):
(WebCore::KeyedEncoderGlib::beginObject):
(WebCore::KeyedEncoderGlib::endObject):
(WebCore::KeyedEncoderGlib::beginArray):
(WebCore::KeyedEncoderGlib::beginArrayElement):
(WebCore::KeyedEncoderGlib::endArrayElement):
(WebCore::KeyedEncoderGlib::endArray):
(WebCore::KeyedEncoderGlib::finishEncoding):
* platform/glib/KeyedEncoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.h.

Source/WebKit2:

* DatabaseProcess/IndexedDB/IDBSerialization.cpp:
(WebKit::serializeIDBKeyPath):
(WebKit::deserializeIDBKeyPath):
(WebKit::serializeIDBKeyData):
(WebKit::deserializeIDBKeyData):

* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (188125 => 188126)


--- trunk/Source/WebCore/ChangeLog	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebCore/ChangeLog	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,3 +1,103 @@
+2015-08-07  Brady Eidson  <[email protected]>
+
+        Move concrete KeyedDecoder/Encoder implementations to WebCore.
+        https://bugs.webkit.org/show_bug.cgi?id=147757.
+
+        Rubberstamped by Andy Estes.
+
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * platform/KeyedCoding.h:
+        (WebCore::KeyedDecoder::KeyedDecoder): Static constructor to be implemented per-platform.
+        (WebCore::KeyedEncoder::KeyedEncoder): Ditto.
+
+        * platform/cf/KeyedDecoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.cpp.
+        (WebCore::KeyedDecoder::decoder):
+        (WebCore::KeyedDecoderCF::KeyedDecoderCF):
+        (WebCore::KeyedDecoderCF::~KeyedDecoderCF):
+        (WebCore::KeyedDecoderCF::decodeBytes):
+        (WebCore::KeyedDecoderCF::decodeBool):
+        (WebCore::KeyedDecoderCF::decodeUInt32):
+        (WebCore::KeyedDecoderCF::decodeInt32):
+        (WebCore::KeyedDecoderCF::decodeInt64):
+        (WebCore::KeyedDecoderCF::decodeFloat):
+        (WebCore::KeyedDecoderCF::decodeDouble):
+        (WebCore::KeyedDecoderCF::decodeString):
+        (WebCore::KeyedDecoderCF::beginObject):
+        (WebCore::KeyedDecoderCF::endObject):
+        (WebCore::KeyedDecoderCF::beginArray):
+        (WebCore::KeyedDecoderCF::beginArrayElement):
+        (WebCore::KeyedDecoderCF::endArrayElement):
+        (WebCore::KeyedDecoderCF::endArray):
+        * platform/cf/KeyedDecoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.h.
+        
+        * platform/cf/KeyedEncoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.cpp.
+        (WebCore::KeyedEncoder::encoder):
+        (WebCore::createDictionary):
+        (WebCore::KeyedEncoderCF::KeyedEncoderCF):
+        (WebCore::KeyedEncoderCF::~KeyedEncoderCF):
+        (WebCore::KeyedEncoderCF::encodeBytes):
+        (WebCore::KeyedEncoderCF::encodeBool):
+        (WebCore::KeyedEncoderCF::encodeUInt32):
+        (WebCore::KeyedEncoderCF::encodeInt32):
+        (WebCore::KeyedEncoderCF::encodeInt64):
+        (WebCore::KeyedEncoderCF::encodeFloat):
+        (WebCore::KeyedEncoderCF::encodeDouble):
+        (WebCore::KeyedEncoderCF::encodeString):
+        (WebCore::KeyedEncoderCF::beginObject):
+        (WebCore::KeyedEncoderCF::endObject):
+        (WebCore::KeyedEncoderCF::beginArray):
+        (WebCore::KeyedEncoderCF::beginArrayElement):
+        (WebCore::KeyedEncoderCF::endArrayElement):
+        (WebCore::KeyedEncoderCF::endArray):
+        (WebCore::KeyedEncoderCF::finishEncoding):
+        * platform/cf/KeyedEncoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.h.
+        
+        * platform/glib/KeyedDecoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.cpp.
+        (WebCore::KeyedDecoder::decoder):
+        (WebCore::KeyedDecoderGlib::KeyedDecoderGlib):
+        (WebCore::KeyedDecoderGlib::~KeyedDecoderGlib):
+        (WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
+        (WebCore::KeyedDecoderGlib::decodeBytes):
+        (WebCore::KeyedDecoderGlib::decodeSimpleValue):
+        (WebCore::KeyedDecoderGlib::decodeBool):
+        (WebCore::KeyedDecoderGlib::decodeUInt32):
+        (WebCore::KeyedDecoderGlib::decodeInt32):
+        (WebCore::KeyedDecoderGlib::decodeInt64):
+        (WebCore::KeyedDecoderGlib::decodeFloat):
+        (WebCore::KeyedDecoderGlib::decodeDouble):
+        (WebCore::KeyedDecoderGlib::decodeString):
+        (WebCore::KeyedDecoderGlib::beginObject):
+        (WebCore::KeyedDecoderGlib::endObject):
+        (WebCore::KeyedDecoderGlib::beginArray):
+        (WebCore::KeyedDecoderGlib::beginArrayElement):
+        (WebCore::KeyedDecoderGlib::endArrayElement):
+        (WebCore::KeyedDecoderGlib::endArray):
+        * platform/glib/KeyedDecoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.h.
+        
+        * platform/glib/KeyedEncoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.cpp.
+        (WebCore::KeyedEncoder::encoder):
+        (WebCore::KeyedEncoderGlib::KeyedEncoderGlib):
+        (WebCore::KeyedEncoderGlib::~KeyedEncoderGlib):
+        (WebCore::KeyedEncoderGlib::encodeBytes):
+        (WebCore::KeyedEncoderGlib::encodeBool):
+        (WebCore::KeyedEncoderGlib::encodeUInt32):
+        (WebCore::KeyedEncoderGlib::encodeInt32):
+        (WebCore::KeyedEncoderGlib::encodeInt64):
+        (WebCore::KeyedEncoderGlib::encodeFloat):
+        (WebCore::KeyedEncoderGlib::encodeDouble):
+        (WebCore::KeyedEncoderGlib::encodeString):
+        (WebCore::KeyedEncoderGlib::beginObject):
+        (WebCore::KeyedEncoderGlib::endObject):
+        (WebCore::KeyedEncoderGlib::beginArray):
+        (WebCore::KeyedEncoderGlib::beginArrayElement):
+        (WebCore::KeyedEncoderGlib::endArrayElement):
+        (WebCore::KeyedEncoderGlib::endArray):
+        (WebCore::KeyedEncoderGlib::finishEncoding):
+        * platform/glib/KeyedEncoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.h.
+
 2015-08-07  Carlos Garcia Campos  <[email protected]>
 
         [GStreamer] Do not automatically show PackageKit codec installation notifications

Modified: trunk/Source/WebCore/PlatformEfl.cmake (188125 => 188126)


--- trunk/Source/WebCore/PlatformEfl.cmake	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebCore/PlatformEfl.cmake	2015-08-07 16:04:49 UTC (rev 188126)
@@ -106,6 +106,9 @@
     platform/geoclue/GeolocationProviderGeoclue1.cpp
     platform/geoclue/GeolocationProviderGeoclue2.cpp
 
+    platform/glib/KeyedDecoderGlib.cpp
+    platform/glib/KeyedEncoderGlib.cpp
+
     platform/graphics/ImageSource.cpp
     platform/graphics/PlatformDisplay.cpp
     platform/graphics/WOFFFileFormat.cpp

Modified: trunk/Source/WebCore/PlatformGTK.cmake (188125 => 188126)


--- trunk/Source/WebCore/PlatformGTK.cmake	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebCore/PlatformGTK.cmake	2015-08-07 16:04:49 UTC (rev 188126)
@@ -65,6 +65,9 @@
     platform/geoclue/GeolocationProviderGeoclue1.cpp
     platform/geoclue/GeolocationProviderGeoclue2.cpp
 
+    platform/glib/KeyedDecoderGlib.cpp
+    platform/glib/KeyedEncoderGlib.cpp
+
     platform/graphics/GLContext.cpp
     platform/graphics/GraphicsContext3DPrivate.cpp
     platform/graphics/ImageSource.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (188125 => 188126)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1998,6 +1998,10 @@
 		5179CE2A195C91860019C198 /* GamepadProviderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5179CE29195C91860019C198 /* GamepadProviderClient.h */; };
 		5179CE36195CAC7E0019C198 /* HIDGamepadProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5179CE34195CAC7E0019C198 /* HIDGamepadProvider.cpp */; };
 		5179CE37195CAC7E0019C198 /* HIDGamepadProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 5179CE35195CAC7E0019C198 /* HIDGamepadProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		517A63C31B74318700E7DCDC /* KeyedDecoderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A63BF1B74317E00E7DCDC /* KeyedDecoderCF.cpp */; };
+		517A63C41B74318B00E7DCDC /* KeyedEncoderCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517A63C11B74317E00E7DCDC /* KeyedEncoderCF.cpp */; };
+		517A63C51B74318F00E7DCDC /* KeyedDecoderCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A63C01B74317E00E7DCDC /* KeyedDecoderCF.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		517A63C61B74319200E7DCDC /* KeyedEncoderCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 517A63C21B74317E00E7DCDC /* KeyedEncoderCF.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */; };
 		5189F01D10B37BD900F3C739 /* JSPopStateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */; };
 		5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5189F01C10B37BD900F3C739 /* JSPopStateEvent.h */; };
@@ -9249,6 +9253,10 @@
 		5179CE29195C91860019C198 /* GamepadProviderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamepadProviderClient.h; sourceTree = "<group>"; };
 		5179CE34195CAC7E0019C198 /* HIDGamepadProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HIDGamepadProvider.cpp; sourceTree = "<group>"; };
 		5179CE35195CAC7E0019C198 /* HIDGamepadProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HIDGamepadProvider.h; sourceTree = "<group>"; };
+		517A63BF1B74317E00E7DCDC /* KeyedDecoderCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedDecoderCF.cpp; sourceTree = "<group>"; };
+		517A63C01B74317E00E7DCDC /* KeyedDecoderCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedDecoderCF.h; sourceTree = "<group>"; };
+		517A63C11B74317E00E7DCDC /* KeyedEncoderCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedEncoderCF.cpp; sourceTree = "<group>"; };
+		517A63C21B74317E00E7DCDC /* KeyedEncoderCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedEncoderCF.h; sourceTree = "<group>"; };
 		517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtension.cpp; sourceTree = "<group>"; };
 		517FBA18151AA71B00B57959 /* DOMWindowExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowExtension.h; sourceTree = "<group>"; };
 		5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPopStateEvent.cpp; sourceTree = "<group>"; };
@@ -15451,6 +15459,10 @@
 				443817FD1A91B2F8006E04F2 /* CoreMediaSoftLink.cpp */,
 				443817FE1A91B2F8006E04F2 /* CoreMediaSoftLink.h */,
 				5160306B0CC4362300C8AC25 /* FileSystemCF.cpp */,
+				517A63BF1B74317E00E7DCDC /* KeyedDecoderCF.cpp */,
+				517A63C01B74317E00E7DCDC /* KeyedDecoderCF.h */,
+				517A63C11B74317E00E7DCDC /* KeyedEncoderCF.cpp */,
+				517A63C21B74317E00E7DCDC /* KeyedEncoderCF.h */,
 				5CBC8DAA1AAA302200E1C803 /* MediaAccessibilitySoftLink.cpp */,
 				5CBC8DAB1AAA302200E1C803 /* MediaAccessibilitySoftLink.h */,
 				2D76BB8319456F8100CFD29A /* RunLoopObserver.cpp */,
@@ -25624,6 +25636,7 @@
 				07969DB017D14151007FF842 /* JSRTCDTMFSender.h in Headers */,
 				07969DB217D14151007FF842 /* JSRTCDTMFToneChangeEvent.h in Headers */,
 				07969DB617D14151007FF842 /* JSRTCIceCandidate.h in Headers */,
+				517A63C61B74319200E7DCDC /* KeyedEncoderCF.h in Headers */,
 				07969DB817D14151007FF842 /* JSRTCIceCandidateEvent.h in Headers */,
 				073794EC19EE341E00E5A045 /* JSRTCIceServer.h in Headers */,
 				07969DBA17D14151007FF842 /* JSRTCPeerConnection.h in Headers */,
@@ -26424,6 +26437,7 @@
 				31955A88160D199200858025 /* RenderSnapshottedPlugIn.h in Headers */,
 				BC8C8FAE0DDCD31B00B592F4 /* RenderStyle.h in Headers */,
 				BC5EB6680E81CB7100B25965 /* RenderStyleConstants.h in Headers */,
+				517A63C51B74318F00E7DCDC /* KeyedDecoderCF.h in Headers */,
 				436708C112D9CA4B00044234 /* RenderSVGBlock.h in Headers */,
 				436708C312D9CA4B00044234 /* RenderSVGContainer.h in Headers */,
 				2B365C841525119E0091D27B /* RenderSVGEllipse.h in Headers */,
@@ -29625,6 +29639,7 @@
 				07C59B6817F784BA000FBCBB /* MediaSourceStates.cpp in Sources */,
 				078E08FF17D14CEE00420AA1 /* MediaStream.cpp in Sources */,
 				078E094B17D1709600420AA1 /* MediaStreamAudioDestinationNode.cpp in Sources */,
+				517A63C31B74318700E7DCDC /* KeyedDecoderCF.cpp in Sources */,
 				0783228418013ED800999E0C /* MediaStreamAudioSource.cpp in Sources */,
 				FD671A77159BB07000197559 /* MediaStreamAudioSourceNode.cpp in Sources */,
 				0705851517FB0EEA005F2BCB /* MediaStreamCapabilities.cpp in Sources */,
@@ -29735,6 +29750,7 @@
 				1A0D57360A5C77FE007EDD4C /* OverflowEvent.cpp in Sources */,
 				9B55EEE91B3E8898005342BC /* EditorCocoa.mm in Sources */,
 				65FEA86909833ADE00BED4AB /* Page.cpp in Sources */,
+				517A63C41B74318B00E7DCDC /* KeyedEncoderCF.cpp in Sources */,
 				1477E7760BF4134A00152872 /* PageCache.cpp in Sources */,
 				CD5E5B611A15F156000C609E /* PageConfiguration.cpp in Sources */,
 				F3820892147D35F90010BC06 /* PageConsoleAgent.cpp in Sources */,

Modified: trunk/Source/WebCore/platform/KeyedCoding.h (188125 => 188126)


--- trunk/Source/WebCore/platform/KeyedCoding.h	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebCore/platform/KeyedCoding.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -35,10 +35,11 @@
 class SharedBuffer;
 
 class KeyedDecoder {
-protected:
+public:
+    WEBCORE_EXPORT static std::unique_ptr<KeyedDecoder> decoder(const uint8_t* data, size_t);
+
     virtual ~KeyedDecoder() { }
 
-public:
     virtual bool decodeBytes(const String& key, const uint8_t*&, size_t&) = 0;
     virtual bool decodeBool(const String& key, bool&) = 0;
     virtual bool decodeUInt32(const String& key, uint32_t&) = 0;
@@ -125,6 +126,11 @@
         return result;
     }
 
+protected:
+    KeyedDecoder()
+    {
+    }
+
 private:
     virtual bool beginObject(const String& key) = 0;
     virtual void endObject() = 0;
@@ -136,10 +142,11 @@
 };
 
 class KeyedEncoder {
-protected:
+public:
+    WEBCORE_EXPORT static std::unique_ptr<KeyedEncoder> encoder();
+
     virtual ~KeyedEncoder() { }
 
-public:
     virtual void encodeBytes(const String& key, const uint8_t*, size_t) = 0;
     virtual void encodeBool(const String& key, bool) = 0;
     virtual void encodeUInt32(const String& key, uint32_t) = 0;
@@ -188,6 +195,11 @@
         endArray();
     }
 
+protected:
+    KeyedEncoder()
+    {
+    }
+
 private:
     virtual void beginObject(const String& key) = 0;
     virtual void endObject() = 0;

Copied: trunk/Source/WebCore/platform/cf/KeyedDecoderCF.cpp (from rev 188125, trunk/Source/WebKit2/Shared/cf/KeyedDecoder.cpp) (0 => 188126)


--- trunk/Source/WebCore/platform/cf/KeyedDecoderCF.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/cf/KeyedDecoderCF.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2014 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 "KeyedDecoderCF.h"
+
+#include <wtf/cf/TypeCastsCF.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+std::unique_ptr<KeyedDecoder> KeyedDecoder::decoder(const uint8_t* data, size_t size)
+{
+    return std::make_unique<KeyedDecoderCF>(data, size);
+}
+
+KeyedDecoderCF::KeyedDecoderCF(const uint8_t* data, size_t size)
+{
+    auto cfData = adoptCF(CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, data, size, kCFAllocatorNull));
+
+    if (auto rootDictionary = adoptCF(dynamic_cf_cast<CFDictionaryRef>(CFPropertyListCreateWithData(kCFAllocatorDefault, cfData.get(), kCFPropertyListImmutable, nullptr, nullptr))))
+        m_rootDictionary = WTF::move(rootDictionary);
+    else
+        m_rootDictionary = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, nullptr, nullptr, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+    m_dictionaryStack.append(m_rootDictionary.get());
+}
+
+KeyedDecoderCF::~KeyedDecoderCF()
+{
+    ASSERT(m_dictionaryStack.size() == 1);
+    ASSERT(m_dictionaryStack.last() == m_rootDictionary);
+    ASSERT(m_arrayStack.isEmpty());
+    ASSERT(m_arrayIndexStack.isEmpty());
+}
+
+bool KeyedDecoderCF::decodeBytes(const String& key, const uint8_t*& bytes, size_t& size)
+{
+    auto data = "" key.createCFString().get()));
+    if (!data)
+        return false;
+
+    bytes = CFDataGetBytePtr(data);
+    size = CFDataGetLength(data);
+    return true;
+}
+
+bool KeyedDecoderCF::decodeBool(const String& key, bool& result)
+{
+    auto boolean = dynamic_cf_cast<CFBooleanRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!boolean)
+        return false;
+
+    result = CFBooleanGetValue(boolean);
+    return true;
+}
+
+bool KeyedDecoderCF::decodeUInt32(const String& key, uint32_t& result)
+{
+    return decodeInt32(key, reinterpret_cast<int32_t&>(result));
+}
+
+bool KeyedDecoderCF::decodeInt32(const String& key, int32_t& result)
+{
+    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!number)
+        return false;
+
+    return CFNumberGetValue(number, kCFNumberSInt32Type, &result);
+}
+
+bool KeyedDecoderCF::decodeInt64(const String& key, int64_t& result)
+{
+    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!number)
+        return false;
+
+    return CFNumberGetValue(number, kCFNumberSInt64Type, &result);
+}
+
+bool KeyedDecoderCF::decodeFloat(const String& key, float& result)
+{
+    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!number)
+        return false;
+
+    return CFNumberGetValue(number, kCFNumberFloatType, &result);
+}
+
+bool KeyedDecoderCF::decodeDouble(const String& key, double& result)
+{
+    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!number)
+        return false;
+
+    return CFNumberGetValue(number, kCFNumberDoubleType, &result);
+}
+
+bool KeyedDecoderCF::decodeString(const String& key, String& result)
+{
+    auto string = dynamic_cf_cast<CFStringRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!string)
+        return false;
+
+    result = string;
+    return true;
+}
+
+bool KeyedDecoderCF::beginObject(const String& key)
+{
+    auto dictionary = dynamic_cf_cast<CFDictionaryRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!dictionary)
+        return false;
+
+    m_dictionaryStack.append(dictionary);
+    return true;
+}
+
+void KeyedDecoderCF::endObject()
+{
+    m_dictionaryStack.removeLast();
+}
+
+bool KeyedDecoderCF::beginArray(const String& key)
+{
+    auto array = dynamic_cf_cast<CFArrayRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
+    if (!array)
+        return false;
+
+    for (CFIndex i = 0; i < CFArrayGetCount(array); ++i) {
+        CFTypeRef object = CFArrayGetValueAtIndex(array, i);
+        if (CFGetTypeID(object) != CFDictionaryGetTypeID())
+            return false;
+    }
+
+    m_arrayStack.append(array);
+    m_arrayIndexStack.append(0);
+    return true;
+}
+
+bool KeyedDecoderCF::beginArrayElement()
+{
+    if (m_arrayIndexStack.last() >= CFArrayGetCount(m_arrayStack.last()))
+        return false;
+
+    auto dictionary = checked_cf_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(m_arrayStack.last(), m_arrayIndexStack.last()++));
+    m_dictionaryStack.append(dictionary);
+    return true;
+}
+
+void KeyedDecoderCF::endArrayElement()
+{
+    m_dictionaryStack.removeLast();
+}
+
+void KeyedDecoderCF::endArray()
+{
+    m_arrayStack.removeLast();
+    m_arrayIndexStack.removeLast();
+}
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/platform/cf/KeyedDecoderCF.h (from rev 188125, trunk/Source/WebKit2/Shared/cf/KeyedDecoder.h) (0 => 188126)


--- trunk/Source/WebCore/platform/cf/KeyedDecoderCF.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/cf/KeyedDecoderCF.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2014 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 KeyedDecoderCF_h
+#define KeyedDecoderCF_h
+
+#include "KeyedCoding.h"
+#include <wtf/RetainPtr.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class KeyedDecoderCF final : public KeyedDecoder {
+public:
+    KeyedDecoderCF(const uint8_t* data, size_t);
+    virtual ~KeyedDecoderCF() override;
+
+private:
+    virtual bool decodeBytes(const String& key, const uint8_t*&, size_t&) override;
+    virtual bool decodeBool(const String& key, bool&) override;
+    virtual bool decodeUInt32(const String& key, uint32_t&) override;
+    virtual bool decodeInt32(const String& key, int32_t&) override;
+    virtual bool decodeInt64(const String& key, int64_t&) override;
+    virtual bool decodeFloat(const String& key, float&) override;
+    virtual bool decodeDouble(const String& key, double&) override;
+    virtual bool decodeString(const String& key, String&) override;
+
+    virtual bool beginObject(const String& key) override;
+    virtual void endObject() override;
+
+    virtual bool beginArray(const String& key) override;
+    virtual bool beginArrayElement() override;
+    virtual void endArrayElement() override;
+    virtual void endArray() override;
+
+    RetainPtr<CFDictionaryRef> m_rootDictionary;
+
+    Vector<CFDictionaryRef, 16> m_dictionaryStack;
+    Vector<CFArrayRef, 16> m_arrayStack;
+    Vector<CFIndex> m_arrayIndexStack;
+};
+
+} // namespace WebCore
+
+#endif // KeyedDecoderCF_h

Copied: trunk/Source/WebCore/platform/cf/KeyedEncoderCF.cpp (from rev 188125, trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp) (0 => 188126)


--- trunk/Source/WebCore/platform/cf/KeyedEncoderCF.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/cf/KeyedEncoderCF.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2013 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 "KeyedEncoderCF.h"
+
+#include "SharedBuffer.h"
+#include <CoreFoundation/CoreFoundation.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+std::unique_ptr<KeyedEncoder> KeyedEncoder::encoder()
+{
+    return std::make_unique<KeyedEncoderCF>();
+}
+
+static RetainPtr<CFMutableDictionaryRef> createDictionary()
+{
+    return adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+}
+
+KeyedEncoderCF::KeyedEncoderCF()
+    : m_rootDictionary(createDictionary())
+{
+    m_dictionaryStack.append(m_rootDictionary.get());
+}
+    
+KeyedEncoderCF::~KeyedEncoderCF()
+{
+    ASSERT(m_dictionaryStack.size() == 1);
+    ASSERT(m_dictionaryStack.last() == m_rootDictionary);
+    ASSERT(m_arrayStack.isEmpty());
+}
+
+void KeyedEncoderCF::encodeBytes(const String& key, const uint8_t* bytes, size_t size)
+{
+    auto data = "" bytes, size, kCFAllocatorNull));
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), data.get());
+}
+
+void KeyedEncoderCF::encodeBool(const String& key, bool value)
+{
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), value ? kCFBooleanTrue : kCFBooleanFalse);
+}
+
+void KeyedEncoderCF::encodeUInt32(const String& key, uint32_t value)
+{
+    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value));
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
+}
+
+void KeyedEncoderCF::encodeInt32(const String& key, int32_t value)
+{
+    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value));
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
+}
+
+void KeyedEncoderCF::encodeInt64(const String& key, int64_t value)
+{
+    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &value));
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
+}
+
+void KeyedEncoderCF::encodeFloat(const String& key, float value)
+{
+    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &value));
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
+}
+
+void KeyedEncoderCF::encodeDouble(const String& key, double value)
+{
+    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &value));
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
+}
+
+void KeyedEncoderCF::encodeString(const String& key, const String& value)
+{
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), value.createCFString().get());
+}
+
+void KeyedEncoderCF::beginObject(const String& key)
+{
+    auto dictionary = createDictionary();
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), dictionary.get());
+
+    m_dictionaryStack.append(dictionary.get());
+}
+
+void KeyedEncoderCF::endObject()
+{
+    m_dictionaryStack.removeLast();
+}
+
+void KeyedEncoderCF::beginArray(const String& key)
+{
+    auto array = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
+    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), array.get());
+
+    m_arrayStack.append(array.get());
+}
+
+void KeyedEncoderCF::beginArrayElement()
+{
+    auto dictionary = createDictionary();
+    CFArrayAppendValue(m_arrayStack.last(), dictionary.get());
+
+    m_dictionaryStack.append(dictionary.get());
+}
+
+void KeyedEncoderCF::endArrayElement()
+{
+    m_dictionaryStack.removeLast();
+}
+
+void KeyedEncoderCF::endArray()
+{
+    m_arrayStack.removeLast();
+}
+
+PassRefPtr<SharedBuffer> KeyedEncoderCF::finishEncoding()
+{
+    RetainPtr<CFDataRef> data = "" m_rootDictionary.get(), kCFPropertyListBinaryFormat_v1_0, 0, nullptr));
+    if (!data)
+        return nullptr;
+
+    return SharedBuffer::wrapCFData(data.get());
+}
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/platform/cf/KeyedEncoderCF.h (from rev 188125, trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h) (0 => 188126)


--- trunk/Source/WebCore/platform/cf/KeyedEncoderCF.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/cf/KeyedEncoderCF.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2013 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 KeyedEncoderCF_h
+#define KeyedEncoderCF_h
+
+#include "KeyedCoding.h"
+#include <wtf/RetainPtr.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class KeyedEncoderCF final : public KeyedEncoder {
+public:
+    KeyedEncoderCF();
+    ~KeyedEncoderCF();
+
+    virtual PassRefPtr<WebCore::SharedBuffer> finishEncoding() override;
+
+private:
+    virtual void encodeBytes(const String& key, const uint8_t*, size_t) override;
+    virtual void encodeBool(const String& key, bool) override;
+    virtual void encodeUInt32(const String& key, uint32_t) override;
+    virtual void encodeInt32(const String& key, int32_t) override;
+    virtual void encodeInt64(const String& key, int64_t) override;
+    virtual void encodeFloat(const String& key, float) override;
+    virtual void encodeDouble(const String& key, double) override;
+    virtual void encodeString(const String& key, const String&) override;
+
+    virtual void beginObject(const String& key) override;
+    virtual void endObject() override;
+
+    virtual void beginArray(const String& key) override;
+    virtual void beginArrayElement() override;
+    virtual void endArrayElement() override;
+    virtual void endArray() override;
+
+    RetainPtr<CFMutableDictionaryRef> m_rootDictionary;
+
+    Vector<CFMutableDictionaryRef, 16> m_dictionaryStack;
+    Vector<CFMutableArrayRef, 16> m_arrayStack;
+};
+
+} // namespace WebCore
+
+#endif // KeyedEncoderCF_h

Copied: trunk/Source/WebCore/platform/glib/KeyedDecoderGlib.cpp (from rev 188125, trunk/Source/WebKit2/Shared/glib/KeyedDecoder.cpp) (0 => 188126)


--- trunk/Source/WebCore/platform/glib/KeyedDecoderGlib.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/glib/KeyedDecoderGlib.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * 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 "KeyedDecoderGlib.h"
+
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+std::unique_ptr<KeyedDecoder> KeyedDecoder::decoder(const uint8_t* data, size_t size)
+{
+    return std::make_unique<KeyedDecoderGlib>(data, size);
+}
+
+KeyedDecoderGlib::KeyedDecoderGlib(const uint8_t* data, size_t size)
+{
+    GRefPtr<GBytes> bytes = adoptGRef(g_bytes_new(data, size));
+    GRefPtr<GVariant> variant = g_variant_new_from_bytes(G_VARIANT_TYPE("a{sv}"), bytes.get(), TRUE);
+    m_dictionaryStack.append(dictionaryFromGVariant(variant.get()));
+}
+
+KeyedDecoderGlib::~KeyedDecoderGlib()
+{
+    ASSERT(m_dictionaryStack.size() == 1);
+    ASSERT(m_arrayStack.isEmpty());
+    ASSERT(m_arrayIndexStack.isEmpty());
+}
+
+HashMap<String, GRefPtr<GVariant>> KeyedDecoderGlib::dictionaryFromGVariant(GVariant* variant)
+{
+    HashMap<String, GRefPtr<GVariant>> dictionary;
+    GVariantIter iter;
+    g_variant_iter_init(&iter, variant);
+    const char* key;
+    GVariant* value;
+    while (g_variant_iter_loop(&iter, "{&sv}", &key, &value))
+        dictionary.set(String::fromUTF8(key), value);
+    return WTF::move(dictionary);
+}
+
+bool KeyedDecoderGlib::decodeBytes(const String& key, const uint8_t*& bytes, size_t& size)
+{
+    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    size = g_variant_get_size(value.get());
+    bytes = static_cast<const uint8_t*>(g_variant_get_data(value.get()));
+    return true;
+}
+
+template<typename T, typename F>
+bool KeyedDecoderGlib::decodeSimpleValue(const String& key, T& result, F getFunction)
+{
+    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    result = getFunction(value.get());
+    return true;
+}
+
+bool KeyedDecoderGlib::decodeBool(const String& key, bool& result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_boolean);
+}
+
+bool KeyedDecoderGlib::decodeUInt32(const String& key, uint32_t& result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_uint32);
+}
+
+bool KeyedDecoderGlib::decodeInt32(const String& key, int32_t& result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_int32);
+}
+
+bool KeyedDecoderGlib::decodeInt64(const String& key, int64_t& result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_int64);
+}
+
+bool KeyedDecoderGlib::decodeFloat(const String& key, float& result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_double);
+}
+
+bool KeyedDecoderGlib::decodeDouble(const String& key, double& result)
+{
+    return decodeSimpleValue(key, result, g_variant_get_double);
+}
+
+bool KeyedDecoderGlib::decodeString(const String& key, String& result)
+{
+    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    result = String::fromUTF8(g_variant_get_string(value.get(), nullptr));
+    return true;
+}
+
+bool KeyedDecoderGlib::beginObject(const String& key)
+{
+    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    m_dictionaryStack.append(dictionaryFromGVariant(value.get()));
+    return true;
+}
+
+void KeyedDecoderGlib::endObject()
+{
+    m_dictionaryStack.removeLast();
+}
+
+bool KeyedDecoderGlib::beginArray(const String& key)
+{
+    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
+    if (!value)
+        return false;
+
+    m_arrayStack.append(value.get());
+    m_arrayIndexStack.append(0);
+    return true;
+}
+
+bool KeyedDecoderGlib::beginArrayElement()
+{
+    if (m_arrayIndexStack.last() >= g_variant_n_children(m_arrayStack.last()))
+        return false;
+
+    GRefPtr<GVariant> variant = adoptGRef(g_variant_get_child_value(m_arrayStack.last(), m_arrayIndexStack.last()++));
+    m_dictionaryStack.append(dictionaryFromGVariant(variant.get()));
+    return true;
+}
+
+void KeyedDecoderGlib::endArrayElement()
+{
+    m_dictionaryStack.removeLast();
+}
+
+void KeyedDecoderGlib::endArray()
+{
+    m_arrayStack.removeLast();
+    m_arrayIndexStack.removeLast();
+}
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/platform/glib/KeyedDecoderGlib.h (from rev 188125, trunk/Source/WebKit2/Shared/glib/KeyedDecoder.h) (0 => 188126)


--- trunk/Source/WebCore/platform/glib/KeyedDecoderGlib.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/glib/KeyedDecoderGlib.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2015 Igaia S.L.
+ *
+ * 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 KeyedDecoderGlib_h
+#define KeyedDecoderGlib_h
+
+#include "KeyedCoding.h"
+#include <glib.h>
+#include <wtf/HashMap.h>
+#include <wtf/glib/GRefPtr.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class KeyedDecoderGlib final : public KeyedDecoder {
+public:
+    KeyedDecoderGlib(const uint8_t* data, size_t);
+    virtual ~KeyedDecoderGlib() override;
+
+private:
+    virtual bool decodeBytes(const String& key, const uint8_t*&, size_t&) override;
+    virtual bool decodeBool(const String& key, bool&) override;
+    virtual bool decodeUInt32(const String& key, uint32_t&) override;
+    virtual bool decodeInt32(const String& key, int32_t&) override;
+    virtual bool decodeInt64(const String& key, int64_t&) override;
+    virtual bool decodeFloat(const String& key, float&) override;
+    virtual bool decodeDouble(const String& key, double&) override;
+    virtual bool decodeString(const String& key, String&) override;
+
+    virtual bool beginObject(const String& key) override;
+    virtual void endObject() override;
+
+    virtual bool beginArray(const String& key) override;
+    virtual bool beginArrayElement() override;
+    virtual void endArrayElement() override;
+    virtual void endArray() override;
+
+    template<typename T, typename F> bool decodeSimpleValue(const String& key, T& result, F getFunction);
+    HashMap<String, GRefPtr<GVariant>> dictionaryFromGVariant(GVariant*);
+
+    Vector<HashMap<String, GRefPtr<GVariant>>> m_dictionaryStack;
+    Vector<GVariant*, 16> m_arrayStack;
+    Vector<unsigned> m_arrayIndexStack;
+};
+
+} // namespace WebCore
+
+#endif // KeyedDecoderGlib_h

Copied: trunk/Source/WebCore/platform/glib/KeyedEncoderGlib.cpp (from rev 188125, trunk/Source/WebKit2/Shared/glib/KeyedEncoder.cpp) (0 => 188126)


--- trunk/Source/WebCore/platform/glib/KeyedEncoderGlib.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/glib/KeyedEncoderGlib.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * 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 "KeyedEncoderGlib.h"
+
+#include "SharedBuffer.h"
+#include <wtf/text/CString.h>
+
+namespace WebCore {
+
+std::unique_ptr<KeyedEncoder> KeyedEncoder::encoder()
+{
+    return std::make_unique<KeyedEncoderGlib>();
+}
+
+KeyedEncoderGlib::KeyedEncoderGlib()
+{
+    g_variant_builder_init(&m_variantBuilder, G_VARIANT_TYPE("a{sv}"));
+    m_variantBuilderStack.append(&m_variantBuilder);
+}
+
+KeyedEncoderGlib::~KeyedEncoderGlib()
+{
+    ASSERT(m_variantBuilderStack.size() == 1);
+    ASSERT(m_variantBuilderStack.last() == &m_variantBuilder);
+    ASSERT(m_arrayStack.isEmpty());
+    ASSERT(m_objectStack.isEmpty());
+}
+
+void KeyedEncoderGlib::encodeBytes(const String& key, const uint8_t* bytes, size_t size)
+{
+    GRefPtr<GBytes> gBytes = adoptGRef(g_bytes_new_static(bytes, size));
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_from_bytes(G_VARIANT_TYPE("ay"), gBytes.get(), TRUE));
+}
+
+void KeyedEncoderGlib::encodeBool(const String& key, bool value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_boolean(value));
+}
+
+void KeyedEncoderGlib::encodeUInt32(const String& key, uint32_t value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_uint32(value));
+}
+
+void KeyedEncoderGlib::encodeInt32(const String& key, int32_t value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_int32(value));
+}
+
+void KeyedEncoderGlib::encodeInt64(const String& key, int64_t value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_int64(value));
+}
+
+void KeyedEncoderGlib::encodeFloat(const String& key, float value)
+{
+    encodeDouble(key, value);
+}
+
+void KeyedEncoderGlib::encodeDouble(const String& key, double value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_double(value));
+}
+
+void KeyedEncoderGlib::encodeString(const String& key, const String& value)
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_string(value.utf8().data()));
+}
+
+void KeyedEncoderGlib::beginObject(const String& key)
+{
+    GRefPtr<GVariantBuilder> builder = adoptGRef(g_variant_builder_new(G_VARIANT_TYPE("aa{sv}")));
+    m_objectStack.append(std::make_pair(key, builder));
+    m_variantBuilderStack.append(builder.get());
+}
+
+void KeyedEncoderGlib::endObject()
+{
+    GVariantBuilder* builder = m_variantBuilderStack.takeLast();
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", m_objectStack.last().first.utf8().data(), g_variant_builder_end(builder));
+    m_objectStack.removeLast();
+}
+
+void KeyedEncoderGlib::beginArray(const String& key)
+{
+    m_arrayStack.append(std::make_pair(key, adoptGRef(g_variant_builder_new(G_VARIANT_TYPE("aa{sv}")))));
+}
+
+void KeyedEncoderGlib::beginArrayElement()
+{
+    m_variantBuilderStack.append(g_variant_builder_new(G_VARIANT_TYPE("a{sv}")));
+}
+
+void KeyedEncoderGlib::endArrayElement()
+{
+    GRefPtr<GVariantBuilder> variantBuilder = adoptGRef(m_variantBuilderStack.takeLast());
+    g_variant_builder_add_value(m_arrayStack.last().second.get(), g_variant_builder_end(variantBuilder.get()));
+}
+
+void KeyedEncoderGlib::endArray()
+{
+    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", m_arrayStack.last().first.utf8().data(), g_variant_builder_end(m_arrayStack.last().second.get()));
+    m_arrayStack.removeLast();
+}
+
+PassRefPtr<SharedBuffer> KeyedEncoderGlib::finishEncoding()
+{
+    g_assert(m_variantBuilderStack.last() == &m_variantBuilder);
+    GRefPtr<GVariant> variant = g_variant_builder_end(&m_variantBuilder);
+    GRefPtr<GBytes> data = ""
+    return SharedBuffer::create(static_cast<const unsigned char*>(g_bytes_get_data(data.get(), nullptr)), static_cast<unsigned>(g_bytes_get_size(data.get())));
+}
+
+} // namespace WebCore

Copied: trunk/Source/WebCore/platform/glib/KeyedEncoderGlib.h (from rev 188125, trunk/Source/WebKit2/Shared/glib/KeyedEncoder.h) (0 => 188126)


--- trunk/Source/WebCore/platform/glib/KeyedEncoderGlib.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/glib/KeyedEncoderGlib.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2015 Igalia S.L.
+ *
+ * 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 KeyedEncoderGlib_h
+#define KeyedEncoderGlib_h
+
+#include "KeyedCoding.h"
+#include <glib.h>
+#include <wtf/Vector.h>
+#include <wtf/glib/GRefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class KeyedEncoderGlib final : public KeyedEncoder {
+public:
+    KeyedEncoderGlib();
+    ~KeyedEncoderGlib();
+
+    virtual PassRefPtr<WebCore::SharedBuffer> finishEncoding() override;
+
+private:
+    virtual void encodeBytes(const String& key, const uint8_t*, size_t) override;
+    virtual void encodeBool(const String& key, bool) override;
+    virtual void encodeUInt32(const String& key, uint32_t) override;
+    virtual void encodeInt32(const String& key, int32_t) override;
+    virtual void encodeInt64(const String& key, int64_t) override;
+    virtual void encodeFloat(const String& key, float) override;
+    virtual void encodeDouble(const String& key, double) override;
+    virtual void encodeString(const String& key, const String&) override;
+
+    virtual void beginObject(const String& key) override;
+    virtual void endObject() override;
+
+    virtual void beginArray(const String& key) override;
+    virtual void beginArrayElement() override;
+    virtual void endArrayElement() override;
+    virtual void endArray() override;
+
+    GVariantBuilder m_variantBuilder;
+    Vector<GVariantBuilder*, 16> m_variantBuilderStack;
+    Vector<std::pair<String, GRefPtr<GVariantBuilder>>, 16> m_arrayStack;
+    Vector<std::pair<String, GRefPtr<GVariantBuilder>>, 16> m_objectStack;
+};
+
+} // namespace WebCore
+
+#endif // KeyedEncoderGlib_h

Modified: trunk/Source/WebKit2/ChangeLog (188125 => 188126)


--- trunk/Source/WebKit2/ChangeLog	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/ChangeLog	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,3 +1,20 @@
+2015-08-07  Brady Eidson  <[email protected]>
+
+        Move concrete KeyedDecoder/Encoder implementations to WebCore.
+        https://bugs.webkit.org/show_bug.cgi?id=147757.
+
+        Rubberstamped by Andy Estes.
+
+        * DatabaseProcess/IndexedDB/IDBSerialization.cpp:
+        (WebKit::serializeIDBKeyPath):
+        (WebKit::deserializeIDBKeyPath):
+        (WebKit::serializeIDBKeyData):
+        (WebKit::deserializeIDBKeyData):
+        
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2015-08-07  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix GTK+ compile warning also introduced in r188121.

Modified: trunk/Source/WebKit2/DatabaseProcess/IndexedDB/IDBSerialization.cpp (188125 => 188126)


--- trunk/Source/WebKit2/DatabaseProcess/IndexedDB/IDBSerialization.cpp	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/DatabaseProcess/IndexedDB/IDBSerialization.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -28,10 +28,9 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "ArgumentEncoder.h"
-#include "KeyedDecoder.h"
-#include "KeyedEncoder.h"
 #include <WebCore/IDBKeyData.h>
 #include <WebCore/IDBKeyPath.h>
+#include <WebCore/KeyedCoding.h>
 
 using namespace WebCore;
 
@@ -39,9 +38,9 @@
 
 RefPtr<SharedBuffer> serializeIDBKeyPath(const IDBKeyPath& keyPath)
 {
-    KeyedEncoder encoder;
-    keyPath.encode(encoder);
-    return encoder.finishEncoding();
+    auto encoder = KeyedEncoder::encoder();
+    keyPath.encode(*encoder);
+    return encoder->finishEncoding();
 }
 
 bool deserializeIDBKeyPath(const uint8_t* data, size_t size, IDBKeyPath& result)
@@ -49,15 +48,15 @@
     if (!data || !size)
         return false;
 
-    KeyedDecoder decoder(data, size);
-    return IDBKeyPath::decode(decoder, result);
+    auto decoder = KeyedDecoder::decoder(data, size);
+    return IDBKeyPath::decode(*decoder, result);
 }
 
 RefPtr<SharedBuffer> serializeIDBKeyData(const IDBKeyData& key)
 {
-    KeyedEncoder encoder;
-    key.encode(encoder);
-    return encoder.finishEncoding();
+    auto encoder = KeyedEncoder::encoder();
+    key.encode(*encoder);
+    return encoder->finishEncoding();
 }
 
 bool deserializeIDBKeyData(const uint8_t* data, size_t size, IDBKeyData& result)
@@ -65,8 +64,8 @@
     if (!data || !size)
         return false;
 
-    KeyedDecoder decoder(data, size);
-    return IDBKeyData::decode(decoder, result);
+    auto decoder = KeyedDecoder::decoder(data, size);
+    return IDBKeyData::decode(*decoder, result);
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/PlatformEfl.cmake (188125 => 188126)


--- trunk/Source/WebKit2/PlatformEfl.cmake	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/PlatformEfl.cmake	2015-08-07 16:04:49 UTC (rev 188126)
@@ -47,9 +47,6 @@
     Shared/efl/ProcessExecutablePathEfl.cpp
     Shared/efl/WebEventFactory.cpp
 
-    Shared/glib/KeyedDecoder.cpp
-    Shared/glib/KeyedEncoder.cpp
-
     Shared/linux/WebMemorySamplerLinux.cpp
 
     Shared/linux/SeccompFilters/OpenSyscall.cpp

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (188125 => 188126)


--- trunk/Source/WebKit2/PlatformGTK.cmake	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/PlatformGTK.cmake	2015-08-07 16:04:49 UTC (rev 188126)
@@ -62,8 +62,6 @@
 
     Shared/cairo/ShareableBitmapCairo.cpp
 
-    Shared/glib/KeyedDecoder.cpp
-    Shared/glib/KeyedEncoder.cpp
     Shared/gtk/ArgumentCodersGtk.cpp
     Shared/gtk/NativeContextMenuItemGtk.cpp
     Shared/gtk/NativeWebKeyboardEventGtk.cpp

Deleted: trunk/Source/WebKit2/Shared/cf/KeyedDecoder.cpp (188125 => 188126)


--- trunk/Source/WebKit2/Shared/cf/KeyedDecoder.cpp	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/cf/KeyedDecoder.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2014 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 "KeyedDecoder.h"
-
-#include <wtf/cf/TypeCastsCF.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-KeyedDecoder::KeyedDecoder(const uint8_t* data, size_t size)
-{
-    auto cfData = adoptCF(CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, data, size, kCFAllocatorNull));
-
-    if (auto rootDictionary = adoptCF(dynamic_cf_cast<CFDictionaryRef>(CFPropertyListCreateWithData(kCFAllocatorDefault, cfData.get(), kCFPropertyListImmutable, nullptr, nullptr))))
-        m_rootDictionary = WTF::move(rootDictionary);
-    else
-        m_rootDictionary = adoptCF(CFDictionaryCreate(kCFAllocatorDefault, nullptr, nullptr, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
-    m_dictionaryStack.append(m_rootDictionary.get());
-}
-
-KeyedDecoder::~KeyedDecoder()
-{
-    ASSERT(m_dictionaryStack.size() == 1);
-    ASSERT(m_dictionaryStack.last() == m_rootDictionary);
-    ASSERT(m_arrayStack.isEmpty());
-    ASSERT(m_arrayIndexStack.isEmpty());
-}
-
-bool KeyedDecoder::decodeBytes(const String& key, const uint8_t*& bytes, size_t& size)
-{
-    auto data = "" key.createCFString().get()));
-    if (!data)
-        return false;
-
-    bytes = CFDataGetBytePtr(data);
-    size = CFDataGetLength(data);
-    return true;
-}
-
-bool KeyedDecoder::decodeBool(const String& key, bool& result)
-{
-    auto boolean = dynamic_cf_cast<CFBooleanRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!boolean)
-        return false;
-
-    result = CFBooleanGetValue(boolean);
-    return true;
-}
-
-bool KeyedDecoder::decodeUInt32(const String& key, uint32_t& result)
-{
-    return decodeInt32(key, reinterpret_cast<int32_t&>(result));
-}
-
-bool KeyedDecoder::decodeInt32(const String& key, int32_t& result)
-{
-    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!number)
-        return false;
-
-    return CFNumberGetValue(number, kCFNumberSInt32Type, &result);
-}
-
-bool KeyedDecoder::decodeInt64(const String& key, int64_t& result)
-{
-    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!number)
-        return false;
-
-    return CFNumberGetValue(number, kCFNumberSInt64Type, &result);
-}
-
-bool KeyedDecoder::decodeFloat(const String& key, float& result)
-{
-    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!number)
-        return false;
-
-    return CFNumberGetValue(number, kCFNumberFloatType, &result);
-}
-
-bool KeyedDecoder::decodeDouble(const String& key, double& result)
-{
-    auto number = dynamic_cf_cast<CFNumberRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!number)
-        return false;
-
-    return CFNumberGetValue(number, kCFNumberDoubleType, &result);
-}
-
-bool KeyedDecoder::decodeString(const String& key, String& result)
-{
-    auto string = dynamic_cf_cast<CFStringRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!string)
-        return false;
-
-    result = string;
-    return true;
-}
-
-bool KeyedDecoder::beginObject(const String& key)
-{
-    auto dictionary = dynamic_cf_cast<CFDictionaryRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!dictionary)
-        return false;
-
-    m_dictionaryStack.append(dictionary);
-    return true;
-}
-
-void KeyedDecoder::endObject()
-{
-    m_dictionaryStack.removeLast();
-}
-
-bool KeyedDecoder::beginArray(const String& key)
-{
-    auto array = dynamic_cf_cast<CFArrayRef>(CFDictionaryGetValue(m_dictionaryStack.last(), key.createCFString().get()));
-    if (!array)
-        return false;
-
-    for (CFIndex i = 0; i < CFArrayGetCount(array); ++i) {
-        CFTypeRef object = CFArrayGetValueAtIndex(array, i);
-        if (CFGetTypeID(object) != CFDictionaryGetTypeID())
-            return false;
-    }
-
-    m_arrayStack.append(array);
-    m_arrayIndexStack.append(0);
-    return true;
-}
-
-bool KeyedDecoder::beginArrayElement()
-{
-    if (m_arrayIndexStack.last() >= CFArrayGetCount(m_arrayStack.last()))
-        return false;
-
-    auto dictionary = checked_cf_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(m_arrayStack.last(), m_arrayIndexStack.last()++));
-    m_dictionaryStack.append(dictionary);
-    return true;
-}
-
-void KeyedDecoder::endArrayElement()
-{
-    m_dictionaryStack.removeLast();
-}
-
-void KeyedDecoder::endArray()
-{
-    m_arrayStack.removeLast();
-    m_arrayIndexStack.removeLast();
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/Shared/cf/KeyedDecoder.h (188125 => 188126)


--- trunk/Source/WebKit2/Shared/cf/KeyedDecoder.h	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/cf/KeyedDecoder.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2014 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 KeyedDecoder_h
-#define KeyedDecoder_h
-
-#include <WebCore/KeyedCoding.h>
-#include <wtf/RetainPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebKit {
-
-class KeyedDecoder final : public WebCore::KeyedDecoder {
-public:
-    KeyedDecoder(const uint8_t* data, size_t);
-    virtual ~KeyedDecoder() override;
-
-private:
-    virtual bool decodeBytes(const String& key, const uint8_t*&, size_t&) override;
-    virtual bool decodeBool(const String& key, bool&) override;
-    virtual bool decodeUInt32(const String& key, uint32_t&) override;
-    virtual bool decodeInt32(const String& key, int32_t&) override;
-    virtual bool decodeInt64(const String& key, int64_t&) override;
-    virtual bool decodeFloat(const String& key, float&) override;
-    virtual bool decodeDouble(const String& key, double&) override;
-    virtual bool decodeString(const String& key, String&) override;
-
-    virtual bool beginObject(const String& key) override;
-    virtual void endObject() override;
-
-    virtual bool beginArray(const String& key) override;
-    virtual bool beginArrayElement() override;
-    virtual void endArrayElement() override;
-    virtual void endArray() override;
-
-    RetainPtr<CFDictionaryRef> m_rootDictionary;
-
-    Vector<CFDictionaryRef, 16> m_dictionaryStack;
-    Vector<CFArrayRef, 16> m_arrayStack;
-    Vector<CFIndex> m_arrayIndexStack;
-};
-
-} // namespace WebKit
-
-#endif // KeyedDecoder_h

Deleted: trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp (188125 => 188126)


--- trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/cf/KeyedEncoder.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) 2013 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 "KeyedEncoder.h"
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <WebCore/SharedBuffer.h>
-#include <wtf/text/WTFString.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static RetainPtr<CFMutableDictionaryRef> createDictionary()
-{
-    return adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
-}
-
-KeyedEncoder::KeyedEncoder()
-    : m_rootDictionary(createDictionary())
-{
-    m_dictionaryStack.append(m_rootDictionary.get());
-}
-    
-KeyedEncoder::~KeyedEncoder()
-{
-    ASSERT(m_dictionaryStack.size() == 1);
-    ASSERT(m_dictionaryStack.last() == m_rootDictionary);
-    ASSERT(m_arrayStack.isEmpty());
-}
-
-void KeyedEncoder::encodeBytes(const String& key, const uint8_t* bytes, size_t size)
-{
-    auto data = "" bytes, size, kCFAllocatorNull));
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), data.get());
-}
-
-void KeyedEncoder::encodeBool(const String& key, bool value)
-{
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), value ? kCFBooleanTrue : kCFBooleanFalse);
-}
-
-void KeyedEncoder::encodeUInt32(const String& key, uint32_t value)
-{
-    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value));
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
-}
-
-void KeyedEncoder::encodeInt32(const String& key, int32_t value)
-{
-    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &value));
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
-}
-
-void KeyedEncoder::encodeInt64(const String& key, int64_t value)
-{
-    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &value));
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
-}
-
-void KeyedEncoder::encodeFloat(const String& key, float value)
-{
-    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &value));
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
-}
-
-void KeyedEncoder::encodeDouble(const String& key, double value)
-{
-    auto number = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &value));
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), number.get());
-}
-
-void KeyedEncoder::encodeString(const String& key, const String& value)
-{
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), value.createCFString().get());
-}
-
-void KeyedEncoder::beginObject(const String& key)
-{
-    auto dictionary = createDictionary();
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), dictionary.get());
-
-    m_dictionaryStack.append(dictionary.get());
-}
-
-void KeyedEncoder::endObject()
-{
-    m_dictionaryStack.removeLast();
-}
-
-void KeyedEncoder::beginArray(const String& key)
-{
-    auto array = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
-    CFDictionarySetValue(m_dictionaryStack.last(), key.createCFString().get(), array.get());
-
-    m_arrayStack.append(array.get());
-}
-
-void KeyedEncoder::beginArrayElement()
-{
-    auto dictionary = createDictionary();
-    CFArrayAppendValue(m_arrayStack.last(), dictionary.get());
-
-    m_dictionaryStack.append(dictionary.get());
-}
-
-void KeyedEncoder::endArrayElement()
-{
-    m_dictionaryStack.removeLast();
-}
-
-void KeyedEncoder::endArray()
-{
-    m_arrayStack.removeLast();
-}
-
-PassRefPtr<SharedBuffer> KeyedEncoder::finishEncoding()
-{
-    RetainPtr<CFDataRef> data = "" m_rootDictionary.get(), kCFPropertyListBinaryFormat_v1_0, 0, nullptr));
-    if (!data)
-        return nullptr;
-
-    return SharedBuffer::wrapCFData(data.get());
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h (188125 => 188126)


--- trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/cf/KeyedEncoder.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2013 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 KeyedEncoder_h
-#define KeyedEncoder_h
-
-#include <WebCore/KeyedCoding.h>
-#include <wtf/RetainPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebKit {
-
-class KeyedEncoder final : public WebCore::KeyedEncoder {
-public:
-    KeyedEncoder();
-    ~KeyedEncoder();
-
-    virtual PassRefPtr<WebCore::SharedBuffer> finishEncoding() override;
-
-private:
-    virtual void encodeBytes(const String& key, const uint8_t*, size_t) override;
-    virtual void encodeBool(const String& key, bool) override;
-    virtual void encodeUInt32(const String& key, uint32_t) override;
-    virtual void encodeInt32(const String& key, int32_t) override;
-    virtual void encodeInt64(const String& key, int64_t) override;
-    virtual void encodeFloat(const String& key, float) override;
-    virtual void encodeDouble(const String& key, double) override;
-    virtual void encodeString(const String& key, const String&) override;
-
-    virtual void beginObject(const String& key) override;
-    virtual void endObject() override;
-
-    virtual void beginArray(const String& key) override;
-    virtual void beginArrayElement() override;
-    virtual void endArrayElement() override;
-    virtual void endArray() override;
-
-    RetainPtr<CFMutableDictionaryRef> m_rootDictionary;
-
-    Vector<CFMutableDictionaryRef, 16> m_dictionaryStack;
-    Vector<CFMutableArrayRef, 16> m_arrayStack;
-};
-
-} // namespace WebKit
-
-#endif // KeyedEncoder_h

Deleted: trunk/Source/WebKit2/Shared/glib/KeyedDecoder.cpp (188125 => 188126)


--- trunk/Source/WebKit2/Shared/glib/KeyedDecoder.cpp	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/glib/KeyedDecoder.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2015 Igalia S.L.
- *
- * 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 "KeyedDecoder.h"
-
-#include <wtf/text/CString.h>
-
-namespace WebKit {
-
-KeyedDecoder::KeyedDecoder(const uint8_t* data, size_t size)
-{
-    GRefPtr<GBytes> bytes = adoptGRef(g_bytes_new(data, size));
-    GRefPtr<GVariant> variant = g_variant_new_from_bytes(G_VARIANT_TYPE("a{sv}"), bytes.get(), TRUE);
-    m_dictionaryStack.append(dictionaryFromGVariant(variant.get()));
-}
-
-KeyedDecoder::~KeyedDecoder()
-{
-    ASSERT(m_dictionaryStack.size() == 1);
-    ASSERT(m_arrayStack.isEmpty());
-    ASSERT(m_arrayIndexStack.isEmpty());
-}
-
-HashMap<String, GRefPtr<GVariant>> KeyedDecoder::dictionaryFromGVariant(GVariant* variant)
-{
-    HashMap<String, GRefPtr<GVariant>> dictionary;
-    GVariantIter iter;
-    g_variant_iter_init(&iter, variant);
-    const char* key;
-    GVariant* value;
-    while (g_variant_iter_loop(&iter, "{&sv}", &key, &value))
-        dictionary.set(String::fromUTF8(key), value);
-    return WTF::move(dictionary);
-}
-
-bool KeyedDecoder::decodeBytes(const String& key, const uint8_t*& bytes, size_t& size)
-{
-    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
-    if (!value)
-        return false;
-
-    size = g_variant_get_size(value.get());
-    bytes = static_cast<const uint8_t*>(g_variant_get_data(value.get()));
-    return true;
-}
-
-template<typename T, typename F>
-bool KeyedDecoder::decodeSimpleValue(const String& key, T& result, F getFunction)
-{
-    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
-    if (!value)
-        return false;
-
-    result = getFunction(value.get());
-    return true;
-}
-
-bool KeyedDecoder::decodeBool(const String& key, bool& result)
-{
-    return decodeSimpleValue(key, result, g_variant_get_boolean);
-}
-
-bool KeyedDecoder::decodeUInt32(const String& key, uint32_t& result)
-{
-    return decodeSimpleValue(key, result, g_variant_get_uint32);
-}
-
-bool KeyedDecoder::decodeInt32(const String& key, int32_t& result)
-{
-    return decodeSimpleValue(key, result, g_variant_get_int32);
-}
-
-bool KeyedDecoder::decodeInt64(const String& key, int64_t& result)
-{
-    return decodeSimpleValue(key, result, g_variant_get_int64);
-}
-
-bool KeyedDecoder::decodeFloat(const String& key, float& result)
-{
-    return decodeSimpleValue(key, result, g_variant_get_double);
-}
-
-bool KeyedDecoder::decodeDouble(const String& key, double& result)
-{
-    return decodeSimpleValue(key, result, g_variant_get_double);
-}
-
-bool KeyedDecoder::decodeString(const String& key, String& result)
-{
-    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
-    if (!value)
-        return false;
-
-    result = String::fromUTF8(g_variant_get_string(value.get(), nullptr));
-    return true;
-}
-
-bool KeyedDecoder::beginObject(const String& key)
-{
-    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
-    if (!value)
-        return false;
-
-    m_dictionaryStack.append(dictionaryFromGVariant(value.get()));
-    return true;
-}
-
-void KeyedDecoder::endObject()
-{
-    m_dictionaryStack.removeLast();
-}
-
-bool KeyedDecoder::beginArray(const String& key)
-{
-    GRefPtr<GVariant> value = m_dictionaryStack.last().get(key);
-    if (!value)
-        return false;
-
-    m_arrayStack.append(value.get());
-    m_arrayIndexStack.append(0);
-    return true;
-}
-
-bool KeyedDecoder::beginArrayElement()
-{
-    if (m_arrayIndexStack.last() >= g_variant_n_children(m_arrayStack.last()))
-        return false;
-
-    GRefPtr<GVariant> variant = adoptGRef(g_variant_get_child_value(m_arrayStack.last(), m_arrayIndexStack.last()++));
-    m_dictionaryStack.append(dictionaryFromGVariant(variant.get()));
-    return true;
-}
-
-void KeyedDecoder::endArrayElement()
-{
-    m_dictionaryStack.removeLast();
-}
-
-void KeyedDecoder::endArray()
-{
-    m_arrayStack.removeLast();
-    m_arrayIndexStack.removeLast();
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/Shared/glib/KeyedDecoder.h (188125 => 188126)


--- trunk/Source/WebKit2/Shared/glib/KeyedDecoder.h	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/glib/KeyedDecoder.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2015 Igaia S.L.
- *
- * 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 KeyedDecoder_h
-#define KeyedDecoder_h
-
-#include <WebCore/KeyedCoding.h>
-#include <glib.h>
-#include <wtf/HashMap.h>
-#include <wtf/glib/GRefPtr.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-class KeyedDecoder final : public WebCore::KeyedDecoder {
-public:
-    KeyedDecoder(const uint8_t* data, size_t);
-    virtual ~KeyedDecoder() override;
-
-private:
-    virtual bool decodeBytes(const String& key, const uint8_t*&, size_t&) override;
-    virtual bool decodeBool(const String& key, bool&) override;
-    virtual bool decodeUInt32(const String& key, uint32_t&) override;
-    virtual bool decodeInt32(const String& key, int32_t&) override;
-    virtual bool decodeInt64(const String& key, int64_t&) override;
-    virtual bool decodeFloat(const String& key, float&) override;
-    virtual bool decodeDouble(const String& key, double&) override;
-    virtual bool decodeString(const String& key, String&) override;
-
-    virtual bool beginObject(const String& key) override;
-    virtual void endObject() override;
-
-    virtual bool beginArray(const String& key) override;
-    virtual bool beginArrayElement() override;
-    virtual void endArrayElement() override;
-    virtual void endArray() override;
-
-    template<typename T, typename F> bool decodeSimpleValue(const String& key, T& result, F getFunction);
-    HashMap<String, GRefPtr<GVariant>> dictionaryFromGVariant(GVariant*);
-
-    Vector<HashMap<String, GRefPtr<GVariant>>> m_dictionaryStack;
-    Vector<GVariant*, 16> m_arrayStack;
-    Vector<unsigned> m_arrayIndexStack;
-};
-
-} // namespace WebKit
-
-#endif // KeyedDecoder_h

Deleted: trunk/Source/WebKit2/Shared/glib/KeyedEncoder.cpp (188125 => 188126)


--- trunk/Source/WebKit2/Shared/glib/KeyedEncoder.cpp	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/glib/KeyedEncoder.cpp	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,135 +0,0 @@
-/*
- * Copyright (C) 2015 Igalia S.L.
- *
- * 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 "KeyedEncoder.h"
-
-#include <WebCore/SharedBuffer.h>
-#include <wtf/text/CString.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-KeyedEncoder::KeyedEncoder()
-{
-    g_variant_builder_init(&m_variantBuilder, G_VARIANT_TYPE("a{sv}"));
-    m_variantBuilderStack.append(&m_variantBuilder);
-}
-
-KeyedEncoder::~KeyedEncoder()
-{
-    ASSERT(m_variantBuilderStack.size() == 1);
-    ASSERT(m_variantBuilderStack.last() == &m_variantBuilder);
-    ASSERT(m_arrayStack.isEmpty());
-    ASSERT(m_objectStack.isEmpty());
-}
-
-void KeyedEncoder::encodeBytes(const String& key, const uint8_t* bytes, size_t size)
-{
-    GRefPtr<GBytes> gBytes = adoptGRef(g_bytes_new_static(bytes, size));
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_from_bytes(G_VARIANT_TYPE("ay"), gBytes.get(), TRUE));
-}
-
-void KeyedEncoder::encodeBool(const String& key, bool value)
-{
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_boolean(value));
-}
-
-void KeyedEncoder::encodeUInt32(const String& key, uint32_t value)
-{
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_uint32(value));
-}
-
-void KeyedEncoder::encodeInt32(const String& key, int32_t value)
-{
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_int32(value));
-}
-
-void KeyedEncoder::encodeInt64(const String& key, int64_t value)
-{
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_int64(value));
-}
-
-void KeyedEncoder::encodeFloat(const String& key, float value)
-{
-    encodeDouble(key, value);
-}
-
-void KeyedEncoder::encodeDouble(const String& key, double value)
-{
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_double(value));
-}
-
-void KeyedEncoder::encodeString(const String& key, const String& value)
-{
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", key.utf8().data(), g_variant_new_string(value.utf8().data()));
-}
-
-void KeyedEncoder::beginObject(const String& key)
-{
-    GRefPtr<GVariantBuilder> builder = adoptGRef(g_variant_builder_new(G_VARIANT_TYPE("aa{sv}")));
-    m_objectStack.append(std::make_pair(key, builder));
-    m_variantBuilderStack.append(builder.get());
-}
-
-void KeyedEncoder::endObject()
-{
-    GVariantBuilder* builder = m_variantBuilderStack.takeLast();
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", m_objectStack.last().first.utf8().data(), g_variant_builder_end(builder));
-    m_objectStack.removeLast();
-}
-
-void KeyedEncoder::beginArray(const String& key)
-{
-    m_arrayStack.append(std::make_pair(key, adoptGRef(g_variant_builder_new(G_VARIANT_TYPE("aa{sv}")))));
-}
-
-void KeyedEncoder::beginArrayElement()
-{
-    m_variantBuilderStack.append(g_variant_builder_new(G_VARIANT_TYPE("a{sv}")));
-}
-
-void KeyedEncoder::endArrayElement()
-{
-    GRefPtr<GVariantBuilder> variantBuilder = adoptGRef(m_variantBuilderStack.takeLast());
-    g_variant_builder_add_value(m_arrayStack.last().second.get(), g_variant_builder_end(variantBuilder.get()));
-}
-
-void KeyedEncoder::endArray()
-{
-    g_variant_builder_add(m_variantBuilderStack.last(), "{sv}", m_arrayStack.last().first.utf8().data(), g_variant_builder_end(m_arrayStack.last().second.get()));
-    m_arrayStack.removeLast();
-}
-
-PassRefPtr<SharedBuffer> KeyedEncoder::finishEncoding()
-{
-    g_assert(m_variantBuilderStack.last() == &m_variantBuilder);
-    GRefPtr<GVariant> variant = g_variant_builder_end(&m_variantBuilder);
-    GRefPtr<GBytes> data = ""
-    return SharedBuffer::create(static_cast<const unsigned char*>(g_bytes_get_data(data.get(), nullptr)), static_cast<unsigned>(g_bytes_get_size(data.get())));
-}
-
-} // namespace WebKit

Deleted: trunk/Source/WebKit2/Shared/glib/KeyedEncoder.h (188125 => 188126)


--- trunk/Source/WebKit2/Shared/glib/KeyedEncoder.h	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/Shared/glib/KeyedEncoder.h	2015-08-07 16:04:49 UTC (rev 188126)
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2015 Igalia S.L.
- *
- * 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 KeyedEncoder_h
-#define KeyedEncoder_h
-
-#include <WebCore/KeyedCoding.h>
-#include <glib.h>
-#include <wtf/Vector.h>
-#include <wtf/glib/GRefPtr.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-class KeyedEncoder final : public WebCore::KeyedEncoder {
-public:
-    KeyedEncoder();
-    ~KeyedEncoder();
-
-    virtual PassRefPtr<WebCore::SharedBuffer> finishEncoding() override;
-
-private:
-    virtual void encodeBytes(const String& key, const uint8_t*, size_t) override;
-    virtual void encodeBool(const String& key, bool) override;
-    virtual void encodeUInt32(const String& key, uint32_t) override;
-    virtual void encodeInt32(const String& key, int32_t) override;
-    virtual void encodeInt64(const String& key, int64_t) override;
-    virtual void encodeFloat(const String& key, float) override;
-    virtual void encodeDouble(const String& key, double) override;
-    virtual void encodeString(const String& key, const String&) override;
-
-    virtual void beginObject(const String& key) override;
-    virtual void endObject() override;
-
-    virtual void beginArray(const String& key) override;
-    virtual void beginArrayElement() override;
-    virtual void endArrayElement() override;
-    virtual void endArray() override;
-
-    GVariantBuilder m_variantBuilder;
-    Vector<GVariantBuilder*, 16> m_variantBuilderStack;
-    Vector<std::pair<String, GRefPtr<GVariantBuilder>>, 16> m_arrayStack;
-    Vector<std::pair<String, GRefPtr<GVariantBuilder>>, 16> m_objectStack;
-};
-
-} // namespace WebKit
-
-#endif // KeyedEncoder_h

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (188125 => 188126)


--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2015-08-07 15:28:01 UTC (rev 188125)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj	2015-08-07 16:04:49 UTC (rev 188126)
@@ -462,8 +462,6 @@
 		1AE00D4C182D6EB000087DD7 /* WKBrowsingContextHandle.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */; };
 		1AE00D4D182D6EB000087DD7 /* WKBrowsingContextHandle.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1AE00D4F182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */; };
-		1AE00D5C182DADE100087DD7 /* KeyedEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D5A182DADE100087DD7 /* KeyedEncoder.cpp */; };
-		1AE00D5D182DADE100087DD7 /* KeyedEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D5B182DADE100087DD7 /* KeyedEncoder.h */; };
 		1AE00D601831792100087DD7 /* FrameLoadState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D5E1831792100087DD7 /* FrameLoadState.cpp */; };
 		1AE00D611831792100087DD7 /* FrameLoadState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE00D5F1831792100087DD7 /* FrameLoadState.h */; };
 		1AE00D6B18327C1200087DD7 /* StringReference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D6918327C1200087DD7 /* StringReference.cpp */; };
@@ -947,8 +945,6 @@
 		51834593134532E90092B696 /* WebIconDatabaseClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 51834591134532E80092B696 /* WebIconDatabaseClient.h */; };
 		518353DA1885BF8C00D9FE44 /* IDBSerialization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518353D81885BF8C00D9FE44 /* IDBSerialization.cpp */; };
 		518353DB1885BF8C00D9FE44 /* IDBSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 518353D91885BF8C00D9FE44 /* IDBSerialization.h */; };
-		518353DE1887128B00D9FE44 /* KeyedDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 518353DC1887128B00D9FE44 /* KeyedDecoder.cpp */; };
-		518353DF1887128B00D9FE44 /* KeyedDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 518353DD1887128B00D9FE44 /* KeyedDecoder.h */; };
 		5183DDEC1630BDFC008BE5C7 /* NetworkProcessConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5105B0D4162F7A7A00E27709 /* NetworkProcessConnection.cpp */; };
 		51871B5B127CB89D00F76232 /* WebContextMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51871B59127CB89D00F76232 /* WebContextMenu.cpp */; };
 		51871B5C127CB89D00F76232 /* WebContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 51871B5A127CB89D00F76232 /* WebContextMenu.h */; };
@@ -2588,8 +2584,6 @@
 		1AE00D4A182D6EB000087DD7 /* WKBrowsingContextHandle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKBrowsingContextHandle.mm; sourceTree = "<group>"; };
 		1AE00D4B182D6EB000087DD7 /* WKBrowsingContextHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandle.h; sourceTree = "<group>"; };
 		1AE00D4E182D6F5000087DD7 /* WKBrowsingContextHandleInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextHandleInternal.h; sourceTree = "<group>"; };
-		1AE00D5A182DADE100087DD7 /* KeyedEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedEncoder.cpp; sourceTree = "<group>"; };
-		1AE00D5B182DADE100087DD7 /* KeyedEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedEncoder.h; sourceTree = "<group>"; };
 		1AE00D5E1831792100087DD7 /* FrameLoadState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameLoadState.cpp; sourceTree = "<group>"; };
 		1AE00D5F1831792100087DD7 /* FrameLoadState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameLoadState.h; sourceTree = "<group>"; };
 		1AE00D6918327C1200087DD7 /* StringReference.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringReference.cpp; sourceTree = "<group>"; };
@@ -3111,8 +3105,6 @@
 		51834591134532E80092B696 /* WebIconDatabaseClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconDatabaseClient.h; sourceTree = "<group>"; };
 		518353D81885BF8C00D9FE44 /* IDBSerialization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBSerialization.cpp; sourceTree = "<group>"; };
 		518353D91885BF8C00D9FE44 /* IDBSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBSerialization.h; sourceTree = "<group>"; };
-		518353DC1887128B00D9FE44 /* KeyedDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KeyedDecoder.cpp; sourceTree = "<group>"; };
-		518353DD1887128B00D9FE44 /* KeyedDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyedDecoder.h; sourceTree = "<group>"; };
 		5183B3931379F85C00E8754E /* Shim.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shim.xcconfig; sourceTree = "<group>"; };
 		5184BC4A132E907A006B9E28 /* WebIconDatabase.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebIconDatabase.messages.in; sourceTree = "<group>"; };
 		51871B59127CB89D00F76232 /* WebContextMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextMenu.cpp; sourceTree = "<group>"; };
@@ -4871,10 +4863,6 @@
 			children = (
 				1AAF0C4912B16334008E49E2 /* ArgumentCodersCF.cpp */,
 				1AAF0C4812B16334008E49E2 /* ArgumentCodersCF.h */,
-				518353DC1887128B00D9FE44 /* KeyedDecoder.cpp */,
-				518353DD1887128B00D9FE44 /* KeyedDecoder.h */,
-				1AE00D5A182DADE100087DD7 /* KeyedEncoder.cpp */,
-				1AE00D5B182DADE100087DD7 /* KeyedEncoder.h */,
 			);
 			path = cf;
 			sourceTree = "<group>";
@@ -7699,8 +7687,6 @@
 				C58CDF2A1887548B00871536 /* InteractionInformationAtPosition.h in Headers */,
 				1AE49A4911FFA8CE0048B464 /* JSNPMethod.h in Headers */,
 				1AE4987811FF7FAA0048B464 /* JSNPObject.h in Headers */,
-				518353DF1887128B00D9FE44 /* KeyedDecoder.h in Headers */,
-				1AE00D5D182DADE100087DD7 /* KeyedEncoder.h in Headers */,
 				BCE0937814FB128C001138D9 /* LayerHostingContext.h in Headers */,
 				0F0C365A18C0555800F607D7 /* LayerRepresentation.h in Headers */,
 				1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */,
@@ -9497,8 +9483,6 @@
 				C58CDF2D1887609F00871536 /* InteractionInformationAtPosition.cpp in Sources */,
 				1AE49A4A11FFA8CE0048B464 /* JSNPMethod.cpp in Sources */,
 				1AE4987911FF7FAA0048B464 /* JSNPObject.cpp in Sources */,
-				518353DE1887128B00D9FE44 /* KeyedDecoder.cpp in Sources */,
-				1AE00D5C182DADE100087DD7 /* KeyedEncoder.cpp in Sources */,
 				BCE0937714FB128C001138D9 /* LayerHostingContext.mm in Sources */,
 				0F0C365E18C110A500F607D7 /* LayerRepresentation.mm in Sources */,
 				1A92DC1312F8BAB90017AF65 /* LayerTreeContext.cpp in Sources */,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to