Switch more class to use the new << form of encode
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2012 18:09:21 +0000 (18:09 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2012 18:09:21 +0000 (18:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=100725

Reviewed by Anders Carlsson.

- Switches many uses of encoder.encode(foo) to encoder << foo.
- Switches a few places to take an ArgumentEncoder& rather than an ArgumentEncoder*.
- Switches a few places away from using encoder.encodeVariableLengthByteArray(foo) to
  using encoder << CoreIPC::DataReference(foo).

* Platform/CoreIPC/HandleMessage.h:
(CoreIPC::handleMessage):
(CoreIPC::handleMessageVariadic):
* Platform/CoreIPC/StringReference.cpp:
(CoreIPC::StringReference::encode):
(CoreIPC::StringReference::decode):
* Platform/CoreIPC/mac/MachPort.h:
(CoreIPC::MachPort::encode):
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::Handle::encode):
* PluginProcess/PluginCreationParameters.cpp:
(WebKit::PluginCreationParameters::encode):
* Shared/DictionaryPopupInfo.cpp:
(WebKit::DictionaryPopupInfo::encode):
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
* Shared/FontInfo.cpp:
(WebKit::FontInfo::encode):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
* Shared/OriginAndDatabases.cpp:
(WebKit::OriginAndDatabases::encode):
* Shared/PlatformPopupMenuData.cpp:
(WebKit::PlatformPopupMenuData::encode):
* Shared/Plugins/NPIdentifierData.cpp:
(WebKit::NPIdentifierData::encode):
* Shared/Plugins/NPVariantData.cpp:
(WebKit::NPVariantData::encode):
* Shared/Plugins/PluginProcessCreationParameters.cpp:
(WebKit::PluginProcessCreationParameters::encode):
* Shared/PrintInfo.cpp:
(WebKit::PrintInfo::encode):
* Shared/SecurityOriginData.cpp:
(WebKit::SecurityOriginData::encode):
* Shared/SessionState.cpp:
(WebKit::SessionState::encode):
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::Handle::encode):
* Shared/SharedWorkerProcessCreationParameters.cpp:
(WebKit::SharedWorkerProcessCreationParameters::encode):
* Shared/StatisticsData.cpp:
(WebKit::StatisticsData::encode):
* Shared/StringPairVector.h:
(WebKit::StringPairVector::encode):
* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::encode):
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::encode):
* Shared/WebEvent.cpp:
(WebKit::WebEvent::encode):
* Shared/WebGestureEvent.cpp:
(WebKit::WebGestureEvent::encode):
* Shared/WebHitTestResult.cpp:
(WebKit::WebHitTestResult::Data::encode):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::encode):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::encode):
* Shared/WebNavigationDataStore.h:
(WebKit::WebNavigationDataStore::encode):
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
* Shared/WebPlatformTouchPoint.cpp:
(WebKit::WebPlatformTouchPoint::encode):
* Shared/WebPopupItem.cpp:
(WebKit::WebPopupItem::encode):
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::encode):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
* Shared/WebTouchEvent.cpp:
(WebKit::WebTouchEvent::encode):
* Shared/WebWheelEvent.cpp:
(WebKit::WebWheelEvent::encode):
* Shared/cf/ArgumentCodersCF.cpp:
(CoreIPC::encode):
(CoreIPC::decode):
* Shared/cf/ArgumentCodersCF.h:
(CoreIPC):
* Shared/mac/ArgumentCodersMac.h:
(CoreIPC):
* Shared/mac/ArgumentCodersMac.mm:
(CoreIPC::encode):
* Shared/mac/AttributedString.mm:
(WebKit::AttributedString::encode):
* Shared/mac/ColorSpaceData.mm:
(WebKit::ColorSpaceData::encode):
* Shared/mac/KeychainAttribute.cpp:
(CoreIPC::encode):
* Shared/mac/KeychainAttribute.h:
(CoreIPC):
* Shared/mac/LayerTreeContextMac.mm:
(WebKit::LayerTreeContext::encode):
* Shared/mac/PlatformCertificateInfo.mm:
(WebKit::PlatformCertificateInfo::encode):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::Handle::encode):
(WebKit::SandboxExtension::Handle::decode):
(WebKit::SandboxExtension::HandleArray::encode):
(WebKit::SandboxExtension::HandleArray::decode):
* Shared/mac/SecItemRequestData.cpp:
(WebKit::SecItemRequestData::encode):
* Shared/mac/SecItemResponseData.cpp:
(WebKit::SecItemResponseData::encode):
* Shared/mac/SecKeychainItemRequestData.cpp:
(WebKit::SecKeychainItemRequestData::encode):
(WebKit::SecKeychainItemRequestData::decode):
* Shared/mac/SecKeychainItemResponseData.cpp:
(WebKit::SecKeychainItemResponseData::encode):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::encodeMessageBody):
* UIProcess/WebContextUserMessageCoders.h:
(WebKit::WebContextUserMessageEncoder::encode):
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
(WebKit::InjectedBundleUserMessageEncoder::encode):
* WebProcess/Plugins/Plugin.cpp:
(WebKit::Plugin::Parameters::encode):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::encodeMessageBody):

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

62 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/CoreIPC/HandleMessage.h
Source/WebKit2/Platform/CoreIPC/StringReference.cpp
Source/WebKit2/Platform/CoreIPC/mac/MachPort.h
Source/WebKit2/Platform/mac/SharedMemoryMac.cpp
Source/WebKit2/PluginProcess/PluginCreationParameters.cpp
Source/WebKit2/Shared/DictionaryPopupInfo.cpp
Source/WebKit2/Shared/EditorState.cpp
Source/WebKit2/Shared/FontInfo.cpp
Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp
Source/WebKit2/Shared/OriginAndDatabases.cpp
Source/WebKit2/Shared/PlatformPopupMenuData.cpp
Source/WebKit2/Shared/Plugins/NPIdentifierData.cpp
Source/WebKit2/Shared/Plugins/NPVariantData.cpp
Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
Source/WebKit2/Shared/PrintInfo.cpp
Source/WebKit2/Shared/SecurityOriginData.cpp
Source/WebKit2/Shared/SessionState.cpp
Source/WebKit2/Shared/ShareableBitmap.cpp
Source/WebKit2/Shared/SharedWorkerProcessCreationParameters.cpp
Source/WebKit2/Shared/StatisticsData.cpp
Source/WebKit2/Shared/StringPairVector.h
Source/WebKit2/Shared/UpdateInfo.cpp
Source/WebKit2/Shared/UserMessageCoders.h
Source/WebKit2/Shared/WebBackForwardListItem.cpp
Source/WebKit2/Shared/WebContextMenuItemData.cpp
Source/WebKit2/Shared/WebEvent.cpp
Source/WebKit2/Shared/WebGestureEvent.cpp
Source/WebKit2/Shared/WebHitTestResult.cpp
Source/WebKit2/Shared/WebKeyboardEvent.cpp
Source/WebKit2/Shared/WebMouseEvent.cpp
Source/WebKit2/Shared/WebNavigationDataStore.h
Source/WebKit2/Shared/WebPageCreationParameters.cpp
Source/WebKit2/Shared/WebPageGroupData.cpp
Source/WebKit2/Shared/WebPlatformTouchPoint.cpp
Source/WebKit2/Shared/WebPopupItem.cpp
Source/WebKit2/Shared/WebPreferencesStore.cpp
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Source/WebKit2/Shared/WebTouchEvent.cpp
Source/WebKit2/Shared/WebWheelEvent.cpp
Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp
Source/WebKit2/Shared/cf/ArgumentCodersCF.h
Source/WebKit2/Shared/mac/ArgumentCodersMac.h
Source/WebKit2/Shared/mac/ArgumentCodersMac.mm
Source/WebKit2/Shared/mac/AttributedString.mm
Source/WebKit2/Shared/mac/ColorSpaceData.mm
Source/WebKit2/Shared/mac/KeychainAttribute.cpp
Source/WebKit2/Shared/mac/KeychainAttribute.h
Source/WebKit2/Shared/mac/LayerTreeContextMac.mm
Source/WebKit2/Shared/mac/PlatformCertificateInfo.mm
Source/WebKit2/Shared/mac/SandboxExtensionMac.mm
Source/WebKit2/Shared/mac/SecItemRequestData.cpp
Source/WebKit2/Shared/mac/SecItemResponseData.cpp
Source/WebKit2/Shared/mac/SecKeychainItemRequestData.cpp
Source/WebKit2/Shared/mac/SecKeychainItemResponseData.cpp
Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
Source/WebKit2/Shared/win/WebCoreArgumentCodersWin.cpp
Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
Source/WebKit2/UIProcess/WebContextUserMessageCoders.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h
Source/WebKit2/WebProcess/Plugins/Plugin.cpp
Source/WebKit2/WebProcess/WebConnectionToUIProcess.cpp

