RESOLVED FIXED 238069
[Cocoa] Teach WebKit how to serialize CGColors
https://bugs.webkit.org/show_bug.cgi?id=238069
Summary [Cocoa] Teach WebKit how to serialize CGColors
Myles C. Maxfield
Reported 2022-03-18 02:09:25 PDT
[IPC] Teach WebKit how to serialize CGColors
Attachments
Patch (12.98 KB, patch)
2022-03-18 02:15 PDT, Myles C. Maxfield
no flags
Patch (13.19 KB, patch)
2022-03-18 02:18 PDT, Myles C. Maxfield
no flags
Patch (16.87 KB, patch)
2022-03-18 14:36 PDT, Myles C. Maxfield
dino: review+
Myles C. Maxfield
Comment 1 2022-03-18 02:15:53 PDT
Myles C. Maxfield
Comment 2 2022-03-18 02:15:57 PDT
Myles C. Maxfield
Comment 3 2022-03-18 02:18:45 PDT
Myles C. Maxfield
Comment 4 2022-03-18 14:36:31 PDT
Tim Horton
Comment 5 2022-03-18 15:50:01 PDT
Comment on attachment 455137 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455137&action=review > Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:60 > +- (instancetype _Nullable)initWithCGColor:(CGColorRef)wrappedColor; no infectious nullable in implementation files, please! (in many places) > Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:74 > + if (CFGetTypeID(object) == CGColorGetTypeID()) should this check the type hierarchy instead of a specific type? what if you have a CGColor subtype? (is that even a thing?) > Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:250 > + // Non-toll-free-bridged CF types do not conform to NSSecureCoding. Wouldn't non-bridged CF types also be exploding about messaging them with -isKindOfClass? (maybe not)
Myles C. Maxfield
Comment 6 2022-03-18 17:14:51 PDT
Comment on attachment 455137 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455137&action=review >> Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:250 >> + // Non-toll-free-bridged CF types do not conform to NSSecureCoding. > > Wouldn't non-bridged CF types also be exploding about messaging them with -isKindOfClass? (maybe not) They behave as NSObject (rather than NSColor or whatever).
Myles C. Maxfield
Comment 7 2022-03-18 18:54:54 PDT
Comment on attachment 455137 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455137&action=review >> Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:74 >> + if (CFGetTypeID(object) == CGColorGetTypeID()) > > should this check the type hierarchy instead of a specific type? what if you have a CGColor subtype? (is that even a thing?) (Followed up offline about this)
Myles C. Maxfield
Comment 8 2022-03-18 19:00:47 PDT
Note You need to log in before you can comment on or make changes to this bug.