bool ContextMenuContextData::decode(IPC::ArgumentDecoder& decoder, ContextMenuContextData& result) { if (!decoder.decode(result.m_menuLocation)) return false; if (!decoder.decode(result.m_menuItems)) return false; if (!decoder.decode(result.m_webHitTestResultData)) return false; if (!decoder.decode(result.m_selectedText)) return false; #if ENABLE(SERVICE_CONTROLS) ShareableBitmap::Handle handle; if (!decoder.decode(handle)) return false; if (!handle.isNull()) result.m_controlledImage = ShareableBitmap::create(handle, SharedMemory::Protection::ReadOnly); #endif return true; }
bool WebPreferencesStore::decode(IPC::ArgumentDecoder& decoder, WebPreferencesStore& result) { if (!decoder.decode(result.m_values)) return false; if (!decoder.decode(result.m_overridenDefaults)) return false; return true; }
bool PageState::decode(IPC::ArgumentDecoder& decoder, PageState& result) { if (!decoder.decode(result.title)) return false; if (!decoder.decode(result.mainFrameState)) return false; return true; }
bool BackForwardListState::decode(IPC::ArgumentDecoder& decoder, BackForwardListState& result) { if (!decoder.decode(result.items)) return false; if (!decoder.decode(result.currentIndex)) return false; return true; }
bool HTTPBody::decode(IPC::ArgumentDecoder& decoder, HTTPBody& result) { if (!decoder.decode(result.contentType)) return false; if (!decoder.decode(result.elements)) return false; return true; }
bool WebsiteData::decode(IPC::ArgumentDecoder& decoder, WebsiteData& result) { if (!decoder.decode(result.entries)) return false; if (!decoder.decode(result.hostNamesWithCookies)) return false; return true; }
bool BackForwardListItemState::decode(IPC::ArgumentDecoder& decoder, BackForwardListItemState& result) { if (!decoder.decode(result.identifier)) return false; if (!decoder.decode(result.pageState)) return false; return true; }
bool WebScriptMessageHandlerHandle::decode(IPC::ArgumentDecoder& decoder, WebScriptMessageHandlerHandle& handle) { if (!decoder.decode(handle.identifier)) return false; if (!decoder.decode(handle.name)) return false; return true; }
bool WebUserStyleSheetData::decode(IPC::ArgumentDecoder& decoder, WebUserStyleSheetData& data) { if (!decoder.decode(data.identifier)) return false; if (!decoder.decode(data.worldIdentifier)) return false; if (!decoder.decode(data.userStyleSheet)) return false; return true; }
bool ShareableBitmap::Handle::decode(IPC::ArgumentDecoder& decoder, Handle& handle) { if (!decoder.decode(handle.m_handle)) return false; if (!decoder.decode(handle.m_size)) return false; if (!decoder.decode(handle.m_flags)) return false; return true; }
bool ShareableResource::Handle::decode(IPC::ArgumentDecoder& decoder, Handle& handle) { if (!decoder.decode(handle.m_handle)) return false; if (!decoder.decode(handle.m_offset)) return false; if (!decoder.decode(handle.m_size)) return false; return true; }
bool WebCompiledContentExtensionData::decode(IPC::ArgumentDecoder& decoder, WebCompiledContentExtensionData& compiledContentExtensionData) { SharedMemory::Handle handle; if (!decoder.decode(handle)) return false; compiledContentExtensionData.data = SharedMemory::map(handle, SharedMemory::Protection::ReadOnly); if (!decoder.decode(compiledContentExtensionData.actionsOffset)) return false; if (!decoder.decode(compiledContentExtensionData.actionsSize)) return false; if (!decoder.decode(compiledContentExtensionData.filtersWithoutDomainsBytecodeOffset)) return false; if (!decoder.decode(compiledContentExtensionData.filtersWithoutDomainsBytecodeSize)) return false; if (!decoder.decode(compiledContentExtensionData.filtersWithDomainsBytecodeOffset)) return false; if (!decoder.decode(compiledContentExtensionData.filtersWithDomainsBytecodeSize)) return false; if (!decoder.decode(compiledContentExtensionData.domainFiltersBytecodeOffset)) return false; if (!decoder.decode(compiledContentExtensionData.domainFiltersBytecodeSize)) return false; return true; }
bool SecurityOriginData::decode(IPC::ArgumentDecoder& decoder, SecurityOriginData& securityOriginData) { if (!decoder.decode(securityOriginData.protocol)) return false; if (!decoder.decode(securityOriginData.host)) return false; if (!decoder.decode(securityOriginData.port)) return false; return true; }
bool PageState::decode(IPC::ArgumentDecoder& decoder, PageState& result) { if (!decoder.decode(result.title)) return false; if (!decoder.decode(result.mainFrameState)) return false; if (!decoder.decodeEnum(result.shouldOpenExternalURLsPolicy) || !isValidEnum(result.shouldOpenExternalURLsPolicy)) return false; return true; }
bool WebPageGroupData::decode(IPC::ArgumentDecoder& decoder, WebPageGroupData& data) { if (!decoder.decode(data.identifier)) return false; if (!decoder.decode(data.pageGroupID)) return false; if (!decoder.decode(data.visibleToInjectedBundle)) return false; if (!decoder.decode(data.visibleToHistoryClient)) return false; if (!decoder.decode(data.userContentControllerIdentifier)) return false; return true; }
bool WebGestureEvent::decode(IPC::ArgumentDecoder& decoder, WebGestureEvent& result) { if (!WebEvent::decode(decoder, result)) return false; if (!decoder.decode(result.m_position)) return false; if (!decoder.decode(result.m_gestureScale)) return false; if (!decoder.decode(result.m_gestureRotation)) return false; return true; }
bool PlatformPopupMenuData::decode(IPC::ArgumentDecoder& decoder, PlatformPopupMenuData& data) { #if PLATFORM(COCOA) if (!decoder.decode(data.fontInfo)) return false; if (!decoder.decode(data.shouldPopOver)) return false; #else UNUSED_PARAM(decoder); UNUSED_PARAM(data); #endif return true; }
bool RemoteScrollingCoordinatorTransaction::decode(IPC::ArgumentDecoder& decoder) { int numNodes; if (!decoder.decode(numNodes)) return false; bool hasNewRootNode; if (!decoder.decode(hasNewRootNode)) return false; m_scrollingStateTree = ScrollingStateTree::create(); for (int i = 0; i < numNodes; ++i) { ScrollingNodeType nodeType; if (!decoder.decodeEnum(nodeType)) return false; ScrollingNodeID nodeID; if (!decoder.decode(nodeID)) return false; ScrollingNodeID parentNodeID; if (!decoder.decode(parentNodeID)) return false; m_scrollingStateTree->attachNode(nodeType, nodeID, parentNodeID); ScrollingStateNode* newNode = m_scrollingStateTree->stateNodeForID(nodeID); ASSERT(newNode); ASSERT(!parentNodeID || newNode->parent()); switch (nodeType) { case FrameScrollingNode: case OverflowScrollingNode: if (!decoder.decode(*toScrollingStateScrollingNode(newNode))) return false; break; case FixedNode: if (!decoder.decode(*toScrollingStateFixedNode(newNode))) return false; break; case StickyNode: if (!decoder.decode(*toScrollingStateStickyNode(newNode))) return false; break; } } m_scrollingStateTree->setHasNewRootStateNode(hasNewRootNode); // Removed nodes Vector<ScrollingNodeID> removedNodes; if (!decoder.decode(removedNodes)) return false; if (removedNodes.size()) m_scrollingStateTree->setRemovedNodes(removedNodes); return true; }
bool SharedMemory::Handle::decode(IPC::ArgumentDecoder& decoder, Handle& handle) { ASSERT(!handle.m_port); ASSERT(!handle.m_size); uint64_t size; if (!decoder.decode(size)) return false; IPC::MachPort machPort; if (!decoder.decode(machPort)) return false; handle.m_size = size; handle.m_port = machPort.port(); return true; }
bool WebCoordinatedSurface::Handle::decode(IPC::ArgumentDecoder& decoder, Handle& handle) { if (!decoder.decode(handle.m_size)) return false; if (!decoder.decode(handle.m_flags)) return false; #if USE(GRAPHICS_SURFACE) if (!decoder.decode(handle.m_graphicsSurfaceToken)) return false; if (handle.m_graphicsSurfaceToken.isValid()) return true; #endif if (!decoder.decode(handle.m_bitmapHandle)) return false; return true; }
bool URLResponse::decode(IPC::ArgumentDecoder& decoder, RefPtr<Object>& result) { ResourceResponse response; if (!decoder.decode(response)) return false; result = create(response); return true; }
bool Data::decode(IPC::ArgumentDecoder& decoder, RefPtr<API::Object>& result) { IPC::DataReference dataReference; if (!decoder.decode(dataReference)) return false; result = create(dataReference.data(), dataReference.size()); return true; }
bool PageGroupHandle::decode(IPC::ArgumentDecoder& decoder, RefPtr<Object>& result) { WebKit::WebPageGroupData webPageGroupData; if (!decoder.decode(webPageGroupData)) return false; result = create(WTFMove(webPageGroupData)); return true; }
bool OptionItem::decode(IPC::ArgumentDecoder& decoder, OptionItem& result) { if (!decoder.decode(result.text)) return false; if (!decoder.decode(result.isGroup)) return false; if (!decoder.decode(result.isSelected)) return false; if (!decoder.decode(result.disabled)) return false; if (!decoder.decode(result.parentGroupID)) return false; return true; }
bool WebPreferencesStore::Value::decode(IPC::ArgumentDecoder& decoder, Value& result) { Value::Type type; if (!decoder.decodeEnum(type)) return false; switch (type) { case Type::None: break; case Type::String: { String value; if (!decoder.decode(value)) return false; result = Value(value); break; } case Type::Bool: { bool value; if (!decoder.decode(value)) return false; result = Value(value); break; } case Type::UInt32: { uint32_t value; if (!decoder.decode(value)) return false; result = Value(value); break; } case Type::Double: { double value; if (!decoder.decode(value)) return false; result = Value(value); break; } default: return false; } return true; }
bool WebTouchEvent::decode(IPC::ArgumentDecoder& decoder, WebTouchEvent& result) { if (!WebEvent::decode(decoder, result)) return false; if (!decoder.decode(result.m_touchPoints)) return false; return true; }
bool WebContextMenuItemData::decode(IPC::ArgumentDecoder& decoder, WebContextMenuItemData& item) { WebCore::ContextMenuItemType type; if (!decoder.decodeEnum(type)) return false; WebCore::ContextMenuAction action; if (!decoder.decodeEnum(action)) return false; String title; if (!decoder.decode(title)) return false; bool checked; if (!decoder.decode(checked)) return false; bool enabled; if (!decoder.decode(enabled)) return false; Vector<WebContextMenuItemData> submenu; if (!decoder.decode(submenu)) return false; switch (type) { case WebCore::ActionType: case WebCore::SeparatorType: case WebCore::CheckableActionType: item = WebContextMenuItemData(type, action, title, enabled, checked); break; case WebCore::SubmenuType: item = WebContextMenuItemData(action, title, enabled, submenu); break; default: ASSERT_NOT_REACHED(); return false; } return true; }
bool SharedMemory::Handle::decode(IPC::ArgumentDecoder& decoder, Handle& handle) { ASSERT_ARG(handle, handle.isNull()); IPC::Attachment attachment; if (!decoder.decode(attachment)) return false; handle.adoptAttachment(WTFMove(attachment)); return true; }
bool WebsiteData::Entry::decode(IPC::ArgumentDecoder& decoder, WebsiteData::Entry& result) { SecurityOriginData securityOriginData; if (!decoder.decode(securityOriginData)) return false; if (!decoder.decodeEnum(result.type)) return false; result.origin = securityOriginData.securityOrigin(); return true; }
bool SharedMemory::Handle::decode(IPC::ArgumentDecoder& decoder, Handle& handle) { ASSERT_ARG(handle, !handle.m_size); ASSERT_ARG(handle, handle.isNull()); IPC::Attachment attachment; if (!decoder.decode(attachment)) return false; handle.adoptFromAttachment(attachment.releaseFileDescriptor(), attachment.size()); return true; }