index 1295d2a..552142f 100644 (file)
@@ -1,3 +1,143 @@
+2012-10-29  Sam Weinig  <sam@webkit.org>
+
+        Switch more class to use the new << form of encode
+        https://bugs.webkit.org/show_bug.cgi?id=100725
+
+        Reviewed by Anders Carlsson.
+
+        - Switches many uses of encoder.encode(foo) to encoder << foo.
+        - Switches a few places to take an ArgumentEncoder& rather than an ArgumentEncoder*.
+        - Switches a few places away from using encoder.encodeVariableLengthByteArray(foo) to
+          using encoder << CoreIPC::DataReference(foo).
+
+        * Platform/CoreIPC/HandleMessage.h:
+        (CoreIPC::handleMessage):
+        (CoreIPC::handleMessageVariadic):
+        * Platform/CoreIPC/StringReference.cpp:
+        (CoreIPC::StringReference::encode):
+        (CoreIPC::StringReference::decode):
+        * Platform/CoreIPC/mac/MachPort.h:
+        (CoreIPC::MachPort::encode):
+        * Platform/mac/SharedMemoryMac.cpp:
+        (WebKit::SharedMemory::Handle::encode):
+        * PluginProcess/PluginCreationParameters.cpp:
+        (WebKit::PluginCreationParameters::encode):
+        * Shared/DictionaryPopupInfo.cpp:
+        (WebKit::DictionaryPopupInfo::encode):
+        * Shared/EditorState.cpp:
+        (WebKit::EditorState::encode):
+        * Shared/FontInfo.cpp:
+        (WebKit::FontInfo::encode):
+        * Shared/Network/NetworkProcessCreationParameters.cpp:
+        (WebKit::NetworkProcessCreationParameters::encode):
+        * Shared/OriginAndDatabases.cpp:
+        (WebKit::OriginAndDatabases::encode):
+        * Shared/PlatformPopupMenuData.cpp:
+        (WebKit::PlatformPopupMenuData::encode):
+        * Shared/Plugins/NPIdentifierData.cpp:
+        (WebKit::NPIdentifierData::encode):
+        * Shared/Plugins/NPVariantData.cpp:
+        (WebKit::NPVariantData::encode):
+        * Shared/Plugins/PluginProcessCreationParameters.cpp:
+        (WebKit::PluginProcessCreationParameters::encode):
+        * Shared/PrintInfo.cpp:
+        (WebKit::PrintInfo::encode):
+        * Shared/SecurityOriginData.cpp:
+        (WebKit::SecurityOriginData::encode):
+        * Shared/SessionState.cpp:
+        (WebKit::SessionState::encode):
+        * Shared/ShareableBitmap.cpp:
+        (WebKit::ShareableBitmap::Handle::encode):
+        * Shared/SharedWorkerProcessCreationParameters.cpp:
+        (WebKit::SharedWorkerProcessCreationParameters::encode):
+        * Shared/StatisticsData.cpp:
+        (WebKit::StatisticsData::encode):
+        * Shared/StringPairVector.h:
+        (WebKit::StringPairVector::encode):
+        * Shared/UpdateInfo.cpp:
+        (WebKit::UpdateInfo::encode):
+        * Shared/UserMessageCoders.h:
+        (WebKit::UserMessageEncoder::baseEncode):
+        * Shared/WebBackForwardListItem.cpp:
+        (WebKit::WebBackForwardListItem::encode):
+        * Shared/WebContextMenuItemData.cpp:
+        (WebKit::WebContextMenuItemData::encode):
+        * Shared/WebEvent.cpp:
+        (WebKit::WebEvent::encode):
+        * Shared/WebGestureEvent.cpp:
+        (WebKit::WebGestureEvent::encode):
+        * Shared/WebHitTestResult.cpp:
+        (WebKit::WebHitTestResult::Data::encode):
+        * Shared/WebKeyboardEvent.cpp:
+        (WebKit::WebKeyboardEvent::encode):
+        * Shared/WebMouseEvent.cpp:
+        (WebKit::WebMouseEvent::encode):
+        * Shared/WebNavigationDataStore.h:
+        (WebKit::WebNavigationDataStore::encode):
+        * Shared/WebPageCreationParameters.cpp:
+        (WebKit::WebPageCreationParameters::encode):
+        * Shared/WebPageGroupData.cpp:
+        (WebKit::WebPageGroupData::encode):
+        * Shared/WebPlatformTouchPoint.cpp:
+        (WebKit::WebPlatformTouchPoint::encode):
+        * Shared/WebPopupItem.cpp:
+        (WebKit::WebPopupItem::encode):
+        * Shared/WebPreferencesStore.cpp:
+        (WebKit::WebPreferencesStore::encode):
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode):
+        * Shared/WebTouchEvent.cpp:
+        (WebKit::WebTouchEvent::encode):
+        * Shared/WebWheelEvent.cpp:
+        (WebKit::WebWheelEvent::encode):
+        * Shared/cf/ArgumentCodersCF.cpp:
+        (CoreIPC::encode):
+        (CoreIPC::decode):
+        * Shared/cf/ArgumentCodersCF.h:
+        (CoreIPC):
+        * Shared/mac/ArgumentCodersMac.h:
+        (CoreIPC):
+        * Shared/mac/ArgumentCodersMac.mm:
+        (CoreIPC::encode):
+        * Shared/mac/AttributedString.mm:
+        (WebKit::AttributedString::encode):
+        * Shared/mac/ColorSpaceData.mm:
+        (WebKit::ColorSpaceData::encode):
+        * Shared/mac/KeychainAttribute.cpp:
+        (CoreIPC::encode):
+        * Shared/mac/KeychainAttribute.h:
+        (CoreIPC):
+        * Shared/mac/LayerTreeContextMac.mm:
+        (WebKit::LayerTreeContext::encode):
+        * Shared/mac/PlatformCertificateInfo.mm:
+        (WebKit::PlatformCertificateInfo::encode):
+        * Shared/mac/SandboxExtensionMac.mm:
+        (WebKit::SandboxExtension::Handle::encode):
+        (WebKit::SandboxExtension::Handle::decode):
+        (WebKit::SandboxExtension::HandleArray::encode):
+        (WebKit::SandboxExtension::HandleArray::decode):
+        * Shared/mac/SecItemRequestData.cpp:
+        (WebKit::SecItemRequestData::encode):
+        * Shared/mac/SecItemResponseData.cpp:
+        (WebKit::SecItemResponseData::encode):
+        * Shared/mac/SecKeychainItemRequestData.cpp:
+        (WebKit::SecKeychainItemRequestData::encode):
+        (WebKit::SecKeychainItemRequestData::decode):
+        * Shared/mac/SecKeychainItemResponseData.cpp:
+        (WebKit::SecKeychainItemResponseData::encode):
+        * Shared/mac/WebCoreArgumentCodersMac.mm:
+        (CoreIPC::::encodePlatformData):
+        * UIProcess/WebConnectionToWebProcess.cpp:
+        (WebKit::WebConnectionToWebProcess::encodeMessageBody):
+        * UIProcess/WebContextUserMessageCoders.h:
+        (WebKit::WebContextUserMessageEncoder::encode):
+        * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
+        (WebKit::InjectedBundleUserMessageEncoder::encode):
+        * WebProcess/Plugins/Plugin.cpp:
+        (WebKit::Plugin::Parameters::encode):
+        * WebProcess/WebConnectionToUIProcess.cpp:
+        (WebKit::WebConnectionToUIProcess::encodeMessageBody):
+
 2012-10-29  Anders Carlsson  <andersca@apple.com>
 
         Build WebKit as C++11 on Mac
index 77401c1..f3934c4 100644 (file)
@@ -331,7 +331,7 @@ void handleMessage(MessageDecoder& decoder, MessageEncoder& replyEncoder, C* obj
 
     typename T::Reply::ValueType replyArguments;
     callMemberFunction(arguments, replyArguments, object, function);
-    replyEncoder.encode(replyArguments);
+    replyEncoder << replyArguments;
 }
 
 template<typename T, typename C, typename MF>
@@ -361,7 +361,7 @@ void handleMessageVariadic(MessageDecoder& decoder, MessageEncoder& replyEncoder
 
     typename T::Reply::ValueType replyArguments;
     callMemberFunction(arguments, decoder, replyArguments, object, function);
-    replyEncoder.encode(replyArguments);
+    replyEncoder << replyArguments;
 }
 
 template<typename T, typename C, typename MF>
index e66685a..df8a0fd 100644 (file)
@@ -35,13 +35,13 @@ namespace CoreIPC {
 
 void StringReference::encode(ArgumentEncoder& encoder) const
 {
-    encoder.encodeVariableLengthByteArray(DataReference(reinterpret_cast<const uint8_t*>(m_data), m_size));
+    encoder << DataReference(reinterpret_cast<const uint8_t*>(m_data), m_size);
 }
 
 bool StringReference::decode(ArgumentDecoder* decoder, StringReference& result)
 {
     DataReference dataReference;
-    if (!decoder->decodeVariableLengthByteArray(dataReference))
+    if (!decoder->decode(dataReference))
         return false;
 
     result.m_data = reinterpret_cast<const char*>(dataReference.data());
index c496a50..fa4474e 100644 (file)
@@ -48,7 +48,7 @@ public:
 
     void encode(ArgumentEncoder& encoder) const
     {
-        encoder.encode(Attachment(m_port, m_disposition));
+        encoder << Attachment(m_port, m_disposition);
     }
 
     static bool decode(ArgumentDecoder* decoder, MachPort& p)
index 4a9d03f..62ed297 100644 (file)
@@ -57,8 +57,8 @@ bool SharedMemory::Handle::isNull() const
 
 void SharedMemory::Handle::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(static_cast<uint64_t>(m_size));
-    encoder.encode(CoreIPC::MachPort(m_port, MACH_MSG_TYPE_MOVE_SEND));
+    encoder << static_cast<uint64_t>(m_size);
+    encoder << CoreIPC::MachPort(m_port, MACH_MSG_TYPE_MOVE_SEND);
     m_port = MACH_PORT_NULL;
 }
 
index c5aafab..15650fa 100644 (file)
@@ -47,17 +47,17 @@ PluginCreationParameters::PluginCreationParameters()
 
 void PluginCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(pluginInstanceID);
-    encoder.encode(windowNPObjectID);
-    encoder.encode(parameters);
-    encoder.encode(userAgent);
-    encoder.encode(contentsScaleFactor);
-    encoder.encode(isPrivateBrowsingEnabled);
-    encoder.encode(asynchronousCreationIncomplete);
-    encoder.encode(artificialPluginInitializationDelayEnabled);
+    encoder << pluginInstanceID;
+    encoder << windowNPObjectID;
+    encoder << parameters;
+    encoder << userAgent;
+    encoder << contentsScaleFactor;
+    encoder << isPrivateBrowsingEnabled;
+    encoder << asynchronousCreationIncomplete;
+    encoder << artificialPluginInitializationDelayEnabled;
 
 #if USE(ACCELERATED_COMPOSITING)
-    encoder.encode(isAcceleratedCompositingEnabled);
+    encoder << isAcceleratedCompositingEnabled;
 #endif
 }
 
index a44d99c..f14eea3 100644 (file)
@@ -36,15 +36,15 @@ namespace WebKit {
 
 void DictionaryPopupInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(origin);
-    encoder.encode(fontInfo);
+    encoder << origin;
+    encoder << fontInfo;
     encoder.encodeEnum(type);
 
 #if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     bool hadOptions = options;
-    encoder.encode(hadOptions);
+    encoder << hadOptions;
     if (hadOptions)
-        CoreIPC::encode(&encoder, options.get());
+        CoreIPC::encode(encoder, options.get());
 #endif
 }
 
index b8d640a..f7bde2a 100644 (file)
@@ -33,23 +33,23 @@ namespace WebKit {
 
 void EditorState::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(shouldIgnoreCompositionSelectionChange);
-    encoder.encode(selectionIsNone);
-    encoder.encode(selectionIsRange);
-    encoder.encode(isContentEditable);
-    encoder.encode(isContentRichlyEditable);
-    encoder.encode(isInPasswordField);
-    encoder.encode(hasComposition);
+    encoder << shouldIgnoreCompositionSelectionChange;
+    encoder << selectionIsNone;
+    encoder << selectionIsRange;
+    encoder << isContentEditable;
+    encoder << isContentRichlyEditable;
+    encoder << isInPasswordField;
+    encoder << hasComposition;
 
 #if PLATFORM(QT)
-    encoder.encode(cursorPosition);
-    encoder.encode(anchorPosition);
-    encoder.encode(editorRect);
-    encoder.encode(cursorRect);
-    encoder.encode(compositionRect);
-    encoder.encode(inputMethodHints);
-    encoder.encode(selectedText);
-    encoder.encode(surroundingText);
+    encoder << cursorPosition;
+    encoder << anchorPosition;
+    encoder << editorRect;
+    encoder << cursorRect;
+    encoder << compositionRect;
+    encoder << inputMethodHints;
+    encoder << selectedText;
+    encoder << surroundingText;
 #endif
 }
 
index de03384..33ed474 100644 (file)
@@ -37,9 +37,9 @@ namespace WebKit {
 void FontInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
 #if PLATFORM(MAC)
-    encoder.encode(static_cast<bool>(fontAttributeDictionary));
+    encoder << static_cast<bool>(fontAttributeDictionary);
     if (fontAttributeDictionary)
-        CoreIPC::encode(&encoder, fontAttributeDictionary.get());
+        CoreIPC::encode(encoder, fontAttributeDictionary.get());
 #else
     UNUSED_PARAM(encoder);
 #endif
index 0633c04..8ea9467 100644 (file)
@@ -39,7 +39,7 @@ NetworkProcessCreationParameters::NetworkProcessCreationParameters()
 void NetworkProcessCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
 #if PLATFORM(MAC)
-    encoder.encode(parentProcessName);
+    encoder << parentProcessName;
 #endif
 }
 
