From ffb90e6ff284c1cc01699ed86a5ad488b46841d0 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Mon, 7 Nov 2016 14:25:32 -0800 Subject: [PATCH] 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 --- uikit/CSSLayout/UIView+CSSLayout.m | 8 -------- 1 file changed, 8 deletions(-) diff --git a/uikit/CSSLayout/UIView+CSSLayout.m b/uikit/CSSLayout/UIView+CSSLayout.m index ef42975a..e85cf1d3 100644 --- a/uikit/CSSLayout/UIView+CSSLayout.m +++ b/uikit/CSSLayout/UIView+CSSLayout.m @@ -200,14 +200,6 @@ static CSSSize _measure( float height, 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 constrainedHeight = (heightMode == CSSMeasureModeUndefined) ? CGFLOAT_MAX: height;