diff --git a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp index 1fce4667ef6..fdbc1310501 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaLayoutableShadowNode.cpp @@ -26,7 +26,6 @@ YogaLayoutableShadowNode::YogaLayoutableShadowNode() yogaNode_.setConfig(&yogaConfig_); yogaNode_.setContext(this); - yogaNode_.setDirty(true); } YogaLayoutableShadowNode::YogaLayoutableShadowNode( @@ -48,7 +47,7 @@ void YogaLayoutableShadowNode::cleanLayout() { } void YogaLayoutableShadowNode::dirtyLayout() { - yogaNode_.markDirtyAndPropogate(); + yogaNode_.setDirty(true); } bool YogaLayoutableShadowNode::getIsLayoutClean() const { diff --git a/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp b/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp index f502fd4d0ef..13296abc4b8 100644 --- a/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp +++ b/ReactCommon/fabric/core/layout/LayoutableShadowNode.cpp @@ -65,26 +65,6 @@ LayoutMetrics LayoutableShadowNode::getRelativeLayoutMetrics( return layoutMetrics; } -void LayoutableShadowNode::cleanLayout() { - isLayoutClean_ = true; -} - -void LayoutableShadowNode::dirtyLayout() { - isLayoutClean_ = false; -} - -bool LayoutableShadowNode::getIsLayoutClean() const { - return isLayoutClean_; -} - -bool LayoutableShadowNode::getHasNewLayout() const { - return hasNewLayout_; -}; - -void LayoutableShadowNode::setHasNewLayout(bool hasNewLayout) { - hasNewLayout_ = hasNewLayout; -} - Size LayoutableShadowNode::measure(LayoutConstraints layoutConstraints) const { return Size(); } diff --git a/ReactCommon/fabric/core/layout/LayoutableShadowNode.h b/ReactCommon/fabric/core/layout/LayoutableShadowNode.h index 9a4fc4f31cc..569bc677d25 100644 --- a/ReactCommon/fabric/core/layout/LayoutableShadowNode.h +++ b/ReactCommon/fabric/core/layout/LayoutableShadowNode.h @@ -76,16 +76,16 @@ class LayoutableShadowNode : public virtual Sealable { * Indicates whether all nodes (and possibly their subtrees) along the path * to the root node should be re-layouted. */ - virtual void cleanLayout(); - virtual void dirtyLayout(); - virtual bool getIsLayoutClean() const; + virtual void cleanLayout() = 0; + virtual void dirtyLayout() = 0; + virtual bool getIsLayoutClean() const = 0; /* * Indicates does the shadow node (or any descendand node of the node) * get a new layout metrics during a previous layout pass. */ - virtual void setHasNewLayout(bool hasNewLayout); - virtual bool getHasNewLayout() const; + virtual void setHasNewLayout(bool hasNewLayout) = 0; + virtual bool getHasNewLayout() const = 0; /* * Applies layout for all children; @@ -127,8 +127,6 @@ class LayoutableShadowNode : public virtual Sealable { private: LayoutMetrics layoutMetrics_{}; - bool hasNewLayout_{false}; - bool isLayoutClean_{false}; }; } // namespace react