index 9f6fbe2..5d86c2b 100644 (file)
@@ -36,10 +36,10 @@ namespace WebKit {
 
 void OriginAndDatabases::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(originIdentifier);
-    encoder.encode(originQuota);
-    encoder.encode(originUsage);
-    encoder.encode(databases);
+    encoder << originIdentifier;
+    encoder << originQuota;
+    encoder << originUsage;
+    encoder << databases;
 }
 
 bool OriginAndDatabases::decode(CoreIPC::ArgumentDecoder* decoder, OriginAndDatabases& originAndDatabases)
index 21578c4..9cb223c 100644 (file)
@@ -47,25 +47,25 @@ PlatformPopupMenuData::PlatformPopupMenuData()
 void PlatformPopupMenuData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
 #if PLATFORM(WIN)
-    encoder.encode(m_clientPaddingLeft);
-    encoder.encode(m_clientPaddingRight);
-    encoder.encode(m_clientInsetLeft);
-    encoder.encode(m_clientInsetRight);
-    encoder.encode(m_popupWidth);
-    encoder.encode(m_itemHeight);
+    encoder << m_clientPaddingLeft;
+    encoder << m_clientPaddingRight;
+    encoder << m_clientInsetLeft;
+    encoder << m_clientInsetRight;
+    encoder << m_popupWidth;
+    encoder << m_itemHeight;
 
     ShareableBitmap::Handle notSelectedBackingStoreHandle;
     m_notSelectedBackingStore->createHandle(notSelectedBackingStoreHandle);
-    encoder.encode(notSelectedBackingStoreHandle);
+    encoder << notSelectedBackingStoreHandle;
 
     ShareableBitmap::Handle selectedBackingStoreHandle;
     m_selectedBackingStore->createHandle(selectedBackingStoreHandle);
-    encoder.encode(selectedBackingStoreHandle);
+    encoder << selectedBackingStoreHandle;
 #elif PLATFORM(MAC)
-    encoder.encode(fontInfo);
-    encoder.encode(shouldPopOver);
+    encoder << fontInfo;
+    encoder << shouldPopOver;
 #elif PLATFORM(QT)
-    encoder.encode(multipleSelections);
+    encoder << multipleSelections;
 #else
     UNUSED_PARAM(encoder);
 #endif
index fc9870f..a297bc4 100644 (file)
@@ -69,11 +69,11 @@ NPIdentifier NPIdentifierData::createNPIdentifier() const
 
 void NPIdentifierData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_isString);
+    encoder << m_isString;
     if (m_isString)
-        encoder.encode(m_string);
+        encoder << m_string;
     else
-        encoder.encode(m_number);
+        encoder << m_number;
 }
 
 bool NPIdentifierData::decode(CoreIPC::ArgumentDecoder* decoder, NPIdentifierData& result)
index c0bbf67..db96dc7 100644 (file)
@@ -120,29 +120,29 @@ NPVariantData NPVariantData::makeRemoteNPObjectID(uint64_t value)
 
 void NPVariantData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_type);
+    encoder << m_type;
 
     switch (type()) {
     case NPVariantData::Void:
     case NPVariantData::Null:
         break;
     case NPVariantData::Bool:
-        encoder.encode(boolValue());
+        encoder << boolValue();
         break;
     case NPVariantData::Int32:
-        encoder.encode(int32Value());
+        encoder << int32Value();
         break;
     case NPVariantData::Double:
-        encoder.encode(doubleValue());
+        encoder << doubleValue();
         break;
     case NPVariantData::String:
-        encoder.encode(stringValue());
+        encoder << stringValue();
         break;
     case NPVariantData::LocalNPObjectID:
-        encoder.encode(localNPObjectIDValue());
+        encoder << localNPObjectIDValue();
         break;
     case NPVariantData::RemoteNPObjectID:
-        encoder.encode(remoteNPObjectIDValue());
+        encoder << remoteNPObjectIDValue();
         break;
     }
 }
index c0c626e..f53c26e 100644 (file)
@@ -39,15 +39,15 @@ PluginProcessCreationParameters::PluginProcessCreationParameters()
 
 void PluginProcessCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(pluginPath);
-    encoder.encode(supportsAsynchronousPluginInitialization);
-    encoder.encode(minimumLifetime);
-    encoder.encode(terminationTimeout);
+    encoder << pluginPath;
+    encoder << supportsAsynchronousPluginInitialization;
+    encoder << minimumLifetime;
+    encoder << terminationTimeout;
 
 #if PLATFORM(MAC)
-    encoder.encode(parentProcessName);
-    encoder.encode(acceleratedCompositingPort);
-    encoder.encode(sandboxProfileDirectoryPath);
+    encoder << parentProcessName;
+    encoder << acceleratedCompositingPort;
+    encoder << sandboxProfileDirectoryPath;
 #endif
 }
 
index 85a069a..8dbe5aa 100644 (file)
@@ -45,9 +45,9 @@ PrintInfo::PrintInfo()
 
 void PrintInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(pageSetupScaleFactor);
-    encoder.encode(availablePaperWidth);
-    encoder.encode(availablePaperHeight);
+    encoder << pageSetupScaleFactor;
+    encoder << availablePaperWidth;
+    encoder << availablePaperHeight;
 
 #if PLATFORM(GTK)
     CoreIPC::encode(&encoder, printSettings.get());
index 6c742ab..4968036 100644 (file)
@@ -37,9 +37,9 @@ namespace WebKit {
 
 void SecurityOriginData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(protocol);
-    encoder.encode(host);
-    encoder.encode(port);
+    encoder << protocol;
+    encoder << host;
+    encoder << port;
 }
 
 bool SecurityOriginData::decode(CoreIPC::ArgumentDecoder* decoder, SecurityOriginData& securityOriginData)
index 781ea66..f4ad9bd 100644 (file)
@@ -66,8 +66,8 @@ bool SessionState::isEmpty() const
     
 void SessionState::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_list);
-    encoder.encode(m_currentIndex);
+    encoder << m_list;
+    encoder << m_currentIndex;
 }
 
 bool SessionState::decode(CoreIPC::ArgumentDecoder* decoder, SessionState& state)
index 1fb072f..acae74f 100644 (file)
@@ -41,9 +41,9 @@ ShareableBitmap::Handle::Handle()
 
 void ShareableBitmap::Handle::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_handle);
-    encoder.encode(m_size);
-    encoder.encode(m_flags);
+    encoder << m_handle;
+    encoder << m_size;
+    encoder << m_flags;
 }
 
 bool ShareableBitmap::Handle::decode(CoreIPC::ArgumentDecoder* decoder, Handle& handle)
index 9941b06..87f496d 100644 (file)
@@ -38,11 +38,11 @@ SharedWorkerProcessCreationParameters::SharedWorkerProcessCreationParameters()
 
 void SharedWorkerProcessCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(minimumLifetime);
-    encoder.encode(terminationTimeout);
+    encoder << minimumLifetime;
+    encoder << terminationTimeout;
 
 #if PLATFORM(MAC)
-    encoder.encode(parentProcessName);
+    encoder << parentProcessName;
 #endif
 }
 
index 64db17a..17dcdd9 100644 (file)
@@ -32,10 +32,10 @@ namespace WebKit {
 
 void StatisticsData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(statisticsNumbers);
-    encoder.encode(javaScriptProtectedObjectTypeCounts);
-    encoder.encode(javaScriptObjectTypeCounts);
-    encoder.encode(webCoreCacheStatistics);
+    encoder << statisticsNumbers;
+    encoder << javaScriptProtectedObjectTypeCounts;
+    encoder << javaScriptObjectTypeCounts;
+    encoder << webCoreCacheStatistics;
 }
 
 bool StatisticsData::decode(CoreIPC::ArgumentDecoder* decoder, StatisticsData& statisticsData)
index 70fea96..8cfd19d 100644 (file)
@@ -47,7 +47,7 @@ public:
 
     void encode(CoreIPC::ArgumentEncoder& encoder) const
     {
-        encoder.encode(m_stringPairVector);
+        encoder << m_stringPairVector;
     }
 
     static bool decode(CoreIPC::ArgumentDecoder* decoder, StringPairVector& stringPairVector)
index f75ad1b..cf6b906 100644 (file)
@@ -32,15 +32,15 @@ namespace WebKit {
 
 void UpdateInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(viewSize);
-    encoder.encode(deviceScaleFactor);
-    encoder.encode(scrollRect);
-    encoder.encode(scrollOffset);
-    encoder.encode(updateRectBounds);
-    encoder.encode(updateRects);
-    encoder.encode(updateScaleFactor);
-    encoder.encode(bitmapHandle);
-    encoder.encode(bitmapOffset);
+    encoder << viewSize;
+    encoder << deviceScaleFactor;
+    encoder << scrollRect;
+    encoder << scrollOffset;
+    encoder << updateRectBounds;
+    encoder << updateRects;
+    encoder << updateScaleFactor;
+    encoder << bitmapHandle;
+    encoder << bitmapOffset;
 }
 
 bool UpdateInfo::decode(CoreIPC::ArgumentDecoder* decoder, UpdateInfo& result)
