Test perf effect of reverting D3269333

Reviewed By: javache

Differential Revision: D3346235

fbshipit-source-id: 2008f8fb9df5d61da59bb0067b25acd5a71f256f
This commit is contained in:
Nick Lockwood
2016-05-27 09:49:15 -07:00
committed by Facebook Github Bot 8
parent 60e0d2c676
commit a4b5f1bf10
16 changed files with 225 additions and 202 deletions

View File

@@ -13,17 +13,6 @@
#import "RCTUtils.h"
#import "UIView+React.h"
static void collectNonTextDescendants(RCTText *view, NSMutableArray *nonTextDescendants)
{
for (UIView *child in view.reactSubviews) {
if ([child isKindOfClass:[RCTText class]]) {
collectNonTextDescendants((RCTText *)child, nonTextDescendants);
} else {
[nonTextDescendants addObject:child];
}
}
}
@implementation RCTText
{
NSTextStorage *_textStorage;
@@ -130,15 +119,6 @@ static void collectNonTextDescendants(RCTText *view, NSMutableArray *nonTextDesc
[_highlightLayer removeFromSuperlayer];
_highlightLayer = nil;
}
for (UIView *child in [self subviews]) {
[child removeFromSuperview];
}
NSMutableArray *nonTextDescendants = [NSMutableArray new];
collectNonTextDescendants(self, nonTextDescendants);
for (UIView *child in nonTextDescendants) {
[self addSubview:child];
}
}
- (NSNumber *)reactTagAtPoint:(CGPoint)point