Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 485052b30901b36de44f76c560e60674c1518c76 https://github.com/WebKit/WebKit/commit/485052b30901b36de44f76c560e60674c1518c76 Author: Timothy Hatcher <timo...@apple.com> Date: 2022-09-26 (Mon, 26 Sep 2022)
Changed paths: A Source/WebKit/Platform/cocoa/CocoaHelpers.h A Source/WebKit/Platform/cocoa/CocoaHelpers.mm M Source/WebKit/WebKit.xcodeproj/project.pbxproj Log Message: ----------- Add some Cocoa helper templates for getting objects of types and filtering containers. https://bugs.webkit.org/show_bug.cgi?id=245646 Reviewed by Tim Horton. These will be used in some forthcoming feature work. Instead of adding them as category methods in WebKit, I made them template functions to avoid cluttering up Foundation classes with WebKit category methods. * Source/WebKit/Platform/cocoa/CocoaHelpers.h: Added. (WebKit::filterObjects): (WebKit::mapObjects): (WebKit::objectForKey): * Source/WebKit/Platform/cocoa/CocoaHelpers.mm: Added. (WebKit::filterObjects<NSArray>): (WebKit::filterObjects<NSDictionary>): (WebKit::filterObjects<NSSet>): (WebKit::mapObjects<NSArray>): (WebKit::mapObjects<NSDictionary>): (WebKit::mapObjects<NSSet>): (WebKit::objectForKey<NSString>): (WebKit::objectForKey<NSArray>): (WebKit::objectForKey<NSDictionary>): (WebKit::objectForKey<NSSet>): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/254877@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes