Skip to content

Commit 9dfa2e7

Browse files
sherginfacebook-github-bot
authored andcommitted
Removed [ShadowView collectUpdatedFrames:]
Summary: Another juicy leftover from old Text implementation. Reviewed By: fkgozali Differential Revision: D6887942 fbshipit-source-id: d0363d06d566554c03d0ae3293597daf9c387028
1 parent 0f9fc4b commit 9dfa2e7

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

React/Views/RCTShadowView.h

-11
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,6 @@ typedef void (^RCTApplierBlock)(NSDictionary<NSNumber *, UIView *> *viewRegistry
184184
*/
185185
@property (nonatomic, assign) CGSize intrinsicContentSize;
186186

187-
/**
188-
* Can be called by a parent on a child in order to calculate all views whose frame needs
189-
* updating in that branch. Adds these frames to `viewsWithNewFrame`. Useful if layout
190-
* enters a view where flex doesn't apply (e.g. Text) and then you want to resume flex
191-
* layout on a subview.
192-
*/
193-
- (void)collectUpdatedFrames:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
194-
withFrame:(CGRect)frame
195-
hidden:(BOOL)hidden
196-
absolutePosition:(CGPoint)absolutePosition;
197-
198187
/**
199188
* Apply the CSS layout.
200189
* This method also calls `applyLayoutToChildren:` internally. The functionality

React/Views/RCTShadowView.m

-28
Original file line numberDiff line numberDiff line change
@@ -262,34 +262,6 @@ - (void)applyLayoutToChildren:(YGNodeRef)node
262262
}
263263
}
264264

265-
- (void)collectUpdatedFrames:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
266-
withFrame:(CGRect)frame
267-
hidden:(BOOL)hidden
268-
absolutePosition:(CGPoint)absolutePosition
269-
{
270-
// This is not the core layout method. It is only used by RCTTextShadowView to layout
271-
// nested views.
272-
273-
if (_hidden != hidden) {
274-
// The hidden state has changed. Even if the frame hasn't changed, add
275-
// this ShadowView to viewsWithNewFrame so the UIManager will process
276-
// this ShadowView's UIView and update its hidden state.
277-
_hidden = hidden;
278-
[viewsWithNewFrame addObject:self];
279-
}
280-
281-
if (!CGRectEqualToRect(frame, _frame)) {
282-
YGNodeStyleSetPositionType(_yogaNode, YGPositionTypeAbsolute);
283-
YGNodeStyleSetWidth(_yogaNode, frame.size.width);
284-
YGNodeStyleSetHeight(_yogaNode, frame.size.height);
285-
YGNodeStyleSetPosition(_yogaNode, YGEdgeLeft, frame.origin.x);
286-
YGNodeStyleSetPosition(_yogaNode, YGEdgeTop, frame.origin.y);
287-
}
288-
289-
YGNodeCalculateLayout(_yogaNode, frame.size.width, frame.size.height, YGDirectionInherit);
290-
[self applyLayoutNode:_yogaNode viewsWithNewFrame:viewsWithNewFrame absolutePosition:absolutePosition];
291-
}
292-
293265
- (CGRect)measureLayoutRelativeToAncestor:(RCTShadowView *)ancestor
294266
{
295267
CGPoint offset = CGPointZero;

0 commit comments

Comments
 (0)