index 9eff2c9..1958f0f 100644 (file)
@@ -70,116 +70,116 @@ public:
     bool baseEncode(CoreIPC::ArgumentEncoder& encoder, APIObject::Type& type) const
     {
         if (!m_root) {
-            encoder.encode(static_cast<uint32_t>(APIObject::TypeNull));
+            encoder << static_cast<uint32_t>(APIObject::TypeNull);
             return true;
         }
 
         type = m_root->type();
-        encoder.encode(static_cast<uint32_t>(type));
+        encoder << static_cast<uint32_t>(type);
 
         switch (type) {
         case APIObject::TypeArray: {
             ImmutableArray* array = static_cast<ImmutableArray*>(m_root);
-            encoder.encode(static_cast<uint64_t>(array->size()));
+            encoder << static_cast<uint64_t>(array->size());
             for (size_t i = 0; i < array->size(); ++i)
-                encoder.encode(Owner(array->at(i)));
+                encoder << Owner(array->at(i));
             return true;
         }
         case APIObject::TypeDictionary: {
             ImmutableDictionary* dictionary = static_cast<ImmutableDictionary*>(m_root);
             const ImmutableDictionary::MapType& map = dictionary->map();
-            encoder.encode(static_cast<uint64_t>(map.size()));
+            encoder << static_cast<uint64_t>(map.size());
 
             ImmutableDictionary::MapType::const_iterator it = map.begin();
             ImmutableDictionary::MapType::const_iterator end = map.end();
             for (; it != end; ++it) {
-                encoder.encode(it->key);
-                encoder.encode(Owner(it->value.get()));
+                encoder << it->key;
+                encoder << Owner(it->value.get());
             }
             return true;
         }
         case APIObject::TypeString: {
             WebString* string = static_cast<WebString*>(m_root);
-            encoder.encode(string->string());
+            encoder << string->string();
             return true;
         }
         case APIObject::TypeSerializedScriptValue: {
             WebSerializedScriptValue* scriptValue = static_cast<WebSerializedScriptValue*>(m_root);
-            encoder.encodeVariableLengthByteArray(scriptValue->dataReference());
+            encoder << scriptValue->dataReference();
             return true;
         }
         case APIObject::TypeBoolean: {
             WebBoolean* booleanObject = static_cast<WebBoolean*>(m_root);
-            encoder.encode(booleanObject->value());
+            encoder << booleanObject->value();
             return true;
         }
         case APIObject::TypeDouble: {
             WebDouble* doubleObject = static_cast<WebDouble*>(m_root);
-            encoder.encode(doubleObject->value());
+            encoder << doubleObject->value();
             return true;
         }
         case APIObject::TypeUInt64: {
             WebUInt64* uint64Object = static_cast<WebUInt64*>(m_root);
-            encoder.encode(uint64Object->value());
+            encoder << uint64Object->value();
             return true;
         }
         case APIObject::TypePoint: {
             WebPoint* pointObject = static_cast<WebPoint*>(m_root);
-            encoder.encode(pointObject->point().x);
-            encoder.encode(pointObject->point().y);
+            encoder << pointObject->point().x;
+            encoder << pointObject->point().y;
             return true;
         }
         case APIObject::TypeSize: {
             WebSize* sizeObject = static_cast<WebSize*>(m_root);
-            encoder.encode(sizeObject->size().width);
-            encoder.encode(sizeObject->size().height);
+            encoder << sizeObject->size().width;
+            encoder << sizeObject->size().height;
             return true;
         }
         case APIObject::TypeRect: {
             WebRect* rectObject = static_cast<WebRect*>(m_root);
-            encoder.encode(rectObject->rect().origin.x);
-            encoder.encode(rectObject->rect().origin.y);
-            encoder.encode(rectObject->rect().size.width);
-            encoder.encode(rectObject->rect().size.height);
+            encoder << rectObject->rect().origin.x;
+            encoder << rectObject->rect().origin.y;
+            encoder << rectObject->rect().size.width;
+            encoder << rectObject->rect().size.height;
             return true;
         }
         case APIObject::TypeRenderLayer: {
             WebRenderLayer* renderLayer = static_cast<WebRenderLayer*>(m_root);
-            encoder.encode(Owner(renderLayer->renderer()));
-            encoder.encode(renderLayer->isReflection());
-            encoder.encode(renderLayer->isClipping());
-            encoder.encode(renderLayer->isClipped());
-            encoder.encode(static_cast<uint32_t>(renderLayer->compositingLayerType()));
-            encoder.encode(renderLayer->absoluteBoundingBox());
-            encoder.encode(Owner(renderLayer->negativeZOrderList()));
-            encoder.encode(Owner(renderLayer->normalFlowList()));
-            encoder.encode(Owner(renderLayer->positiveZOrderList()));
+            encoder << Owner(renderLayer->renderer());
+            encoder << renderLayer->isReflection();
+            encoder << renderLayer->isClipping();
+            encoder << renderLayer->isClipped();
+            encoder << static_cast<uint32_t>(renderLayer->compositingLayerType());
+            encoder << renderLayer->absoluteBoundingBox();
+            encoder << Owner(renderLayer->negativeZOrderList());
+            encoder << Owner(renderLayer->normalFlowList());
+            encoder << Owner(renderLayer->positiveZOrderList());
             return true;
         }
         case APIObject::TypeRenderObject: {
             WebRenderObject* renderObject = static_cast<WebRenderObject*>(m_root);
-            encoder.encode(renderObject->name());
-            encoder.encode(renderObject->elementTagName());
-            encoder.encode(renderObject->elementID());
-            encoder.encode(Owner(renderObject->elementClassNames()));
-            encoder.encode(renderObject->absolutePosition());
-            encoder.encode(renderObject->frameRect());
-            encoder.encode(Owner(renderObject->children().get()));
+            encoder << renderObject->name();
+            encoder << renderObject->elementTagName();
+            encoder << renderObject->elementID();
+            encoder << Owner(renderObject->elementClassNames());
+            encoder << renderObject->absolutePosition();
+            encoder << renderObject->frameRect();
+            encoder << Owner(renderObject->children().get());
             return true;
         }
         case APIObject::TypeURL: {
             WebURL* urlObject = static_cast<WebURL*>(m_root);
-            encoder.encode(urlObject->string());
+            encoder << urlObject->string();
             return true;
         }
         case APIObject::TypeURLRequest: {
             WebURLRequest* urlRequestObject = static_cast<WebURLRequest*>(m_root);
-            encoder.encode(urlRequestObject->resourceRequest());
+            encoder << urlRequestObject->resourceRequest();
             return true;
         }
         case APIObject::TypeUserContentURLPattern: {
             WebUserContentURLPattern* urlPattern = static_cast<WebUserContentURLPattern*>(m_root);
-            encoder.encode(urlPattern->patternString());
+            encoder << urlPattern->patternString();
             return true;
         }
         case APIObject::TypeImage: {
@@ -189,24 +189,24 @@ public:
             ASSERT(!image->bitmap() || image->bitmap()->isBackedBySharedMemory());            
             if (!image->bitmap() || !image->bitmap()->isBackedBySharedMemory() || !image->bitmap()->createHandle(handle)) {
                 // Initial false indicates no allocated bitmap or is not shareable.
-                encoder.encode(false);
+                encoder << false;
                 return true;
             }
 
             // Initial true indicates a bitmap was allocated and is shareable.
-            encoder.encode(true);
+            encoder << true;
 
-            encoder.encode(handle);
+            encoder << handle;
             return true;
         }
         case APIObject::TypeData: {
             WebData* data = static_cast<WebData*>(m_root);
-            encoder.encodeVariableLengthByteArray(data->dataReference());
+            encoder << data->dataReference();
             return true;
         }
         case APIObject::TypeCertificateInfo: {
             WebCertificateInfo* certificateInfo = static_cast<WebCertificateInfo*>(m_root);
-            encoder.encode(certificateInfo->platformCertificateInfo());
+            encoder << certificateInfo->platformCertificateInfo();
             return true;
         }
         default:
index 8178253..e5ae67a 100644 (file)
@@ -63,11 +63,11 @@ void WebBackForwardListItem::setBackForwardData(const uint8_t* data, size_t size
 
 void WebBackForwardListItem::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_originalURL);
-    encoder.encode(m_url);
-    encoder.encode(m_title);
-    encoder.encode(m_itemID);
-    encoder.encode(CoreIPC::DataReference(m_backForwardData));
+    encoder << m_originalURL;
+    encoder << m_url;
+    encoder << m_title;
+    encoder << m_itemID;
+    encoder << CoreIPC::DataReference(m_backForwardData);
 }
 
 PassRefPtr<WebBackForwardListItem> WebBackForwardListItem::decode(CoreIPC::ArgumentDecoder& decoder)
index 9159f02..23290b3 100644 (file)
@@ -108,10 +108,10 @@ void WebContextMenuItemData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     encoder.encodeEnum(m_type);
     encoder.encodeEnum(m_action);
-    encoder.encode(m_title);
-    encoder.encode(m_checked);
-    encoder.encode(m_enabled);
-    encoder.encode(m_submenu);
+    encoder << m_title;
+    encoder << m_checked;
+    encoder << m_enabled;
+    encoder << m_submenu;
 }
 
 bool WebContextMenuItemData::decode(CoreIPC::ArgumentDecoder* decoder, WebContextMenuItemData& item)
index d86cf83..df3ed4e 100644 (file)
@@ -48,9 +48,9 @@ WebEvent::WebEvent(Type type, Modifiers modifiers, double timestamp)
 
 void WebEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_type);
-    encoder.encode(m_modifiers);
-    encoder.encode(m_timestamp);
+    encoder << m_type;
+    encoder << m_modifiers;
+    encoder << m_timestamp;
 }
 
 bool WebEvent::decode(CoreIPC::ArgumentDecoder* decoder, WebEvent& result)
index e3178cd..a9089e2 100644 (file)
@@ -57,10 +57,10 @@ void WebGestureEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     WebEvent::encode(encoder);
 
-    encoder.encode(m_position);
-    encoder.encode(m_globalPosition);
-    encoder.encode(m_area);
-    encoder.encode(m_delta);
+    encoder << m_position;
+    encoder << m_globalPosition;
+    encoder << m_area;
+    encoder << m_delta;
 }
 
 bool WebGestureEvent::decode(CoreIPC::ArgumentDecoder* decoder, WebGestureEvent& t)
index f81f11d..c2f054e 100644 (file)
@@ -36,14 +36,14 @@ PassRefPtr<WebHitTestResult> WebHitTestResult::create(const WebHitTestResult::Da
 
 void WebHitTestResult::Data::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(absoluteImageURL);
-    encoder.encode(absolutePDFURL);
-    encoder.encode(absoluteLinkURL);
-    encoder.encode(absoluteMediaURL);
-    encoder.encode(linkLabel);
-    encoder.encode(linkTitle);
-    encoder.encode(isContentEditable);
-    encoder.encode(elementBoundingBox);
+    encoder << absoluteImageURL;
+    encoder << absolutePDFURL;
+    encoder << absoluteLinkURL;
+    encoder << absoluteMediaURL;
+    encoder << linkLabel;
+    encoder << linkTitle;
+    encoder << isContentEditable;
+    encoder << elementBoundingBox;
 }
 
 bool WebHitTestResult::Data::decode(CoreIPC::ArgumentDecoder* decoder, WebHitTestResult::Data& hitTestResultData)
index d81c863..02056ff 100644 (file)
@@ -49,15 +49,15 @@ void WebKeyboardEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     WebEvent::encode(encoder);
 
-    encoder.encode(m_text);
-    encoder.encode(m_unmodifiedText);
-    encoder.encode(m_keyIdentifier);
-    encoder.encode(m_windowsVirtualKeyCode);
-    encoder.encode(m_nativeVirtualKeyCode);
-    encoder.encode(m_macCharCode);
-    encoder.encode(m_isAutoRepeat);
-    encoder.encode(m_isKeypad);
-    encoder.encode(m_isSystemKey);
+    encoder << m_text;
+    encoder << m_unmodifiedText;
+    encoder << m_keyIdentifier;
+    encoder << m_windowsVirtualKeyCode;
+    encoder << m_nativeVirtualKeyCode;
+    encoder << m_macCharCode;
+    encoder << m_isAutoRepeat;
+    encoder << m_isKeypad;
+    encoder << m_isSystemKey;
 }
 
 bool WebKeyboardEvent::decode(CoreIPC::ArgumentDecoder* decoder, WebKeyboardEvent& result)
index 473de40..fb02ac3 100644 (file)
@@ -82,16 +82,16 @@ void WebMouseEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     WebEvent::encode(encoder);
 
-    encoder.encode(m_button);
-    encoder.encode(m_position);
-    encoder.encode(m_globalPosition);
-    encoder.encode(m_deltaX);
-    encoder.encode(m_deltaY);
-    encoder.encode(m_deltaZ);
-    encoder.encode(m_clickCount);
+    encoder << m_button;
+    encoder << m_position;
+    encoder << m_globalPosition;
+    encoder << m_deltaX;
+    encoder << m_deltaY;
+    encoder << m_deltaZ;
+    encoder << m_clickCount;
 
 #if PLATFORM(WIN)
