Skip to content

Commit

Permalink
Add support for DictionaryPopupInfo in the new IPC serialization format
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=245471
rdar://100219507

Reviewed by Alex Christensen.

Add support for DictionaryPopupInfo in the new IPC serialization format.
This change also includes adding support for referencing Objective-C types
in the GeneratedSerializer files.

* Source/WebCore/editing/DictionaryPopupInfo.h:
(WebCore::DictionaryPopupInfo::encodingRequiresPlatformData const): Deleted.
* Source/WebCore/editing/cocoa/DictionaryLookup.mm:
(WebCore::showPopupOrCreateAnimationController):
* Source/WebCore/editing/mac/DictionaryLookupLegacy.mm:
(WebCore::showPopupOrCreateAnimationController):
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Scripts/generate-serializers.py:
(generate_impl):
(parse_serialized_types):
(main):
(generate_cpp): Deleted.
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.serialization.in: Added.
* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TextIndicatorData>::decode):
(IPC::ArgumentCoder<DictionaryPopupInfo>::encode): Deleted.
(IPC::ArgumentCoder<DictionaryPopupInfo>::decode): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _animationControllerForText]):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showDefinitionForAttributedString):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin):
* Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm:
(+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
(-[WebImmediateActionController _animationControllerForText]):
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _animationControllerForDictionaryLookupPopupInfo:]):
(-[WebView _showDictionaryLookupPopup:]):

Canonical link: https://commits.webkit.org/254768@main
  • Loading branch information
gavin-apple authored and achristensen07 committed Sep 22, 2022
1 parent f1bf39d commit 89eea21
Show file tree
Hide file tree
Showing 22 changed files with 104 additions and 120 deletions.
14 changes: 8 additions & 6 deletions Source/WebCore/editing/DictionaryPopupInfo.h
Expand Up @@ -34,16 +34,18 @@ OBJC_CLASS NSDictionary;

