Only mark Nodes dirty if an actual node is removed.
Summary: Currently, when we try to remove a child from a node, that node is mark dirty //regardless of whether or not anything was actually removed//. This fixes it. Reviewed By: gkassabli Differential Revision: D4125453 fbshipit-source-id: 745cfc55269415fea106a80c72401eb3074f2d31
This commit is contained in:
committed by
Facebook Github Bot
parent
b938017ccf
commit
e00e30ca15
@@ -263,9 +263,10 @@ void CSSNodeInsertChild(const CSSNodeRef node, const CSSNodeRef child, const uin
|
||||
}
|
||||
|
||||
void CSSNodeRemoveChild(const CSSNodeRef node, const CSSNodeRef child) {
|
||||
CSSNodeListDelete(node->children, child);
|
||||
child->parent = NULL;
|
||||
_CSSNodeMarkDirty(node);
|
||||
if (CSSNodeListDelete(node->children, child) != NULL) {
|
||||
child->parent = NULL;
|
||||
_CSSNodeMarkDirty(node);
|
||||
}
|
||||
}
|
||||
|
||||
CSSNodeRef CSSNodeGetChild(const CSSNodeRef node, const uint32_t index) {
|
||||
|
Reference in New Issue
Block a user