Revert D50998164: Allow lazy resolution of edge dimension values

Differential Revision:
D50998164

Original commit changeset: 248396f9587e

Original Phabricator Diff: D50998164

fbshipit-source-id: 4f592158324d758bb9e3731ced36b8e3587c459c
This commit is contained in:
Nick Gerleman
2023-11-15 18:34:47 -08:00
committed by Facebook GitHub Bot
parent f2c8acad2c
commit 27af596359
9 changed files with 416 additions and 124 deletions

View File

@@ -65,12 +65,6 @@ class YG_EXPORT Node : public ::YGNode {
style_.alignContent() = Align::Stretch;
}
template <auto Field>
CompactValue computeEdgeValueForColumn(YGEdge edge) const;
template <auto Field>
CompactValue computeEdgeValueForRow(YGEdge rowEdge, YGEdge edge) const;
// DANGER DANGER DANGER!
// If the node assigned to has children, we'd either have to deallocate
// them (potentially incorrect) or ignore them (danger of leaks). Only ever
@@ -195,6 +189,15 @@ class YG_EXPORT Node : public ::YGNode {
return resolvedDimensions_[static_cast<size_t>(dimension)];
}
static CompactValue computeEdgeValueForColumn(
const Style::Edges& edges,
YGEdge edge);
static CompactValue computeEdgeValueForRow(
const Style::Edges& edges,
YGEdge rowEdge,
YGEdge edge);
// Methods related to positions, margin, padding and border
bool isFlexStartPositionDefined(FlexDirection axis) const;
bool isInlineStartPositionDefined(FlexDirection axis, Direction direction)