Skip to content

Commit

Permalink
No force layout of superview and contentSize recalculation if intrins…
Browse files Browse the repository at this point in the history
…icContentSize not changed

Summary: Pull Request resolved: #20664

Differential Revision: D14103326

Pulled By: cpojer

fbshipit-source-id: 9346f12827843960178fbeef646bdb4c2cbd71ce
  • Loading branch information
zhongwuzw authored and facebook-github-bot committed Feb 15, 2019
1 parent c9ee902 commit da023c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions React/Base/RCTRootView.m
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,13 @@ - (void)setIntrinsicContentSize:(CGSize)intrinsicContentSize

_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];
}
Expand Down

0 comments on commit da023c5

Please sign in to comment.