-    encoder.encode(m_didActivateWebView);
+    encoder << m_didActivateWebView;
 #endif
 }
 
index 9cd10f7..f521a58 100644 (file)
@@ -37,9 +37,9 @@ namespace WebKit {
 struct WebNavigationDataStore {
     void encode(CoreIPC::ArgumentEncoder& encoder) const
     {
-        encoder.encode(url);
-        encoder.encode(title);
-        encoder.encode(originalRequest);
+        encoder << url;
+        encoder << title;
+        encoder << originalRequest;
     }
 
     static bool decode(CoreIPC::ArgumentDecoder* decoder, WebNavigationDataStore& store)
index 17debe8..2a4afd9 100644 (file)
@@ -32,40 +32,40 @@ namespace WebKit {
 
 void WebPageCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(viewSize);
-    encoder.encode(isActive);
-    encoder.encode(isFocused);
-    encoder.encode(isVisible);
-    encoder.encode(isInWindow);
+    encoder << viewSize;
+    encoder << isActive;
+    encoder << isFocused;
+    encoder << isVisible;
+    encoder << isInWindow;
 
-    encoder.encode(store);
+    encoder << store;
     encoder.encodeEnum(drawingAreaType);
-    encoder.encode(pageGroupData);
-    encoder.encode(drawsBackground);
-    encoder.encode(drawsTransparentBackground);
-    encoder.encode(areMemoryCacheClientCallsEnabled);
-    encoder.encode(useFixedLayout);
-    encoder.encode(fixedLayoutSize);
+    encoder << pageGroupData;
+    encoder << drawsBackground;
+    encoder << drawsTransparentBackground;
+    encoder << areMemoryCacheClientCallsEnabled;
+    encoder << useFixedLayout;
+    encoder << fixedLayoutSize;
     encoder.encodeEnum(paginationMode);
-    encoder.encode(paginationBehavesLikeColumns);
-    encoder.encode(pageLength);
-    encoder.encode(gapBetweenPages);
-    encoder.encode(userAgent);
-    encoder.encode(sessionState);
-    encoder.encode(highestUsedBackForwardItemID);
-    encoder.encode(canRunBeforeUnloadConfirmPanel);
-    encoder.encode(canRunModal);
-    encoder.encode(deviceScaleFactor);
-    encoder.encode(mediaVolume);
+    encoder << paginationBehavesLikeColumns;
+    encoder << pageLength;
+    encoder << gapBetweenPages;
+    encoder << userAgent;
+    encoder << sessionState;
+    encoder << highestUsedBackForwardItemID;
+    encoder << canRunBeforeUnloadConfirmPanel;
+    encoder << canRunModal;
+    encoder << deviceScaleFactor;
+    encoder << mediaVolume;
 
 #if PLATFORM(MAC)
-    encoder.encode(isSmartInsertDeleteEnabled);
+    encoder << isSmartInsertDeleteEnabled;
     encoder.encodeEnum(layerHostingMode);
-    encoder.encode(colorSpace);
+    encoder << colorSpace;
 #endif
 
 #if PLATFORM(WIN)
-    encoder.encode(reinterpret_cast<uint64_t>(nativeWindow));
+    encoder << reinterpret_cast<uint64_t>(nativeWindow);
 #endif
 }
 
index c5d6034..871b4d1 100644 (file)
@@ -32,12 +32,12 @@ namespace WebKit {
 
 void WebPageGroupData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(identifer);
-    encoder.encode(pageGroupID);
-    encoder.encode(visibleToInjectedBundle);
-    encoder.encode(visibleToHistoryClient);
-    encoder.encode(userStyleSheets);
-    encoder.encode(userScripts);
+    encoder << identifer;
+    encoder << pageGroupID;
+    encoder << visibleToInjectedBundle;
+    encoder << visibleToHistoryClient;
+    encoder << userStyleSheets;
+    encoder << userScripts;
 }
 
 bool WebPageGroupData::decode(CoreIPC::ArgumentDecoder* decoder, WebPageGroupData& data)
index 9ab926c..bae8d65 100644 (file)
@@ -59,13 +59,13 @@ WebPlatformTouchPoint::WebPlatformTouchPoint(unsigned id, TouchPointState state,
 
 void WebPlatformTouchPoint::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_id);
-    encoder.encode(m_state);
-    encoder.encode(m_screenPosition);
-    encoder.encode(m_position);
-    encoder.encode(m_radius);
-    encoder.encode(m_rotationAngle);
-    encoder.encode(m_force);
+    encoder << m_id;
+    encoder << m_state;
+    encoder << m_screenPosition;
+    encoder << m_position;
+    encoder << m_radius;
+    encoder << m_rotationAngle;
+    encoder << m_force;
 }
 
 bool WebPlatformTouchPoint::decode(CoreIPC::ArgumentDecoder* decoder, WebPlatformTouchPoint& result)
index 66b7856..bbe48fb 100644 (file)
@@ -69,14 +69,14 @@ WebPopupItem::WebPopupItem(Type type, const String& text, TextDirection textDire
 void WebPopupItem::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     encoder.encodeEnum(m_type);
-    encoder.encode(m_text);
+    encoder << m_text;
     encoder.encodeEnum(m_textDirection);
-    encoder.encode(m_hasTextDirectionOverride);
-    encoder.encode(m_toolTip);
-    encoder.encode(m_accessibilityText);
-    encoder.encode(m_isEnabled);
-    encoder.encode(m_isLabel);
-    encoder.encode(m_isSelected);
+    encoder << m_hasTextDirectionOverride;
+    encoder << m_toolTip;
+    encoder << m_accessibilityText;
+    encoder << m_isEnabled;
+    encoder << m_isLabel;
+    encoder << m_isSelected;
 }
 
 bool WebPopupItem::decode(CoreIPC::ArgumentDecoder* decoder, WebPopupItem& item)
index ec06cbe..e73c0f6 100644 (file)
@@ -61,11 +61,11 @@ WebPreferencesStore::WebPreferencesStore()
 
 void WebPreferencesStore::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(m_stringValues);
-    encoder.encode(m_boolValues);
-    encoder.encode(m_uint32Values);
-    encoder.encode(m_doubleValues);
-    encoder.encode(m_floatValues);
+    encoder << m_stringValues;
+    encoder << m_boolValues;
+    encoder << m_uint32Values;
+    encoder << m_doubleValues;
+    encoder << m_floatValues;
 }
 
 bool WebPreferencesStore::decode(CoreIPC::ArgumentDecoder* decoder, WebPreferencesStore& result)
index 1436caa..c550362 100644 (file)
@@ -54,67 +54,67 @@ WebProcessCreationParameters::WebProcessCreationParameters()
 
 void WebProcessCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(injectedBundlePath);
-    encoder.encode(injectedBundlePathExtensionHandle);
-    encoder.encode(applicationCacheDirectory);
-    encoder.encode(applicationCacheDirectoryExtensionHandle);
-    encoder.encode(databaseDirectory);
-    encoder.encode(databaseDirectoryExtensionHandle);
-    encoder.encode(localStorageDirectory);
-    encoder.encode(localStorageDirectoryExtensionHandle);
-    encoder.encode(diskCacheDirectory);
-    encoder.encode(diskCacheDirectoryExtensionHandle);
-    encoder.encode(cookieStorageDirectory);
-    encoder.encode(cookieStorageDirectoryExtensionHandle);
-    encoder.encode(urlSchemesRegistererdAsEmptyDocument);
-    encoder.encode(urlSchemesRegisteredAsSecure);
-    encoder.encode(urlSchemesForWhichDomainRelaxationIsForbidden);
-    encoder.encode(urlSchemesRegisteredAsLocal);
-    encoder.encode(urlSchemesRegisteredAsNoAccess);
-    encoder.encode(urlSchemesRegisteredAsDisplayIsolated);
-    encoder.encode(urlSchemesRegisteredAsCORSEnabled);
+    encoder << injectedBundlePath;
+    encoder << injectedBundlePathExtensionHandle;
+    encoder << applicationCacheDirectory;
+    encoder << applicationCacheDirectoryExtensionHandle;
+    encoder << databaseDirectory;
+    encoder << databaseDirectoryExtensionHandle;
+    encoder << localStorageDirectory;
+    encoder << localStorageDirectoryExtensionHandle;
+    encoder << diskCacheDirectory;
+    encoder << diskCacheDirectoryExtensionHandle;
+    encoder << cookieStorageDirectory;
+    encoder << cookieStorageDirectoryExtensionHandle;
+    encoder << urlSchemesRegistererdAsEmptyDocument;
+    encoder << urlSchemesRegisteredAsSecure;
+    encoder << urlSchemesForWhichDomainRelaxationIsForbidden;
+    encoder << urlSchemesRegisteredAsLocal;
+    encoder << urlSchemesRegisteredAsNoAccess;
+    encoder << urlSchemesRegisteredAsDisplayIsolated;
+    encoder << urlSchemesRegisteredAsCORSEnabled;
     encoder.encodeEnum(cacheModel);
-    encoder.encode(shouldTrackVisitedLinks);
-    encoder.encode(shouldAlwaysUseComplexTextCodePath);
-    encoder.encode(shouldUseFontSmoothing);
-    encoder.encode(iconDatabaseEnabled);
-    encoder.encode(terminationTimeout);
-    encoder.encode(languages);
-    encoder.encode(textCheckerState);
-    encoder.encode(fullKeyboardAccessEnabled);
-    encoder.encode(defaultRequestTimeoutInterval);
+    encoder << shouldTrackVisitedLinks;
+    encoder << shouldAlwaysUseComplexTextCodePath;
+    encoder << shouldUseFontSmoothing;
+    encoder << iconDatabaseEnabled;
+    encoder << terminationTimeout;
+    encoder << languages;
+    encoder << textCheckerState;
+    encoder << fullKeyboardAccessEnabled;
+    encoder << defaultRequestTimeoutInterval;
 #if PLATFORM(MAC) || USE(CFURLSTORAGESESSIONS)
-    encoder.encode(uiProcessBundleIdentifier);
+    encoder << uiProcessBundleIdentifier;
 #endif
 #if PLATFORM(MAC)
-    encoder.encode(parentProcessName);
-    encoder.encode(presenterApplicationPid);
-    encoder.encode(nsURLCacheMemoryCapacity);
-    encoder.encode(nsURLCacheDiskCapacity);
-    encoder.encode(acceleratedCompositingPort);
-    encoder.encode(uiProcessBundleResourcePath);
-    encoder.encode(uiProcessBundleResourcePathExtensionHandle);
-    encoder.encode(shouldForceScreenFontSubstitution);
-    encoder.encode(shouldEnableKerningAndLigaturesByDefault);
+    encoder << parentProcessName;
+    encoder << presenterApplicationPid;
+    encoder << nsURLCacheMemoryCapacity;
+    encoder << nsURLCacheDiskCapacity;
+    encoder << acceleratedCompositingPort;
+    encoder << uiProcessBundleResourcePath;
+    encoder << uiProcessBundleResourcePathExtensionHandle;
+    encoder << shouldForceScreenFontSubstitution;
+    encoder << shouldEnableKerningAndLigaturesByDefault;
 #elif PLATFORM(WIN)
