Remove check for both modes being exact as this will never happen
Summary: css-layout will only call measure which it is unsure of the size of a node so it will never call measure with both modes equal to exact. Reviewed By: dshahidehpour Differential Revision: D4142193 fbshipit-source-id: fb8423cf0d45852ecb9df8fed042b25d1a443eea
This commit is contained in:
committed by
Facebook Github Bot
parent
1c22a1aa53
commit
ffb90e6ff2
@@ -200,14 +200,6 @@ static CSSSize _measure(
|
|||||||
float height,
|
float height,
|
||||||
CSSMeasureMode heightMode)
|
CSSMeasureMode heightMode)
|
||||||
{
|
{
|
||||||
// sizeThatFits: can be expensive. If we can avoid it, lets do it.
|
|
||||||
if ((widthMode == CSSMeasureModeExactly) && (heightMode == CSSMeasureModeExactly)) {
|
|
||||||
return (CSSSize) {
|
|
||||||
.width = width,
|
|
||||||
.height = height,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const CGFloat constrainedWidth = (widthMode == CSSMeasureModeUndefined) ? CGFLOAT_MAX : width;
|
const CGFloat constrainedWidth = (widthMode == CSSMeasureModeUndefined) ? CGFLOAT_MAX : width;
|
||||||
const CGFloat constrainedHeight = (heightMode == CSSMeasureModeUndefined) ? CGFLOAT_MAX: height;
|
const CGFloat constrainedHeight = (heightMode == CSSMeasureModeUndefined) ? CGFLOAT_MAX: height;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user