Refactor YogaNode.Inputs freeze API

Summary:
`InternalNode` will eventually not have a pointer to its parent. This diff removes one of the usages of the `InternalNode#getParent()` API. `InternalNode` will also not host the `YogaNode` eventually; so this diff also removes one of the usages of the `InternalNode#getYogaNode()` api.

Now the `Inputs#freeze` api will pass the parent's `YogaNode` and the `YogaNode` of the node (this) being measured.

Changelog: [Internal] Passes The YogaNode and parent YogaNode in the Inputs.freeze API

Reviewed By: SidharthGuglani

Differential Revision: D27240229

fbshipit-source-id: efc4ec3249a963c3181111f9b989d8ed9e17feb4
This commit is contained in:
Aditya Sharat
2021-03-30 05:41:22 -07:00
committed by Facebook GitHub Bot
parent 07eaeea7a4
commit cbf6495d66
2 changed files with 7 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ public abstract class YogaNode implements YogaProps {
public interface Inputs {
/** Requests the data object to disable mutations of its inputs. */
void freeze();
void freeze(final YogaNode node, final @Nullable YogaNode parent);
}
public abstract void reset();