-    encoder.encode(shouldPaintNativeControls);
-    encoder.encode(cfURLCacheDiskCapacity);
-    encoder.encode(cfURLCacheMemoryCapacity);
-    encoder.encode(initialHTTPCookieAcceptPolicy);
+    encoder << shouldPaintNativeControls;
+    encoder << cfURLCacheDiskCapacity;
+    encoder << cfURLCacheMemoryCapacity;
+    encoder << initialHTTPCookieAcceptPolicy;
 #if USE(CFURLSTORAGESESSIONS)
     CFDataRef storageSession = serializedDefaultStorageSession.get();
-    encoder.encode(static_cast<bool>(storageSession));
+    encoder << static_cast<bool>(storageSession);
     if (storageSession)
-        CoreIPC::encode(&encoder, storageSession);
+        CoreIPC::encode(encoder, storageSession);
 #endif // USE(CFURLSTORAGESESSIONS)
 #endif
 
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
-    encoder.encode(notificationPermissions);
+    encoder << notificationPermissions;
 #endif
 
 #if ENABLE(NETWORK_PROCESS)
-    encoder.encode(usesNetworkProcess);
+    encoder << usesNetworkProcess;
 #endif
 }
 
index be0dec0..1f7e9f7 100644 (file)
@@ -44,7 +44,7 @@ void WebTouchEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     WebEvent::encode(encoder);
 
-    encoder.encode(m_touchPoints);
+    encoder << m_touchPoints;
 }
 
 bool WebTouchEvent::decode(CoreIPC::ArgumentDecoder* decoder, WebTouchEvent& result)
index 19ae532..3bd19f4 100644 (file)
@@ -73,18 +73,18 @@ void WebWheelEvent::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     WebEvent::encode(encoder);
 
-    encoder.encode(m_position);
-    encoder.encode(m_globalPosition);
-    encoder.encode(m_delta);
-    encoder.encode(m_wheelTicks);
-    encoder.encode(m_granularity);
-    encoder.encode(m_directionInvertedFromDevice);
+    encoder << m_position;
+    encoder << m_globalPosition;
+    encoder << m_delta;
+    encoder << m_wheelTicks;
+    encoder << m_granularity;
+    encoder << m_directionInvertedFromDevice;
 #if PLATFORM(MAC)
-    encoder.encode(m_phase);
-    encoder.encode(m_momentumPhase);
-    encoder.encode(m_hasPreciseScrollingDeltas);
-    encoder.encode(m_scrollCount);
-    encoder.encode(m_unacceleratedScrollingDelta);
+    encoder << m_phase;
+    encoder << m_momentumPhase;
+    encoder << m_hasPreciseScrollingDeltas;
+    encoder << m_scrollCount;
+    encoder << m_unacceleratedScrollingDelta;
 #endif
 }
 
index 7261abd..1f01de4 100644 (file)
@@ -98,10 +98,10 @@ static CFType typeFromCFTypeRef(CFTypeRef type)
     return Unknown;
 }
 
-void encode(ArgumentEncoder* encoder, CFTypeRef typeRef)
+void encode(ArgumentEncoder& encoder, CFTypeRef typeRef)
 {
     CFType type = typeFromCFTypeRef(typeRef);
-    encoder->encodeEnum(type);
+    encoder.encodeEnum(type);
 
     switch (type) {
     case CFArray:
@@ -240,14 +240,15 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFTypeRef>& result)
     return false;
 }
 
-void encode(ArgumentEncoder* encoder, CFArrayRef array)
+void encode(ArgumentEncoder& encoder, CFArrayRef array)
 {
     CFIndex size = CFArrayGetCount(array);
     Vector<CFTypeRef, 32> values(size);
 
     CFArrayGetValues(array, CFRangeMake(0, size), values.data());
 
-    encoder->encode(static_cast<uint64_t>(size));
+    encoder << static_cast<uint64_t>(size);
+
     for (CFIndex i = 0; i < size; ++i) {
         ASSERT(values[i]);
 
@@ -275,9 +276,9 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFArrayRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, CFBooleanRef boolean)
+void encode(ArgumentEncoder& encoder, CFBooleanRef boolean)
 {
-    encoder->encode(static_cast<bool>(CFBooleanGetValue(boolean)));
+    encoder << static_cast<bool>(CFBooleanGetValue(boolean));
 }
 
 bool decode(ArgumentDecoder* decoder, RetainPtr<CFBooleanRef>& result)
@@ -290,12 +291,12 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFBooleanRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, CFDataRef data)
+void encode(ArgumentEncoder& encoder, CFDataRef data)
 {
     CFIndex length = CFDataGetLength(data);
     const UInt8* bytePtr = CFDataGetBytePtr(data);
 
-    encoder->encodeVariableLengthByteArray(CoreIPC::DataReference(bytePtr, length));
+    encoder << CoreIPC::DataReference(bytePtr, length);
 }
 
 bool decode(ArgumentDecoder* decoder, RetainPtr<CFDataRef>& result)
@@ -308,9 +309,9 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFDataRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, CFDateRef date)
+void encode(ArgumentEncoder& encoder, CFDateRef date)
 {
-    encoder->encode(static_cast<double>(CFDateGetAbsoluteTime(date)));
+    encoder << static_cast<double>(CFDateGetAbsoluteTime(date));
 }
 
 bool decode(ArgumentDecoder* decoder, RetainPtr<CFDateRef>& result)
@@ -323,7 +324,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFDateRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, CFDictionaryRef dictionary)
+void encode(ArgumentEncoder& encoder, CFDictionaryRef dictionary)
 {
     CFIndex size = CFDictionaryGetCount(dictionary);
     Vector<CFTypeRef, 32> keys(size);
@@ -331,7 +332,7 @@ void encode(ArgumentEncoder* encoder, CFDictionaryRef dictionary)
     
     CFDictionaryGetKeysAndValues(dictionary, keys.data(), values.data());
 
-    encoder->encode(static_cast<uint64_t>(size));
+    encoder << static_cast<uint64_t>(size);
 
     for (CFIndex i = 0; i < size; ++i) {
         ASSERT(keys[i]);
@@ -371,7 +372,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFDictionaryRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, CFNumberRef number)
+void encode(ArgumentEncoder& encoder, CFNumberRef number)
 {
     CFNumberType numberType = CFNumberGetType(number);
 
@@ -379,8 +380,8 @@ void encode(ArgumentEncoder* encoder, CFNumberRef number)
     bool result = CFNumberGetValue(number, numberType, buffer.data());
     ASSERT_UNUSED(result, result);
 
-    encoder->encodeEnum(numberType);
-    encoder->encodeVariableLengthByteArray(buffer);
+    encoder.encodeEnum(numberType);
+    encoder << CoreIPC::DataReference(buffer);
 }
 
 static size_t sizeForNumberType(CFNumberType numberType)
@@ -452,7 +453,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFNumberRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, CFStringRef string)
+void encode(ArgumentEncoder& encoder, CFStringRef string)
 {
     CFIndex length = CFStringGetLength(string);
     CFStringEncoding encoding = CFStringGetFastestEncoding(string);
@@ -467,8 +468,8 @@ void encode(ArgumentEncoder* encoder, CFStringRef string)
     numConvertedBytes = CFStringGetBytes(string, range, encoding, 0, false, buffer.data(), buffer.size(), &bufferLength);
     ASSERT(numConvertedBytes == length);
 
-    encoder->encodeEnum(encoding);
-    encoder->encodeVariableLengthByteArray(buffer);
+    encoder.encodeEnum(encoding);
+    encoder << CoreIPC::DataReference(buffer);
 }
 
 bool decode(ArgumentDecoder* decoder, RetainPtr<CFStringRef>& result)
@@ -492,10 +493,10 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFStringRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, CFURLRef url)
+void encode(ArgumentEncoder& encoder, CFURLRef url)
 {
     CFURLRef baseURL = CFURLGetBaseURL(url);
-    encoder->encode(static_cast<bool>(baseURL));
+    encoder << static_cast<bool>(baseURL);
     if (baseURL)
         encode(encoder, baseURL);
 
@@ -536,7 +537,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<CFURLRef>& result)
 }
 
 #if USE(SECURITY_FRAMEWORK)
-void encode(ArgumentEncoder* encoder, SecCertificateRef certificate)
+void encode(ArgumentEncoder& encoder, SecCertificateRef certificate)
 {
     RetainPtr<CFDataRef> data(AdoptCF, SecCertificateCopyData(certificate));
     encode(encoder, data.get());
@@ -552,7 +553,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<SecCertificateRef>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, SecKeychainItemRef keychainItem)
+void encode(ArgumentEncoder& encoder, SecKeychainItemRef keychainItem)
 {
     CFDataRef data;
     if (SecKeychainItemCreatePersistentReference(keychainItem, &data) == errSecSuccess) {
@@ -574,7 +575,6 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<SecKeychainItemRef>& result)
     result.adoptCF(item);
     return true;
 }
-
 #endif
 
 } // namespace CoreIPC
index 8f92f62..514fa86 100644 (file)
@@ -39,48 +39,48 @@ class ArgumentEncoder;
 class ArgumentDecoder;
 
 // CFArrayRef
-void encode(ArgumentEncoder*, CFArrayRef);
+void encode(ArgumentEncoder&, CFArrayRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFArrayRef>& result);
 
 // CFBooleanRef
-void encode(ArgumentEncoder*, CFBooleanRef);
+void encode(ArgumentEncoder&, CFBooleanRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFBooleanRef>& result);
 
 // CFDataRef
-void encode(ArgumentEncoder*, CFDataRef);
+void encode(ArgumentEncoder&, CFDataRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFDataRef>& result);
 
 // CFDateRef
-void encode(ArgumentEncoder*, CFDateRef);
+void encode(ArgumentEncoder&, CFDateRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFDateRef>& result);
 
 // CFDictionaryRef
-void encode(ArgumentEncoder*, CFDictionaryRef);
+void encode(ArgumentEncoder&, CFDictionaryRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFDictionaryRef>& result);
 
 // CFNumberRef
-void encode(ArgumentEncoder*, CFNumberRef);
+void encode(ArgumentEncoder&, CFNumberRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFNumberRef>& result);
 
 // CFStringRef
-void encode(ArgumentEncoder*, CFStringRef);
+void encode(ArgumentEncoder&, CFStringRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFStringRef>& result);
 
 // CFTypeRef
-void encode(ArgumentEncoder*, CFTypeRef);
+void encode(ArgumentEncoder&, CFTypeRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFTypeRef>& result);
 
 // CFURLRef
-void encode(ArgumentEncoder*, CFURLRef);
+void encode(ArgumentEncoder&, CFURLRef);
 bool decode(ArgumentDecoder*, RetainPtr<CFURLRef>& result);
 
 #if USE(SECURITY_FRAMEWORK)
 // SecCertificateRef
-void encode(ArgumentEncoder*, SecCertificateRef);
+void encode(ArgumentEncoder&, SecCertificateRef);
 bool decode(ArgumentDecoder*, RetainPtr<SecCertificateRef>& result);
 
 // SecKeychainItemRef
