Removed `[ShadowView collectUpdatedFrames:]`
Summary: Another juicy leftover from old Text implementation. Reviewed By: fkgozali Differential Revision: D6887942 fbshipit-source-id: d0363d06d566554c03d0ae3293597daf9c387028
This commit is contained in:
parent
0f9fc4b295
commit
9dfa2e7f3c
|
@ -184,17 +184,6 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, assign) CGSize intrinsicContentSize;
|
@property (nonatomic, assign) CGSize intrinsicContentSize;
|
||||||
|
|
||||||
/**
|
|
||||||
* Can be called by a parent on a child in order to calculate all views whose frame needs
|
|
||||||
* updating in that branch. Adds these frames to `viewsWithNewFrame`. Useful if layout
|
|
||||||
* enters a view where flex doesn't apply (e.g. Text) and then you want to resume flex
|
|
||||||
* layout on a subview.
|
|
||||||
*/
|
|
||||||
- (void)collectUpdatedFrames:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
|
|
||||||
withFrame:(CGRect)frame
|
|
||||||
hidden:(BOOL)hidden
|
|
||||||
absolutePosition:(CGPoint)absolutePosition;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply the CSS layout.
|
* Apply the CSS layout.
|
||||||
* This method also calls `applyLayoutToChildren:` internally. The functionality
|
* This method also calls `applyLayoutToChildren:` internally. The functionality
|
||||||
|
|
|
@ -262,34 +262,6 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)collectUpdatedFrames:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
|
|
||||||
withFrame:(CGRect)frame
|
|
||||||
hidden:(BOOL)hidden
|
|
||||||
absolutePosition:(CGPoint)absolutePosition
|
|
||||||
{
|
|
||||||
// This is not the core layout method. It is only used by RCTTextShadowView to layout
|
|
||||||
// nested views.
|
|
||||||
|
|
||||||
if (_hidden != hidden) {
|
|
||||||
// The hidden state has changed. Even if the frame hasn't changed, add
|
|
||||||
// this ShadowView to viewsWithNewFrame so the UIManager will process
|
|
||||||
// this ShadowView's UIView and update its hidden state.
|
|
||||||
_hidden = hidden;
|
|
||||||
[viewsWithNewFrame addObject:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!CGRectEqualToRect(frame, _frame)) {
|
|
||||||
YGNodeStyleSetPositionType(_yogaNode, YGPositionTypeAbsolute);
|
|
||||||
YGNodeStyleSetWidth(_yogaNode, frame.size.width);
|
|
||||||
YGNodeStyleSetHeight(_yogaNode, frame.size.height);
|
|
||||||
YGNodeStyleSetPosition(_yogaNode, YGEdgeLeft, frame.origin.x);
|
|
||||||
YGNodeStyleSetPosition(_yogaNode, YGEdgeTop, frame.origin.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
YGNodeCalculateLayout(_yogaNode, frame.size.width, frame.size.height, YGDirectionInherit);
|
|
||||||
[self applyLayoutNode:_yogaNode viewsWithNewFrame:viewsWithNewFrame absolutePosition:absolutePosition];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (CGRect)measureLayoutRelativeToAncestor:(RCTShadowView *)ancestor
|
- (CGRect)measureLayoutRelativeToAncestor:(RCTShadowView *)ancestor
|
||||||
{
|
{
|
||||||
CGPoint offset = CGPointZero;
|
CGPoint offset = CGPointZero;
|
||||||
|
|
Loading…
Reference in New Issue