Remove explicit passing of trait collection to setChild/Children

This commit is contained in:
ricky
2016-05-25 10:49:42 -07:00
parent a33966d4ae
commit c42b0dd33a
21 changed files with 59 additions and 181 deletions

View File

@@ -1904,6 +1904,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock)
if ((_methodOverrides & ASDisplayNodeMethodOverrideLayoutSpecThatFits) || _layoutSpecBlock != NULL) {
ASLayoutSpec *layoutSpec = [self layoutSpecThatFits:constrainedSize];
layoutSpec.parent = self; // This causes upward propogation of any non-default layoutable values.
layoutSpec.traitCollection = self.asyncTraitCollection;
layoutSpec.isMutable = NO;
ASLayout *layout = [layoutSpec measureWithSizeRange:constrainedSize];
// Make sure layoutableObject of the root layout is `self`, so that the flattened layout will be structurally correct.