-void encode(ArgumentEncoder*, SecKeychainItemRef);
+void encode(ArgumentEncoder&, SecKeychainItemRef);
 bool decode(ArgumentDecoder*, RetainPtr<SecKeychainItemRef>& result);
 #endif
 
index 14f1dee..bd164e1 100644 (file)
@@ -34,31 +34,31 @@ class ArgumentEncoder;
 class ArgumentDecoder;
 
 // NSAttributedString
-void encode(ArgumentEncoder*, NSAttributedString *);
+void encode(ArgumentEncoder&, NSAttributedString *);
 bool decode(ArgumentDecoder*, RetainPtr<NSAttributedString>&);
 
 #if USE(APPKIT)
 // NSColor
-void encode(ArgumentEncoder*, NSColor *);
+void encode(ArgumentEncoder&, NSColor *);
 bool decode(ArgumentDecoder*, RetainPtr<NSColor>&);
 #endif
 
 // NSDictionary
-void encode(ArgumentEncoder*, NSDictionary *);
+void encode(ArgumentEncoder&, NSDictionary *);
 bool decode(ArgumentDecoder*, RetainPtr<NSDictionary>&);
 
 #if USE(APPKIT)
 // NSFont
-void encode(ArgumentEncoder*, NSFont *);
+void encode(ArgumentEncoder&, NSFont *);
 bool decode(ArgumentDecoder*, RetainPtr<NSFont>&);
 #endif
 
 // NSNumber
-void encode(ArgumentEncoder*, NSNumber *);
+void encode(ArgumentEncoder&, NSNumber *);
 bool decode(ArgumentDecoder*, RetainPtr<NSNumber>&);
 
 // NSString
-void encode(ArgumentEncoder*, NSString *);
+void encode(ArgumentEncoder&, NSString *);
 bool decode(ArgumentDecoder*, RetainPtr<NSString>&);
 
 } // namespace CoreIPC
index ec6d38b..b4d8255 100644 (file)
@@ -76,10 +76,10 @@ static NSType typeFromObject(id object)
     return Unknown;
 }
 
-static void encode(ArgumentEncoder* encoder, id object)
+static void encode(ArgumentEncoder& encoder, id object)
 {
     NSType type = typeFromObject(object);
-    encoder->encodeEnum(type);
+    encoder.encodeEnum(type);
 
     switch (type) {
     case NSAttributedStringType:
@@ -172,7 +172,7 @@ static bool decode(ArgumentDecoder* decoder, RetainPtr<id>& result)
     return false;
 }
 
-void encode(ArgumentEncoder* encoder, NSAttributedString *string)
+void encode(ArgumentEncoder& encoder, NSAttributedString *string)
 {
     // Even though NSAttributedString is toll free bridged with CFAttributedStringRef, attributes' values may be not, so we should stay within this file's code.
 
@@ -196,11 +196,11 @@ void encode(ArgumentEncoder* encoder, NSAttributedString *string)
         position = NSMaxRange(effectiveRange);
     }
 
-    encoder->encode(static_cast<uint64_t>(ranges.size()));
+    encoder << static_cast<uint64_t>(ranges.size());
 
     for (size_t i = 0; i < ranges.size(); ++i) {
-        encoder->encode(static_cast<uint64_t>(ranges[i].first.location));
-        encoder->encode(static_cast<uint64_t>(ranges[i].first.length));
+        encoder << static_cast<uint64_t>(ranges[i].first.location);
+        encoder << static_cast<uint64_t>(ranges[i].first.length);
         CoreIPC::encode(encoder, ranges[i].second.get());
     }
 }
@@ -243,9 +243,9 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<NSAttributedString>& result)
 }
 
 #if USE(APPKIT)
-void encode(ArgumentEncoder* encoder, NSColor *color)
+void encode(ArgumentEncoder& encoder, NSColor *color)
 {
-    encoder->encode(colorFromNSColor(color));
+    encoder << colorFromNSColor(color);
 }
 
 bool decode(ArgumentDecoder* decoder, RetainPtr<NSColor>& result)
@@ -259,7 +259,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<NSColor>& result)
 }
 #endif
 
-void encode(ArgumentEncoder* encoder, NSDictionary *dictionary)
+void encode(ArgumentEncoder& encoder, NSDictionary *dictionary)
 {
     // Even though NSDictionary is toll free bridged with CFDictionaryRef, values may be not, so we should stay within this file's code.
 
@@ -267,7 +267,7 @@ void encode(ArgumentEncoder* encoder, NSDictionary *dictionary)
     NSArray *keys = [dictionary allKeys];
     NSArray *values = [dictionary allValues];
 
-    encoder->encode(static_cast<uint64_t>(size));
+    encoder << static_cast<uint64_t>(size);
 
     for (NSUInteger i = 0; i < size; ++i) {
         id key = [keys objectAtIndex:i];
@@ -310,7 +310,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<NSDictionary>& result)
 }
 
 #if USE(APPKIT)
-void encode(ArgumentEncoder* encoder, NSFont *font)
+void encode(ArgumentEncoder& encoder, NSFont *font)
 {
     // NSFont could use CTFontRef code if we had it in ArgumentCodersCF.
     encode(encoder, [[font fontDescriptor] fontAttributes]);
@@ -329,7 +329,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<NSFont>& result)
 }
 #endif
 
-void encode(ArgumentEncoder* encoder, NSNumber *number)
+void encode(ArgumentEncoder& encoder, NSNumber *number)
 {
     encode(encoder, (CFNumberRef)number);
 }
@@ -344,7 +344,7 @@ bool decode(ArgumentDecoder* decoder, RetainPtr<NSNumber>& result)
     return true;
 }
 
-void encode(ArgumentEncoder* encoder, NSString *string)
+void encode(ArgumentEncoder& encoder, NSString *string)
 {
     encode(encoder, (CFStringRef)string);
 }
index b7a47d7..34c17ad 100644 (file)
@@ -34,10 +34,10 @@ namespace WebKit {
 
 void AttributedString::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(!string);
+    encoder << static_cast<bool>(!string);
     if (!string)
         return;
-    CoreIPC::encode(&encoder, string.get());
+    CoreIPC::encode(encoder, string.get());
 }
 
 bool AttributedString::decode(CoreIPC::ArgumentDecoder* decoder, AttributedString& attributedString)
index a934a99..0cecb47 100644 (file)
@@ -44,14 +44,14 @@ void ColorSpaceData::encode(CoreIPC::ArgumentEncoder& encoder) const
         // Try to encode the name.
         if (RetainPtr<CFStringRef> name = adoptCF(CGColorSpaceCopyName(cgColorSpace.get()))) {
             encoder.encodeEnum(Name);
-            CoreIPC::encode(&encoder, name.get());
+            CoreIPC::encode(encoder, name.get());
             return;
         }
 
         // Failing that, just encode the ICC data.
         if (RetainPtr<CFDataRef> profileData = adoptCF(CGColorSpaceCopyICCProfile(cgColorSpace.get()))) {
             encoder.encodeEnum(Data);
-            CoreIPC::encode(&encoder, profileData.get());
+            CoreIPC::encode(encoder, profileData.get());
             return;
         }
     }
index eb284bc..672f15e 100644 (file)
@@ -51,10 +51,10 @@ KeychainAttribute::KeychainAttribute(const SecKeychainAttribute& secKeychainAttr
 
 namespace CoreIPC {
 
-void encode(CoreIPC::ArgumentEncoder* encoder, const WebKit::KeychainAttribute& attribute)
+void encode(CoreIPC::ArgumentEncoder& encoder, const WebKit::KeychainAttribute& attribute)
 {
-    encoder->encode(static_cast<uint32_t>(attribute.tag));
-    encoder->encode(static_cast<bool>(attribute.data));
+    encoder << static_cast<uint32_t>(attribute.tag);
+    encoder << static_cast<bool>(attribute.data);
     if (attribute.data)
         CoreIPC::encode(encoder, attribute.data.get());
 }
index d5f1f42..e79103c 100644 (file)
@@ -47,7 +47,7 @@ namespace CoreIPC {
 class ArgumentDecoder;
 class ArgumentEncoder;
 
-void encode(ArgumentEncoder*, const WebKit::KeychainAttribute&);
+void encode(ArgumentEncoder&, const WebKit::KeychainAttribute&);
 bool decode(ArgumentDecoder*, WebKit::KeychainAttribute&);
 
 } // namespace CoreIPC
index d5957bf..531d245 100644 (file)
@@ -42,7 +42,7 @@ LayerTreeContext::~LayerTreeContext()
 
 void LayerTreeContext::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(contextID);
+    encoder << contextID;
 }
 
 bool LayerTreeContext::decode(CoreIPC::ArgumentDecoder* decoder, LayerTreeContext& result)
index 7f29153..ecffbe6 100644 (file)
@@ -52,12 +52,12 @@ PlatformCertificateInfo::PlatformCertificateInfo(CFArrayRef certificateChain)
 void PlatformCertificateInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     if (!m_certificateChain) {
-        encoder.encode(false);
+        encoder << false;
         return;
     }
 
-    encoder.encode(true);
-    CoreIPC::encode(&encoder, m_certificateChain.get());
+    encoder << true;
+    CoreIPC::encode(encoder, m_certificateChain.get());
 }
 
 bool PlatformCertificateInfo::decode(CoreIPC::ArgumentDecoder* decoder, PlatformCertificateInfo& c)
index b6c2c85..d00058d 100644 (file)
@@ -56,7 +56,7 @@ SandboxExtension::Handle::~Handle()
 void SandboxExtension::Handle::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     if (!m_sandboxExtension) {
-        encoder.encodeVariableLengthByteArray(CoreIPC::DataReference());
+        encoder << CoreIPC::DataReference();
         return;
     }
 
@@ -64,7 +64,7 @@ void SandboxExtension::Handle::encode(CoreIPC::ArgumentEncoder& encoder) const
     const char *serializedFormat = WKSandboxExtensionGetSerializedFormat(m_sandboxExtension, &length);
     ASSERT(serializedFormat);
 
-    encoder.encodeVariableLengthByteArray(CoreIPC::DataReference(reinterpret_cast<const uint8_t*>(serializedFormat), length));
+    encoder << CoreIPC::DataReference(reinterpret_cast<const uint8_t*>(serializedFormat), length);
 
     // Encoding will destroy the sandbox extension locally.
     WKSandboxExtensionDestroy(m_sandboxExtension);
@@ -76,7 +76,7 @@ bool SandboxExtension::Handle::decode(CoreIPC::ArgumentDecoder* decoder, Handle&
     ASSERT(!result.m_sandboxExtension);
 
     CoreIPC::DataReference dataReference;
-    if (!decoder->decodeVariableLengthByteArray(dataReference))
+    if (!decoder->decode(dataReference))
         return false;
 
     if (dataReference.isEmpty())
@@ -128,9 +128,9 @@ size_t SandboxExtension::HandleArray::size() const
 
 void SandboxExtension::HandleArray::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(static_cast<uint64_t>(size()));
+    encoder << static_cast<uint64_t>(size());
     for (size_t i = 0; i < m_size; ++i)
-        encoder.encode(m_data[i]);
+        encoder << m_data[i];
     
 }
 
