WKPreferences should conform to NSCopying
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Aug 2017 20:34:40 +0000 (20:34 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Aug 2017 20:34:40 +0000 (20:34 +0000)
commitf3e3fc8abd60e8b3bd86e78e69f6dad84cfa95a9
tree01382ad00aa0d86c2372175e08d5273e8c8dffc4
parent7d31b764a60bac277362b8a4167116502de87d31
WKPreferences should conform to NSCopying
https://bugs.webkit.org/show_bug.cgi?id=175303
<rdar://problem/33764939>

Reviewed by Dan Bernstein.

Source/WebKit:

* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
Add conformance in the private header, as there is not consensus that this
needs to be API.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences copyWithZone:]):
Copy the wrapped WebPreferences instance and return its wrapper.

Tools:

Add unit test to make sure a WKPreference and its copy are
not aliased to each other or affect each other's properties.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/Copying.mm: Added.
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Copying.mm [new file with mode: 0644]