This is an automated email from the ASF dual-hosted git repository. kyork pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push: new a19c43d * [Android] Fix text layout problem (#1666) a19c43d is described below commit a19c43ddbab4a53e7e274e4f065a2a91a77422e6 Author: YorkShen <shenyua...@gmail.com> AuthorDate: Wed Oct 24 14:42:09 2018 +0800 * [Android] Fix text layout problem (#1666) https://alibaba.github.io/rax/jsplayground/e58e828f-83b4-4607-812e-4f6afe31bdd4 --- weex_core/Source/core/layout/layout.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/weex_core/Source/core/layout/layout.cpp b/weex_core/Source/core/layout/layout.cpp index a69fed7..2310ec1 100644 --- a/weex_core/Source/core/layout/layout.cpp +++ b/weex_core/Source/core/layout/layout.cpp @@ -190,13 +190,11 @@ namespace WeexCore { (widthMeasureMode == kUnspecified || heightMeasureMode == kUnspecified)) { float constrainsWidth = width; - if(isnan(width)){ - if(!isnan(mCssStyle->mMaxWidth)){ + if(isnan(width) && !isnan(mCssStyle->mMaxWidth)){ constrainsWidth = mCssStyle->mMaxWidth; - } } - if((!isnan(width)&&widthMeasureMode == kExactly) || + if((!isnan(width)) || (isnan(width) && !isnan(mCssStyle->mMaxWidth))) { constrainsWidth -= sumPaddingBorderAlongAxis(this, true); }