WKWebView.GetContentsShouldReturnAttributedString is crashing on iOS Simulator.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2019 23:54:38 +0000 (23:54 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Mar 2019 23:54:38 +0000 (23:54 +0000)
commitf677c8b4a5229e2f3c8ad1d82a7c630a95936d3e
tree67b4a2ffd249739b67b1ca5e46a2c210fce9a63f
parent703bda9c8da90a7bb4e3a90c1e6b1c8ee8bbd6f9
WKWebView.GetContentsShouldReturnAttributedString is crashing on iOS Simulator.
https://bugs.webkit.org/show_bug.cgi?id=195916

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Make ColorIOS.h a private header.
* platform/ios/ColorIOS.h: Export colorFromUIColor.

Source/WebKit:

Add direct support for UIColor so it does not try to use the NSSecureCoding path.
This avoids needs to list the classes when decoding the attributes NSDictionary
and matches the macOS NSColor encoder/decoder.

* Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::typeFromObject):
(IPC::encodeColorInternal):
(IPC::decodeColorInternal):
(IPC::encodeObject):
(IPC::decodeObject):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm:
(TEST(WKWebView, GetContentsShouldReturnAttributedString): Fix iOS code path to pass.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/ios/ColorIOS.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm