Do not measure the view if it is hidden.
Summary: If views are hidden on screen, we don't want to bother including them in layout calculations. Reviewed By: rnystrom Differential Revision: D4022992 fbshipit-source-id: 2e93eb911f26223f305ef7ce788f86d050b83e4a
This commit is contained in:
committed by
Facebook Github Bot
parent
89440f630f
commit
05ba3a2565
@@ -226,6 +226,10 @@ static void _updateFrameRecursive(UIView *view);
|
||||
@end
|
||||
|
||||
static void _attachNodesRecursive(UIView *view) {
|
||||
if (view.isHidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
CSSNodeRef node = [view cssNode];
|
||||
const BOOL usesFlexbox = [view css_usesFlexbox];
|
||||
const BOOL isLeaf = !usesFlexbox || view.subviews.count == 0;
|
||||
@@ -258,6 +262,10 @@ static void _attachNodesRecursive(UIView *view) {
|
||||
}
|
||||
|
||||
static void _updateFrameRecursive(UIView *view) {
|
||||
if (view.isHidden) {
|
||||
return;
|
||||
}
|
||||
|
||||
CSSNodeRef node = [view cssNode];
|
||||
const BOOL usesFlexbox = [view css_usesFlexbox];
|
||||
const BOOL isLeaf = !usesFlexbox || view.subviews.count == 0;
|
||||
|
Reference in New Issue
Block a user