This is an automated email from the ASF dual-hosted git repository.
moshen 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 4b69035 layout引擎Frame计算修改为向上取整
new 4274a32 Merge pull request #2813 from Txink/text-show
4b69035 is described below
commit 4b69035332d2f15fb1fe2b00cfbf57cdaede7fe5
Author: Txink <[email protected]>
AuthorDate: Mon Aug 12 14:44:56 2019 +0800
layout引擎Frame计算修改为向上取整
---
ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
b/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
index 9c95482..3ee9744 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
@@ -646,10 +646,10 @@ break; \
if (!manager.isValid) {
return -1;
}
- CGRect frame =
CGRectMake(isnan(WXRoundPixelValue(left))?0:WXRoundPixelValue(left),
-
isnan(WXRoundPixelValue(top))?0:WXRoundPixelValue(top),
-
isnan(WXRoundPixelValue(width))?0:WXRoundPixelValue(width),
-
isnan(WXRoundPixelValue(height))?0:WXRoundPixelValue(height));
+ CGRect frame =
CGRectMake(isnan(WXCeilPixelValue(left))?0:WXCeilPixelValue(left),
+
isnan(WXCeilPixelValue(top))?0:WXCeilPixelValue(top),
+
isnan(WXCeilPixelValue(width))?0:WXCeilPixelValue(width),
+
isnan(WXCeilPixelValue(height))?0:WXCeilPixelValue(height));
[manager layoutComponent:component frame:frame isRTL:isRTL
innerMainSize:renderObject->getLargestMainSize()];
page->CallBridgeTime(getCurrentTime() - startTime);
@@ -1551,10 +1551,10 @@ static WeexCore::ScriptBridge* jsBridge = nullptr;
float width = render->getLayoutWidth();
BOOL isRTL = render->getLayoutDirectionFromPathNode() ==
WeexCore::kDirectionRTL;
WXComponentManager* manager = [WXSDKManager
instanceForID:ns_instanceId].componentManager;
- CGRect frame =
CGRectMake(isnan(WXRoundPixelValue(left))?0:WXRoundPixelValue(left),
-
isnan(WXRoundPixelValue(top))?0:WXRoundPixelValue(top),
-
isnan(WXRoundPixelValue(width))?0:WXRoundPixelValue(width),
-
isnan(WXRoundPixelValue(height))?0:WXRoundPixelValue(height));
+ CGRect frame =
CGRectMake(isnan(WXCeilPixelValue(left))?0:WXCeilPixelValue(left),
+
isnan(WXCeilPixelValue(top))?0:WXCeilPixelValue(top),
+
isnan(WXCeilPixelValue(width))?0:WXCeilPixelValue(width),
+
isnan(WXCeilPixelValue(height))?0:WXCeilPixelValue(height));
[manager layoutComponent:component frame:frame isRTL:isRTL
innerMainSize:render->getLargestMainSize()];
}
render->setHasNewLayout(false);