mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-18 22:05:06 +08:00
No force layout of superview and contentSize recalculation if intrinsicContentSize not changed
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/20664 Differential Revision: D14103326 Pulled By: cpojer fbshipit-source-id: 9346f12827843960178fbeef646bdb4c2cbd71ce
This commit is contained in:
committed by
Facebook Github Bot
parent
c9ee902485
commit
da023c5873
@@ -343,13 +343,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
|
||||
|
||||
_intrinsicContentSize = intrinsicContentSize;
|
||||
|
||||
[self invalidateIntrinsicContentSize];
|
||||
[self.superview setNeedsLayout];
|
||||
|
||||
// Don't notify the delegate if the content remains invisible or its size has not changed
|
||||
if (bothSizesHaveAZeroDimension || sizesAreEqual) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self invalidateIntrinsicContentSize];
|
||||
[self.superview setNeedsLayout];
|
||||
|
||||
[_delegate rootViewDidChangeIntrinsicSize:self];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user