Move markDirtyInternal as a method in YGNode

Summary: Moved YGNodeMarkDirtyInternal as a method in YGNode

Reviewed By: emilsjolander

Differential Revision: D6611287

fbshipit-source-id: 54402145d51ea717553ea136be739b9880a79817
This commit is contained in:
Pritesh Nandgaonkar
2018-01-08 02:48:35 -08:00
committed by Facebook Github Bot
parent f2a369fb73
commit 47892c17ce
3 changed files with 30 additions and 29 deletions

View File

@@ -379,6 +379,8 @@ YGNode::~YGNode() {
// deallocate here
}
// Other Methods
void YGNode::cloneChildrenIfNeeded() {
// YGNodeRemoveChild in yoga.cpp has a forked variant of this algorithm
// optimized for deletions.
@@ -409,3 +411,13 @@ void YGNode::cloneChildrenIfNeeded() {
}
}
}
void YGNode::markDirtyAndPropogate() {
if (!isDirty_) {
isDirty_ = true;
setLayoutComputedFlexBasis(YGUndefined);
if (parent_) {
parent_->markDirtyAndPropogate();
}
}
}