@@ -140,9 +140,10 @@ bool SandboxExtension::HandleArray::decode(CoreIPC::ArgumentDecoder* decoder, Sa
     if (!decoder->decodeUInt64(size))
         return false;
     handles.allocate(size);
-    for (size_t i = 0; i < size; i++)
+    for (size_t i = 0; i < size; i++) {
         if (!decoder->decode(handles[i]))
             return false;
+    }
     return true;
 }
 
index 4c28d22..797e130 100644 (file)
@@ -53,11 +53,11 @@ void SecItemRequestData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     encoder.encodeEnum(m_type);
 
-    CoreIPC::encode(&encoder, m_queryDictionary.get());
+    CoreIPC::encode(encoder, m_queryDictionary.get());
 
-    encoder.encode(static_cast<bool>(m_attributesToMatch));
+    encoder << static_cast<bool>(m_attributesToMatch);
     if (m_attributesToMatch)
-        CoreIPC::encode(&encoder, m_attributesToMatch.get());
+        CoreIPC::encode(encoder, m_attributesToMatch.get());
 }
 
 bool SecItemRequestData::decode(CoreIPC::ArgumentDecoder* decoder, SecItemRequestData& secItemRequestData)
index 6c4bad1..89dca79 100644 (file)
@@ -43,10 +43,10 @@ SecItemResponseData::SecItemResponseData(OSStatus resultCode, CFTypeRef resultOb
 
 void SecItemResponseData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(static_cast<int64_t>(m_resultCode));
-    encoder.encode(static_cast<bool>(m_resultObject.get()));
+    encoder << static_cast<int64_t>(m_resultCode);
+    encoder << static_cast<bool>(m_resultObject.get());
     if (m_resultObject)
-        CoreIPC::encode(&encoder, m_resultObject.get());
+        CoreIPC::encode(encoder, m_resultObject.get());
 }
 
 bool SecItemResponseData::decode(CoreIPC::ArgumentDecoder* decoder, SecItemResponseData& secItemResponseData)
index 2ee3e48..4f6d29a 100644 (file)
@@ -127,16 +127,16 @@ void SecKeychainItemRequestData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
     encoder.encodeEnum(m_type);
 
-    encoder.encode(static_cast<bool>(m_keychainItem));
+    encoder << static_cast<bool>(m_keychainItem);
     if (m_keychainItem)
-        CoreIPC::encode(&encoder, m_keychainItem.get());
+        CoreIPC::encode(encoder, m_keychainItem.get());
 
-    encoder.encode(static_cast<int32_t>(m_keychainAttributes.size()));
+    encoder << static_cast<int32_t>(m_keychainAttributes.size());
     for (size_t i = 0, count = m_keychainAttributes.size(); i < count; ++i)
-        CoreIPC::encode(&encoder, m_keychainAttributes[i]);
+        CoreIPC::encode(encoder, m_keychainAttributes[i]);
     
-    encoder.encode(static_cast<uint64_t>(m_itemClass));
-    m_dataReference.encode(encoder);
+    encoder << static_cast<uint64_t>(m_itemClass);
+    encoder << m_dataReference;
 }
 
 bool SecKeychainItemRequestData::decode(CoreIPC::ArgumentDecoder* decoder, SecKeychainItemRequestData& secKeychainItemRequestData)
@@ -171,9 +171,9 @@ bool SecKeychainItemRequestData::decode(CoreIPC::ArgumentDecoder* decoder, SecKe
     
     secKeychainItemRequestData.m_itemClass = static_cast<SecItemClass>(itemClass);
 
-    if (!CoreIPC::DataReference::decode(decoder, secKeychainItemRequestData.m_dataReference))
+    if (decoder->decode(secKeychainItemRequestData.m_dataReference))
         return false;
-        
+
     return true;
 }
 
index 495b301..1dea63b 100644 (file)
@@ -65,19 +65,19 @@ SecKeychainItemResponseData::SecKeychainItemResponseData(OSStatus resultCode)
 
 void SecKeychainItemResponseData::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(static_cast<int64_t>(m_resultCode));
-    encoder.encode(static_cast<uint32_t>(m_itemClass));
-    encoder.encode(static_cast<uint32_t>(m_attributes.size()));
+    encoder << static_cast<int64_t>(m_resultCode);
+    encoder << static_cast<uint32_t>(m_itemClass);
+    encoder << static_cast<uint32_t>(m_attributes.size());
     for (size_t i = 0, count = m_attributes.size(); i < count; ++i)
-        CoreIPC::encode(&encoder, m_attributes[i]);
+        CoreIPC::encode(encoder, m_attributes[i]);
 
-    encoder.encode(static_cast<bool>(m_data));
+    encoder << static_cast<bool>(m_data);
     if (m_data)
-        CoreIPC::encode(&encoder, m_data.get());
+        CoreIPC::encode(encoder, m_data.get());
 
-    encoder.encode(static_cast<bool>(m_keychainItem));
+    encoder << static_cast<bool>(m_keychainItem);
     if (m_keychainItem)
-        CoreIPC::encode(&encoder, m_keychainItem.get());
+        CoreIPC::encode(encoder, m_keychainItem.get());
 }
 
 bool SecKeychainItemResponseData::decode(CoreIPC::ArgumentDecoder* decoder, SecKeychainItemResponseData& secKeychainItemResponseData)
index 9f04ef9..6fc85a7 100644 (file)
@@ -47,7 +47,7 @@ void ArgumentCoder<ResourceRequest>::encodePlatformData(ArgumentEncoder* encoder
         return;
 
     RetainPtr<CFDictionaryRef> dictionary(AdoptCF, WKNSURLRequestCreateSerializableRepresentation(resourceRequest.nsURLRequest(), CoreIPC::tokenNullTypeRef()));
-    CoreIPC::encode(encoder, dictionary.get());
+    CoreIPC::encode(*encoder, dictionary.get());
 }
 
 bool ArgumentCoder<ResourceRequest>::decodePlatformData(ArgumentDecoder* decoder, ResourceRequest& resourceRequest)
@@ -82,7 +82,7 @@ void ArgumentCoder<ResourceResponse>::encodePlatformData(ArgumentEncoder* encode
         return;
 
     RetainPtr<CFDictionaryRef> dictionary(AdoptCF, WKNSURLResponseCreateSerializableRepresentation(resourceResponse.nsURLResponse(), CoreIPC::tokenNullTypeRef()));
-    CoreIPC::encode(encoder, dictionary.get());
+    CoreIPC::encode(*encoder, dictionary.get());
 }
 
 bool ArgumentCoder<ResourceResponse>::decodePlatformData(ArgumentDecoder* decoder, ResourceResponse& resourceResponse)
index a614091..b100319 100644 (file)
@@ -59,7 +59,7 @@ void ArgumentCoder<ResourceRequest>::encodePlatformData(ArgumentEncoder* encoder
         return;
 
     RetainPtr<CFDictionaryRef> dictionary(AdoptCF, wkCFURLRequestCreateSerializableRepresentation(resourceRequest.cfURLRequest(), CoreIPC::tokenNullTypeRef()));
-    CoreIPC::encode(encoder, dictionary.get());
+    CoreIPC::encode(*encoder, dictionary.get());
 #endif
 }
 
@@ -105,7 +105,7 @@ void ArgumentCoder<ResourceResponse>::encodePlatformData(ArgumentEncoder* encode
         return;
 
     RetainPtr<CFDictionaryRef> dictionary(AdoptCF, wkCFURLResponseCreateSerializableRepresentation(resourceResponse.cfURLResponse(), CoreIPC::tokenNullTypeRef()));
-    CoreIPC::encode(encoder, dictionary.get());
+    CoreIPC::encode(*encoder, dictionary.get());
 #endif
 }
 
index 6202608..7ff9978 100644 (file)
@@ -54,7 +54,7 @@ WebConnectionToWebProcess::WebConnectionToWebProcess(WebProcessProxy* process, C
 
 void WebConnectionToWebProcess::encodeMessageBody(CoreIPC::ArgumentEncoder& encoder, APIObject* messageBody)
 {
-    encoder.encode(WebContextUserMessageEncoder(messageBody));
+    encoder << WebContextUserMessageEncoder(messageBody);
 }
 
 bool WebConnectionToWebProcess::decodeMessageBody(CoreIPC::ArgumentDecoder& decoder, RefPtr<APIObject>& messageBody)
index 8d684c4..761c4a4 100644 (file)
@@ -55,17 +55,17 @@ public:
         switch (type) {
         case APIObject::TypePage: {
             WebPageProxy* page = static_cast<WebPageProxy*>(m_root);
-            encoder.encode(page->pageID());
+            encoder << page->pageID();
             break;
         }
         case APIObject::TypeFrame: {
             WebFrameProxy* frame = static_cast<WebFrameProxy*>(m_root);
-            encoder.encode(frame->frameID());
+            encoder << frame->frameID();
             break;
         }
         case APIObject::TypePageGroup: {
             WebPageGroup* pageGroup = static_cast<WebPageGroup*>(m_root);
-            encoder.encode(pageGroup->data());
+            encoder << pageGroup->data();
             break;
         }
         default:
index c5d56f1..c3fb18d 100644 (file)
@@ -58,17 +58,17 @@ public:
         switch (type) {
         case APIObject::TypeBundlePage: {
             WebPage* page = static_cast<WebPage*>(m_root);
-            encoder.encode(page->pageID());
+            encoder << page->pageID();
             break;
         }
         case APIObject::TypeBundleFrame: {
             WebFrame* frame = static_cast<WebFrame*>(m_root);
-            encoder.encode(frame->frameID());
+            encoder << frame->frameID();
             break;
         }
         case APIObject::TypeBundlePageGroup: {
             WebPageGroupProxy* pageGroup = static_cast<WebPageGroupProxy*>(m_root);
-            encoder.encode(pageGroup->pageGroupID());
+            encoder << pageGroup->pageGroupID();
             break;
         }
         default:
index ee02bbb..12e0b3d 100644 (file)
@@ -34,12 +34,12 @@ namespace WebKit {
 
 void Plugin::Parameters::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    encoder.encode(url.string());
-    encoder.encode(names);
-    encoder.encode(values);
-    encoder.encode(mimeType);
-    encoder.encode(isFullFramePlugin);
-    encoder.encode(shouldUseManualLoader);
+    encoder << url.string();
+    encoder << names;
+    encoder << values;
+    encoder << mimeType;
+    encoder << isFullFramePlugin;
+    encoder << shouldUseManualLoader;
 #if PLATFORM(MAC)
     encoder.encodeEnum(layerHostingMode);
 #endif
index 538007d..8b65c26 100644 (file)
@@ -51,7 +51,7 @@ WebConnectionToUIProcess::WebConnectionToUIProcess(WebProcess* process, CoreIPC:
 
 void WebConnectionToUIProcess::encodeMessageBody(CoreIPC::ArgumentEncoder& encoder, APIObject* messageBody)
 {
-    encoder.encode(InjectedBundleUserMessageEncoder(messageBody));
+    encoder << InjectedBundleUserMessageEncoder(messageBody);
 }
 
 bool WebConnectionToUIProcess::decodeMessageBody(CoreIPC::ArgumentDecoder& decoder, RefPtr<APIObject>& messageBody)