Back out "Back out "[yoga][intrinsic sizing] Modify private apis to set, store, and get intrinsic sizing keywords"" (#1756)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1756 X-link: https://github.com/facebook/react-native/pull/48049 Changelog: [Internal] Original commit changeset: 1d596964e0c8 Original Phabricator Diff: D66332307 Reviewed By: NickGerleman Differential Revision: D66662662 fbshipit-source-id: 4f9ac2b1557b848f519dcd728d7097b52f1190b3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
be72b8e8aa
commit
a9246bc7db
@@ -314,16 +314,16 @@ void Node::setPosition(
|
||||
crossAxisTrailingEdge);
|
||||
}
|
||||
|
||||
Style::Length Node::processFlexBasis() const {
|
||||
Style::Length flexBasis = style_.flexBasis();
|
||||
if (flexBasis.unit() != Unit::Auto && flexBasis.unit() != Unit::Undefined) {
|
||||
Style::SizeLength Node::processFlexBasis() const {
|
||||
Style::SizeLength flexBasis = style_.flexBasis();
|
||||
if (!flexBasis.isAuto() && !flexBasis.isUndefined()) {
|
||||
return flexBasis;
|
||||
}
|
||||
if (style_.flex().isDefined() && style_.flex().unwrap() > 0.0f) {
|
||||
return config_->useWebDefaults() ? StyleLength::ofAuto()
|
||||
: StyleLength::points(0);
|
||||
return config_->useWebDefaults() ? StyleSizeLength::ofAuto()
|
||||
: StyleSizeLength::points(0);
|
||||
}
|
||||
return StyleLength::ofAuto();
|
||||
return StyleSizeLength::ofAuto();
|
||||
}
|
||||
|
||||
FloatOptional Node::resolveFlexBasis(
|
||||
|
@@ -172,7 +172,7 @@ class YG_EXPORT Node : public ::YGNode {
|
||||
return isDirty_;
|
||||
}
|
||||
|
||||
Style::Length getProcessedDimension(Dimension dimension) const {
|
||||
Style::SizeLength getProcessedDimension(Dimension dimension) const {
|
||||
return processedDimensions_[static_cast<size_t>(dimension)];
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ class YG_EXPORT Node : public ::YGNode {
|
||||
void setPosition(Direction direction, float ownerWidth, float ownerHeight);
|
||||
|
||||
// Other methods
|
||||
Style::Length processFlexBasis() const;
|
||||
Style::SizeLength processFlexBasis() const;
|
||||
FloatOptional resolveFlexBasis(
|
||||
Direction direction,
|
||||
FlexDirection flexDirection,
|
||||
@@ -322,8 +322,8 @@ class YG_EXPORT Node : public ::YGNode {
|
||||
Node* owner_ = nullptr;
|
||||
std::vector<Node*> children_;
|
||||
const Config* config_;
|
||||
std::array<Style::Length, 2> processedDimensions_{
|
||||
{StyleLength::undefined(), StyleLength::undefined()}};
|
||||
std::array<Style::SizeLength, 2> processedDimensions_{
|
||||
{StyleSizeLength::undefined(), StyleSizeLength::undefined()}};
|
||||
};
|
||||
|
||||
inline Node* resolveRef(const YGNodeRef ref) {
|
||||
|
Reference in New Issue
Block a user