I need to copy a shared WKPreferences (that is itself far away from a default WKPreferences) and tweak it for particular web views. This seems like the obvious thing to do.
<rdar://problem/33764939>
Created attachment 317621 [details] Patch
Comment on attachment 317621 [details] Patch Not sure it’s a good idea to make this copyable, much less so publicly, but if we go ahead with this, I suggest that we implement this by making the underlying C++ object copyable. We shouldn’t have to maintain this extra logic in the Objective-C wrapper.
Comment on attachment 317621 [details] Patch Yep, agree. Plus then you could probably use the macros to generate the list instead of doing it manually?
Created attachment 317730 [details] Patch
Created attachment 317751 [details] Patch
Comment on attachment 317751 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=317751&action=review > Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Copying.mm:48 > + RetainPtr<WKPreferences> b = adoptNS([a.get() copy]); Is it necessary to write .get() here?
Comment on attachment 317751 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=317751&action=review >> Tools/TestWebKitAPI/Tests/WebKit2Cocoa/Copying.mm:48 >> + RetainPtr<WKPreferences> b = adoptNS([a.get() copy]); > > Is it necessary to write .get() here? Apparently not! I forgot about that cast operator. Fixed it.
Created attachment 317836 [details] For Landing
Comment on attachment 317836 [details] For Landing Clearing flags on attachment: 317836 Committed r220542: <http://trac.webkit.org/changeset/220542>
All reviewed patches have been landed. Closing bug.