namespace WebCore {

struct DictionaryPopupInfo {
FloatPoint origin;
TextIndicatorData textIndicator;
#if PLATFORM(COCOA)
struct DictionaryPopupInfoCocoa {
RetainPtr<NSDictionary> options;
RetainPtr<NSAttributedString> attributedString;
};
#endif

bool encodingRequiresPlatformData() const { return true; }
#else
bool encodingRequiresPlatformData() const { return false; }
struct DictionaryPopupInfo {
FloatPoint origin;
TextIndicatorData textIndicator;
#if PLATFORM(COCOA)
DictionaryPopupInfoCocoa platformData;
#endif
};

Expand Down
8 changes: 4 additions & 4 deletions Source/WebCore/editing/cocoa/DictionaryLookup.mm
Expand Up @@ -430,7 +430,7 @@ static WKRevealController showPopupOrCreateAnimationController(bool createAnimat
return nil;

auto mutableOptions = adoptNS([[NSMutableDictionary alloc] init]);
if (NSDictionary *options = dictionaryPopupInfo.options.get())
if (NSDictionary *options = dictionaryPopupInfo.platformData.options.get())
[mutableOptions addEntriesFromDictionary:options];

auto textIndicator = TextIndicator::create(dictionaryPopupInfo.textIndicator);
Expand Down Expand Up @@ -461,9 +461,9 @@ static WKRevealController showPopupOrCreateAnimationController(bool createAnimat
pointerLocation = [view convertPoint:textBaselineOrigin toView:nil];
}

auto webHighlight = adoptNS([[WebRevealHighlight alloc] initWithHighlightRect: highlightRect useDefaultHighlight:!textIndicator.get().contentImage() attributedString:dictionaryPopupInfo.attributedString.get()]);
auto webHighlight = adoptNS([[WebRevealHighlight alloc] initWithHighlightRect: highlightRect useDefaultHighlight:!textIndicator.get().contentImage() attributedString:dictionaryPopupInfo.platformData.attributedString.get()]);
auto context = adoptNS([PAL::allocRVPresentingContextInstance() initWithPointerLocationInView:pointerLocation inView:view highlightDelegate:webHighlight.get()]);
auto item = adoptNS([PAL::allocRVItemInstance() initWithText:dictionaryPopupInfo.attributedString.get().string selectedRange:NSMakeRange(0, dictionaryPopupInfo.attributedString.get().string.length)]);
auto item = adoptNS([PAL::allocRVItemInstance() initWithText:dictionaryPopupInfo.platformData.attributedString.get().string selectedRange:NSMakeRange(0, dictionaryPopupInfo.platformData.attributedString.get().string.length)]);

if (clearTextIndicator) {
[webHighlight setClearTextIndicator:[clearTextIndicator = WTFMove(clearTextIndicator)] {
Expand All @@ -483,7 +483,7 @@ static WKRevealController showPopupOrCreateAnimationController(bool createAnimat
ASSERT_UNUSED(createAnimationController, !createAnimationController);
auto textIndicator = TextIndicator::create(dictionaryPopupInfo.textIndicator);
auto webHighlight = adoptNS([[WebRevealHighlight alloc] initWithHighlightRect:[view convertRect:textIndicator->selectionRectInRootViewCoordinates() toView:nil] view:view image:textIndicator->contentImage()]);
auto item = adoptNS([PAL::allocRVItemInstance() initWithText:dictionaryPopupInfo.attributedString.get().string selectedRange:NSMakeRange(0, dictionaryPopupInfo.attributedString.get().string.length)]);
auto item = adoptNS([PAL::allocRVItemInstance() initWithText:dictionaryPopupInfo.platformData.attributedString.get().string selectedRange:NSMakeRange(0, dictionaryPopupInfo.platformData.attributedString.get().string.length)]);

[UINSSharedRevealController() revealItem:item.get() locationInWindow:dictionaryPopupInfo.origin window:view.window highlighter:webHighlight.get()];
return nil;
Expand Down
10 changes: 5 additions & 5 deletions Source/WebCore/editing/mac/DictionaryLookupLegacy.mm
Expand Up @@ -207,7 +207,7 @@ static void expandSelectionByCharacters(PDFSelection *selection, NSInteger numbe
return nil;

RetainPtr<NSMutableDictionary> mutableOptions = adoptNS([[NSMutableDictionary alloc] init]);
if (NSDictionary *options = dictionaryPopupInfo.options.get())
if (NSDictionary *options = dictionaryPopupInfo.platformData.options.get())
[mutableOptions addEntriesFromDictionary:options];

auto textIndicator = TextIndicator::create(dictionaryPopupInfo.textIndicator);
Expand All @@ -222,9 +222,9 @@ static void expandSelectionByCharacters(PDFSelection *selection, NSInteger numbe
textBoundingRectInViewCoordinates = rootViewToViewConversionCallback(textBoundingRectInViewCoordinates);
firstTextRectInViewCoordinates.moveBy(textBoundingRectInViewCoordinates.location());
if (createAnimationController)
return [PAL::getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()];
return [PAL::getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.platformData.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()];

[PAL::getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()];
[PAL::getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.platformData.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()];
return nil;
}

Expand All @@ -235,9 +235,9 @@ static void expandSelectionByCharacters(PDFSelection *selection, NSInteger numbe
textBaselineOrigin = [view.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin;

if (createAnimationController)
return [PAL::getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
return [PAL::getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.platformData.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()];

[PAL::getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
[PAL::getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.platformData.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()];
return nil;

END_BLOCK_OBJC_EXCEPTIONS
Expand Down
3 changes: 3 additions & 0 deletions Source/WebKit/CMakeLists.txt
Expand Up @@ -522,6 +522,8 @@ set(WebKit_SERIALIZATION_IN_FILES

Shared/API/APIGeometry.serialization.in

Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in

Shared/WebGPU/WebGPUBindGroupEntry.serialization.in
Shared/WebGPU/WebGPUBlendComponent.serialization.in
Shared/WebGPU/WebGPUBlendState.serialization.in
Expand All @@ -532,6 +534,7 @@ set(WebKit_SERIALIZATION_IN_FILES
Shared/WebGPU/WebGPUColorTargetState.serialization.in
Shared/WebGPU/WebGPUComputePassTimestampWrites.serialization.in
Shared/WebGPU/WebGPUObjectDescriptorBase.serialization.in

Shared/WebGPU/WebGPUOrigin3D.serialization.in
Shared/WebGPU/WebGPUPrimitiveState.serialization.in
Shared/WebGPU/WebGPUProgrammableStage.serialization.in
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/DerivedSources-input.xcfilelist
Expand Up @@ -131,6 +131,7 @@ $(PROJECT_DIR)/Shared/API/Cocoa/RemoteObjectRegistry.messages.in
$(PROJECT_DIR)/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in
$(PROJECT_DIR)/Shared/Authentication/AuthenticationManager.messages.in
$(PROJECT_DIR)/Shared/AuxiliaryProcess.messages.in
$(PROJECT_DIR)/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in
$(PROJECT_DIR)/Shared/FrameInfoData.serialization.in
$(PROJECT_DIR)/Shared/FrameTreeNodeData.serialization.in
$(PROJECT_DIR)/Shared/HTTPSUpgrade/HTTPSUpgradeList.txt
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/DerivedSources-output.xcfilelist
Expand Up @@ -48,6 +48,7 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/GPUProcessProxyMessages.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/GPUProcessProxyMessagesReplies.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/GeneratedSerializers.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/GeneratedSerializers.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/GeneratedSerializers.mm
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/IPCConnectionTesterMessageReceiver.cpp
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/IPCConnectionTesterMessages.h
$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/IPCConnectionTesterMessagesReplies.h
Expand Down
5 changes: 3 additions & 2 deletions Source/WebKit/DerivedSources.make
Expand Up @@ -450,6 +450,7 @@ $(WEB_PREFERENCES_PATTERNS) : $(WTF_BUILD_SCRIPTS_DIR)/GeneratePreferences.rb $(
SERIALIZATION_DESCRIPTION_FILES = \
NetworkProcess/NetworkProcessCreationParameters.serialization.in \
Shared/API/APIGeometry.serialization.in \
Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in \
Shared/FrameInfoData.serialization.in \
Shared/FrameTreeNodeData.serialization.in \
Shared/LayerTreeContext.serialization.in \
Expand Down Expand Up @@ -483,7 +484,7 @@ SERIALIZATION_DESCRIPTION_FILES = \
Shared/WebGPU/WebGPUBindGroupEntry.serialization.in \
#

all : GeneratedSerializers.h GeneratedSerializers.cpp SerializedTypeInfo.cpp
all : GeneratedSerializers.h GeneratedSerializers.cpp GeneratedSerializers.mm SerializedTypeInfo.cpp

GeneratedSerializers.h GeneratedSerializers.cpp SerializedTypeInfo.cpp : $(WebKit2)/Scripts/generate-serializers.py $(SERIALIZATION_DESCRIPTION_FILES) $(WebKit2)/DerivedSources.make
GeneratedSerializers.h GeneratedSerializers.cpp GeneratedSerializers.mm SerializedTypeInfo.cpp : $(WebKit2)/Scripts/generate-serializers.py $(SERIALIZATION_DESCRIPTION_FILES) $(WebKit2)/DerivedSources.make
$(PYTHON) $(WebKit2)/Scripts/generate-serializers.py $(WebKit2)/ $(SERIALIZATION_DESCRIPTION_FILES)
37 changes: 22 additions & 15 deletions Source/WebKit/Scripts/generate-serializers.py
Expand Up @@ -191,7 +191,7 @@ def generate_header(serialized_types, serialized_enums):
return '\n'.join(result)


def generate_cpp(serialized_types, serialized_enums, headers):
def generate_impl(serialized_types, serialized_enums, headers):
result = []
result.append(_license_header)
result.append('#include "config.h"')
Expand Down Expand Up @@ -333,7 +333,6 @@ def generate_cpp(serialized_types, serialized_enums, headers):
result.append('')
return '\n'.join(result)


def generate_serialized_type_info(serialized_types, serialized_enums, headers):
result = []
result.append(_license_header)
Expand Down Expand Up @@ -393,6 +392,7 @@ def parse_serialized_types(file, file_name):
member_condition = None
struct_or_class = None
underlying_type = None
file_extension = "cpp"

for line in file:
line = line.strip()
Expand Down Expand Up @@ -433,6 +433,10 @@ def parse_serialized_types(file, file_name):
for header in match.group(1).split():
headers.append(ConditionalHeader(header, None))
continue
match = re.search(r'file_extension?: (.*)', line)
if match:
file_extension = match.groups()
continue

match = re.search(r'(.*)enum class (.*)::(.*) : (.*) {', line)
if match:
Expand Down Expand Up @@ -471,30 +475,33 @@ def parse_serialized_types(file, file_name):
members.append(MemberVariable(member_type, member_name, member_condition, []))
if len(headers) == 0 and len(serialized_types) <= 1:
headers = [ConditionalHeader('"' + file_name[0:len(file_name) - len('.serialization.in')] + '.h"', None)]
return [serialized_types, serialized_enums, headers]
return [serialized_types, serialized_enums, headers, file_extension]


def main(argv):
serialized_types = []
serialized_enums = []
headers = []
serialized_types = {}
serialized_enums = {}
headers = {}
file_extensions = set()
for i in range(2, len(argv)):
with open(argv[1] + argv[i]) as file:
new_types, new_enums, new_headers = parse_serialized_types(file, argv[i])
new_types, new_enums, new_headers, file_extension = parse_serialized_types(file, argv[i])
file_extensions.add(file_extension)
for type in new_types:
serialized_types.append(type)
serialized_types.setdefault(file_extension, []).append(type)
for enum in new_enums:
serialized_enums.append(enum)
serialized_enums.setdefault(file_extension, []).append(enum)
for header in new_headers:
headers.append(header)
headers.sort()
headers.setdefault(file_extension, []).append(header)
[v.sort() for v in headers.values()]

with open('GeneratedSerializers.h', "w+") as header_output:
header_output.write(generate_header(serialized_types, serialized_enums))
with open('GeneratedSerializers.cpp', "w+") as cpp_output:
cpp_output.write(generate_cpp(serialized_types, serialized_enums, headers))
header_output.write(generate_header(sum(serialized_types.values(), []), sum(serialized_enums.values(), [])))
for file_extension in file_extensions:
with open('GeneratedSerializers.%s' % file_extension, "w+") as output:
output.write(generate_impl(serialized_types.get(file_extension, []), serialized_enums.get(file_extension, []), headers.get(file_extension, [])))
with open('SerializedTypeInfo.cpp', "w+") as cpp_output:
cpp_output.write(generate_serialized_type_info(serialized_types, serialized_enums, headers))
cpp_output.write(generate_serialized_type_info(sum(serialized_types.values(), []), serialized_enums.get("cpp", []), headers.get("cpp", [])))
return 0


Expand Down
14 changes: 0 additions & 14 deletions Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm
Expand Up @@ -432,20 +432,6 @@

#endif // ENABLE(APPLEPAY)

void ArgumentCoder<WebCore::DictionaryPopupInfo>::encodePlatformData(Encoder& encoder, const WebCore::DictionaryPopupInfo& info)
{
encoder << info.options << info.attributedString;
}

bool ArgumentCoder<WebCore::DictionaryPopupInfo>::decodePlatformData(Decoder& decoder, WebCore::DictionaryPopupInfo& result)
{
if (!IPC::decode(decoder, result.options))
return false;
if (!IPC::decode(decoder, result.attributedString))
return false;
return true;
}

void ArgumentCoder<WebCore::Font>::encodePlatformData(Encoder& encoder, const WebCore::Font& font)
{
const auto& platformData = font.platformData();
Expand Down
@@ -0,0 +1,30 @@
# Copyright (C) 2022 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

file_extension: mm
headers: "ArgumentCodersCocoa.h"

header: <WebCore/DictionaryPopupInfo.h>
struct WebCore::DictionaryPopupInfoCocoa {
RetainPtr<NSDictionary> options;
RetainPtr<NSAttributedString> attributedString;
};
33 changes: 0 additions & 33 deletions Source/WebKit/Shared/WebCoreArgumentCoders.cpp
Expand Up @@ -1990,39 +1990,6 @@ bool ArgumentCoder<MediaPlaybackTargetContext>::decode(Decoder& decoder, MediaPl
}
#endif

void ArgumentCoder<DictionaryPopupInfo>::encode(IPC::Encoder& encoder, const DictionaryPopupInfo& info)
{
encoder << info.origin;
encoder << info.textIndicator;

if (info.encodingRequiresPlatformData()) {
encoder << true;
encodePlatformData(encoder, info);
return;
}

encoder << false;
}

bool ArgumentCoder<DictionaryPopupInfo>::decode(IPC::Decoder& decoder, DictionaryPopupInfo& result)
{
if (!decoder.decode(result.origin))
return false;

std::optional<TextIndicatorData> textIndicator;
decoder >> textIndicator;
if (!textIndicator)
return false;
result.textIndicator = WTFMove(*textIndicator);

bool hasPlatformData;
if (!decoder.decode(hasPlatformData))
return false;
if (hasPlatformData)
return decodePlatformData(decoder, result);
return true;
}

void ArgumentCoder<ExceptionDetails>::encode(IPC::Encoder& encoder, const ExceptionDetails& info)
{
encoder << info.message;
Expand Down
7 changes: 0 additions & 7 deletions Source/WebKit/Shared/WebCoreArgumentCoders.h
Expand Up @@ -502,13 +502,6 @@ template<> struct ArgumentCoder<WebCore::TextIndicatorData> {
static std::optional<WebCore::TextIndicatorData> decode(Decoder&);
};

template<> struct ArgumentCoder<WebCore::DictionaryPopupInfo> {
static void encode(Encoder&, const WebCore::DictionaryPopupInfo&);
static WARN_UNUSED_RETURN bool decode(Decoder&, WebCore::DictionaryPopupInfo&);
static void encodePlatformData(Encoder&, const WebCore::DictionaryPopupInfo&);
static WARN_UNUSED_RETURN bool decodePlatformData(Decoder&, WebCore::DictionaryPopupInfo&);
};

#if ENABLE(WIRELESS_PLAYBACK_TARGET)
template<> struct ArgumentCoder<WebCore::MediaPlaybackTargetContext> {
static void encode(Encoder&, const WebCore::MediaPlaybackTargetContext&);
Expand Down
9 changes: 9 additions & 0 deletions Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
Expand Up @@ -480,3 +480,12 @@ header: <WebCore/LayoutSize.h>
WebCore::LayoutUnit width();
WebCore::LayoutUnit height();
}

header: <WebCore/DictionaryPopupInfo.h>
struct WebCore::DictionaryPopupInfo {
WebCore::FloatPoint origin;
WebCore::TextIndicatorData textIndicator;
#if PLATFORM(COCOA)
WebCore::DictionaryPopupInfoCocoa platformData;
#endif
};
11 changes: 0 additions & 11 deletions Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp
Expand Up @@ -216,17 +216,6 @@ std::optional<CurlProxySettings> ArgumentCoder<CurlProxySettings>::decode(Decode
return CurlProxySettings { WTFMove(url), WTFMove(ignoreHosts) };
}

void ArgumentCoder<DictionaryPopupInfo>::encodePlatformData(Encoder&, const DictionaryPopupInfo&)
{
ASSERT_NOT_REACHED();
}

bool ArgumentCoder<DictionaryPopupInfo>::decodePlatformData(Decoder&, DictionaryPopupInfo&)
{
ASSERT_NOT_REACHED();
return false;
}

#if ENABLE(VIDEO)
void ArgumentCoder<SerializedPlatformDataCueValue>::encodePlatformData(Encoder& encoder, const SerializedPlatformDataCueValue& value)
{
Expand Down
11 changes: 0 additions & 11 deletions Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp
Expand Up @@ -215,17 +215,6 @@ bool ArgumentCoder<Credential>::decodePlatformData(Decoder& decoder, Credential&
return true;
}

void ArgumentCoder<DictionaryPopupInfo>::encodePlatformData(Encoder&, const DictionaryPopupInfo&)
{
ASSERT_NOT_REACHED();
}

bool ArgumentCoder<DictionaryPopupInfo>::decodePlatformData(Decoder&, DictionaryPopupInfo&)
{
ASSERT_NOT_REACHED();
return false;
}

void ArgumentCoder<Font>::encodePlatformData(Encoder&, const Font&)
{
ASSERT_NOT_REACHED();
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/mac/WKImmediateActionController.mm
Expand Up @@ -480,7 +480,7 @@ - (NSSize)menuItem:(NSMenuItem *)menuItem maxSizeForPoint:(NSPoint)point
return nil;

WebCore::DictionaryPopupInfo dictionaryPopupInfo = _hitTestResultData.dictionaryPopupInfo;
if (!dictionaryPopupInfo.attributedString)
if (!dictionaryPopupInfo.platformData.attributedString)
return nil;

_viewImpl->prepareForDictionaryLookup();
Expand Down

0 comments on commit 89eea21

Please sign in to comment.