File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed
packages/react-native/ReactCommon/react/renderer/components/view Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ YogaLayoutableShadowNode::YogaLayoutableShadowNode(
8989 updateYogaProps ();
9090 updateYogaChildren ();
9191
92- initialize ();
9392 ensureConsistency ();
9493}
9594
@@ -159,18 +158,9 @@ YogaLayoutableShadowNode::YogaLayoutableShadowNode(
159158 updateYogaChildren ();
160159 }
161160
162- initialize ();
163161 ensureConsistency ();
164162}
165163
166- void YogaLayoutableShadowNode::initialize () {
167- if (yogaNode_.style ().display () == yoga::Display::Contents) {
168- ShadowNode::traits_.set (ShadowNodeTraits::ForceFlattenView);
169- } else {
170- ShadowNode::traits_.unset (ShadowNodeTraits::ForceFlattenView);
171- }
172- }
173-
174164void YogaLayoutableShadowNode::cleanLayout () {
175165 yogaNode_.setDirty (false );
176166}
@@ -398,6 +388,12 @@ void YogaLayoutableShadowNode::updateYogaProps() {
398388 !viewProps.filter .empty ();
399389 YGNodeSetAlwaysFormsContainingBlock (&yogaNode_, alwaysFormsContainingBlock);
400390 }
391+
392+ if (yogaNode_.style ().display () == yoga::Display::Contents) {
393+ ShadowNode::traits_.set (ShadowNodeTraits::ForceFlattenView);
394+ } else {
395+ ShadowNode::traits_.unset (ShadowNodeTraits::ForceFlattenView);
396+ }
401397}
402398
403399/* static*/ yoga::Style YogaLayoutableShadowNode::applyAliasedProps (
Original file line number Diff line number Diff line change @@ -101,11 +101,6 @@ class YogaLayoutableShadowNode : public LayoutableShadowNode {
101101 mutable yoga::Node yogaNode_;
102102
103103 private:
104- /*
105- * Sets initial traits on the node.
106- */
107- void initialize ();
108-
109104 /*
110105 * Goes over `yogaNode_.getChildren()` and in case child's owner is
111106 * equal to address of `yogaNode_`, it sets child's owner address
You can’t perform that action at this time.
0 commit comments