[webkit-changes] [WebKit/WebKit] 249189: Generate CGColor serialization
Brady Eidson
noreply at github.com
Mon Oct 30 17:59:39 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2491896493663e307f90dc6be53672e9ca59c4ef
https://github.com/WebKit/WebKit/commit/2491896493663e307f90dc6be53672e9ca59c4ef
Author: Brady Eidson <beidson at apple.com>
Date: 2023-10-30 (Mon, 30 Oct 2023)
Changed paths:
M Source/WebKit/Scripts/generate-serializers.py
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp
M Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h
M Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in
M Source/WebKit/Shared/cf/ArgumentCodersCF.cpp
M Source/WebKit/Shared/cf/ArgumentCodersCF.h
M Source/WebKit/Shared/cf/CFTypes.serialization.in
M Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm
Log Message:
-----------
Generate CGColor serialization
https://bugs.webkit.org/show_bug.cgi?id=263932
rdar://117709336
Reviewed by David Kilzer.
WebCore::Color is already an appropriate wrapper class for CGColorRef.
But to use it, I needed to change generate-serializers.py to allow for:
- Fully custom "toCF" function
- Custom "fromCF" function
- Add an arbitrary forward declaration to the generated header.
With those changes, the actual code changes to WebKit are pure deletion.
* Source/WebKit/Scripts/generate-serializers.py:
(SerializedType.__init__):
(ConditionalForwardDeclaration):
(ConditionalForwardDeclaration.__init__):
(ConditionalForwardDeclaration.__lt__):
(ConditionalForwardDeclaration.__lt__.condition_str):
(ConditionalForwardDeclaration.__eq__):
(ConditionalForwardDeclaration.__hash__):
(generate_header):
(encode_cf_type):
(decode_cf_type):
(parse_serialized_types):
(main):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.cpp:
(IPC::ArgumentCoder<CFBarRef>::encode):
(IPC::ArgumentCoder<RetainPtr<CFBarRef>>::decode):
* Source/WebKit/Scripts/webkit/tests/GeneratedSerializers.h:
* Source/WebKit/Scripts/webkit/tests/TestSerializedType.serialization.in:
* Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder<CGColorRef>::encode): Deleted.
(IPC::ArgumentCoder<RetainPtr<CGColorRef>>::decode): Deleted.
* Source/WebKit/Shared/cf/ArgumentCodersCF.h:
* Source/WebKit/Shared/cf/CFTypes.serialization.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCSerialization.mm:
(TEST):
Canonical link: https://commits.webkit.org/269987@main
More information about the webkit-changes
mailing list