Skip to content

Commit

Permalink
Merge pull request #2676 from maicki/MSRevertConstrainedSizeChanges
Browse files Browse the repository at this point in the history
Revert constrainedSize changes that should have never made it in
  • Loading branch information
appleguy authored Nov 29, 2016
2 parents 5f9e84c + 52bb2a3 commit 7861c63
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions AsyncDisplayKit/ASDisplayNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1692,13 +1692,14 @@ - (ASSizeRange)_locked_constrainedSizeForLayoutPass
CGSize boundsSizeForLayout = ASCeilSizeValues(self.threadSafeBounds.size);

// Checkout if constrained size of pending or calculated display node layout can be used
if (_pendingDisplayNodeLayout != nullptr
&& CGSizeEqualToSize(_pendingDisplayNodeLayout->layout.size, boundsSizeForLayout)) {
if (_pendingDisplayNodeLayout != nullptr
&& (_pendingDisplayNodeLayout->requestedLayoutFromAbove
|| CGSizeEqualToSize(_pendingDisplayNodeLayout->layout.size, boundsSizeForLayout))) {
// We assume the size from the last returned layoutThatFits: layout was applied so use the pending display node
// layout constrained size
return _pendingDisplayNodeLayout->constrainedSize;
} else if (_calculatedDisplayNodeLayout->layout != nil
&& (_calculatedDisplayNodeLayout->requestedLayoutFromAbove == NO
&& (_calculatedDisplayNodeLayout->requestedLayoutFromAbove
|| CGSizeEqualToSize(_calculatedDisplayNodeLayout->layout.size, boundsSizeForLayout))) {
// We assume the _calculatedDisplayNodeLayout is still valid and the frame is not different
return _calculatedDisplayNodeLayout->constrainedSize;
Expand Down

0 comments on commit 7861c63

Please sign in to comment.