yoga::Node::getStyle()
to yoga::Node::style()
(#1555)
Summary: X-link: https://github.com/facebook/react-native/pull/42314 Pull Request resolved: https://github.com/facebook/yoga/pull/1555 The next diff moves a bunch of methods to `yoga::Style`. This renames the function to be a tad bit shorter, for more readable callsites. It also makes it more consistent with style property getters. Changelog: [Internal] Reviewed By: rozele Differential Revision: D52803393 fbshipit-source-id: 557df34a9f0fb0ee42ad23b1fda99c1e0eb1d4e3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d6a3b71085
commit
35b9b5223e
@@ -602,13 +602,13 @@ Style::Length Node::resolveFlexBasisPtr() const {
|
||||
}
|
||||
|
||||
void Node::resolveDimension() {
|
||||
const Style& style = getStyle();
|
||||
for (auto dim : {Dimension::Width, Dimension::Height}) {
|
||||
if (style.maxDimension(dim).isDefined() &&
|
||||
yoga::inexactEquals(style.maxDimension(dim), style.minDimension(dim))) {
|
||||
resolvedDimensions_[yoga::to_underlying(dim)] = style.maxDimension(dim);
|
||||
if (style_.maxDimension(dim).isDefined() &&
|
||||
yoga::inexactEquals(
|
||||
style_.maxDimension(dim), style_.minDimension(dim))) {
|
||||
resolvedDimensions_[yoga::to_underlying(dim)] = style_.maxDimension(dim);
|
||||
} else {
|
||||
resolvedDimensions_[yoga::to_underlying(dim)] = style.dimension(dim);
|
||||
resolvedDimensions_[yoga::to_underlying(dim)] = style_.dimension(dim);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user