Skip to content

Commit

Permalink
Clean up calls to dimension() with a hardcoded FlexDirection
Browse files Browse the repository at this point in the history
Summary:
This is a bit more clear, imo

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D63408245
  • Loading branch information
joevilches authored and facebook-github-bot committed Sep 30, 2024
1 parent 72e0238 commit 87105e5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ void calculateLayout(
const auto& style = node->style();
if (node->hasDefiniteLength(Dimension::Width, ownerWidth)) {
width =
(node->getProcessedDimension(dimension(FlexDirection::Row))
(node->getProcessedDimension(Dimension::Width)
.resolve(ownerWidth)
.unwrap() +
node->style().computeMarginForAxis(FlexDirection::Row, ownerWidth));
Expand All @@ -2380,7 +2380,7 @@ void calculateLayout(
SizingMode heightSizingMode = SizingMode::MaxContent;
if (node->hasDefiniteLength(Dimension::Height, ownerHeight)) {
height =
(node->getProcessedDimension(dimension(FlexDirection::Column))
(node->getProcessedDimension(Dimension::Height)
.resolve(ownerHeight)
.unwrap() +
node->style().computeMarginForAxis(FlexDirection::Column, ownerWidth));
Expand Down

0 comments on commit 87105e5

Please sign in to comment.