From bf466e83f2aebf164860bcc0fcc78f4c8e615ea5 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Wed, 3 Apr 2019 17:46:26 -0700 Subject: [PATCH] Fix the stub for layerActionForKey: to let CA continue the search (#1441) * Fix the stub for layerActionForKey: to let CA continue the search * Kick CI --- Source/ASDisplayNode.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/ASDisplayNode.mm b/Source/ASDisplayNode.mm index 8eeba8cd9..cb1b3c68b 100644 --- a/Source/ASDisplayNode.mm +++ b/Source/ASDisplayNode.mm @@ -106,7 +106,10 @@ BOOL ASDisplayNodeNeedsSpecialPropertiesHandling(BOOL isSynchronous, BOOL isLaye void StubImplementationWithNoArgs(id receiver, SEL _cmd) {} void StubImplementationWithSizeRange(id receiver, SEL _cmd, ASSizeRange sr) {} void StubImplementationWithTwoInterfaceStates(id receiver, SEL _cmd, ASInterfaceState s0, ASInterfaceState s1) {} -id StubLayerActionImplementation(id receiver, SEL _cmd, NSString *key) { return (id)kCFNull; } + +/// Returning nil here won't trigger unwanted default actions, because we override +/// +defaultActionForKey: to return kCFNull. +id StubLayerActionImplementation(id receiver, SEL _cmd, NSString *key) { return nil; } /** * Returns ASDisplayNodeFlags for the given class/instance. instance MAY BE NIL.