incubator-weex git commit: * [iOS] add protection for iOS 8 crash about the bezierPath crash in nan or illegal input

2018-04-23 Thread acton393
Repository: incubator-weex
Updated Branches:
  refs/heads/master 627f653a8 -> 1feea4c19


* [iOS] add protection  for iOS 8 crash about the bezierPath crash in nan or 
illegal input


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/1feea4c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/1feea4c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/1feea4c1

Branch: refs/heads/master
Commit: 1feea4c19a58e75f778ce3f0d70643795f8ff8ae
Parents: 627f653
Author: acton393 
Authored: Tue Apr 24 12:02:07 2018 +0800
Committer: acton393 
Committed: Tue Apr 24 12:02:07 2018 +0800

--
 ios/sdk/WeexSDK/Sources/Display/UIBezierPath+Weex.m | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1feea4c1/ios/sdk/WeexSDK/Sources/Display/UIBezierPath+Weex.m
--
diff --git a/ios/sdk/WeexSDK/Sources/Display/UIBezierPath+Weex.m 
b/ios/sdk/WeexSDK/Sources/Display/UIBezierPath+Weex.m
index f13c8b0..b7aa821 100644
--- a/ios/sdk/WeexSDK/Sources/Display/UIBezierPath+Weex.m
+++ b/ios/sdk/WeexSDK/Sources/Display/UIBezierPath+Weex.m
@@ -37,7 +37,11 @@ static const float kCircleControlPoint = 0.447715;
 // +--+
 //  \\  top //
 //   \\+--+//
-[path addLineToPoint:CGPointMake(CGRectGetMaxX(rect) - topRightRadius, 
rect.origin.y)];
+CGPoint topRightPoint = CGPointMake(CGRectGetMaxX(rect) - topRightRadius, 
rect.origin.y);
+if (isnan(topRightPoint.x) || isnan(topRightPoint.y)) {
+return path;
+}
+[path addLineToPoint:topRightPoint];
 if (topRightRadius > 0) {
 [path addCurveToPoint:CGPointMake(CGRectGetMaxX(rect), rect.origin.y + 
topRightRadius)
 controlPoint1:CGPointMake(CGRectGetMaxX(rect) - topRightRadius 
* kCircleControlPoint, rect.origin.y)



[GitHub] incubator-weex pull request #1121: [WEEX-298][iOS]fix WXIndicatorView invoke...

2018-04-23 Thread xuyouyang
Github user xuyouyang closed the pull request at:

https://github.com/apache/incubator-weex/pull/1121


---


incubator-weex git commit: [WEEX-298][IOS]fix WXIndicatorView invoke setNeedsDisplay not on main thread

2018-04-23 Thread acton393
Repository: incubator-weex
Updated Branches:
  refs/heads/master 81c6f6d6d -> 627f653a8


[WEEX-298][IOS]fix WXIndicatorView invoke setNeedsDisplay not on main thread


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/627f653a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/627f653a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/627f653a

Branch: refs/heads/master
Commit: 627f653a8d859c3f8ab0e49022a5c680d64b18ec
Parents: 81c6f6d
Author: xuyouyang 
Authored: Fri Apr 20 17:35:59 2018 +0800
Committer: acton393 
Committed: Tue Apr 24 11:09:18 2018 +0800

--
 .../Sources/Component/WXIndicatorComponent.m| 21 +++-
 1 file changed, 16 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/627f653a/ios/sdk/WeexSDK/Sources/Component/WXIndicatorComponent.m
--
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXIndicatorComponent.m 
b/ios/sdk/WeexSDK/Sources/Component/WXIndicatorComponent.m
index 4824d6e..c6b8486 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXIndicatorComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXIndicatorComponent.m
@@ -20,6 +20,7 @@
 #import "WXIndicatorComponent.h"
 #import "WXConvert.h"
 #import "WXSDKInstance.h"
+#import "WXUtility.h"
 
 @implementation WXIndicatorView
 
@@ -43,27 +44,35 @@
 - (void)setPointCount:(NSInteger)pointCount
 {
 _pointCount = pointCount;
-[self setNeedsDisplay];
+WXPerformBlockOnMainThread(^{
+[self setNeedsDisplay];
+});
 }
 
 - (void)setCurrentPoint:(NSInteger)currentPoint
 {
 if (currentPoint < _pointCount && currentPoint >= 0) {
 _currentPoint = currentPoint;
-[self setNeedsDisplay];
+WXPerformBlockOnMainThread(^{
+[self setNeedsDisplay];
+});
 }
 }
 
 - (void)setPointSize:(CGFloat)pointSize
 {
 _pointSize = pointSize;
-[self setNeedsDisplay];
+WXPerformBlockOnMainThread(^{
+[self setNeedsDisplay];
+});
 }
 
 - (void)setPointSpace:(CGFloat)pointSpace
 {
 _pointSpace = pointSpace;
-[self setNeedsDisplay];
+WXPerformBlockOnMainThread(^{
+[self setNeedsDisplay];
+});
 }
 
 - (void)drawRect:(CGRect)rect
@@ -203,7 +212,9 @@
 }
 
 if (styleChange) {
-[self setNeedsDisplay];
+WXPerformBlockOnMainThread(^{
+[self setNeedsDisplay];
+});
 }
 }
 



[GitHub] incubator-weex issue #1127: WXImageComponent: set imageview in completion bl...

2018-04-23 Thread xuyouyang
Github user xuyouyang commented on the issue:

https://github.com/apache/incubator-weex/pull/1127
  
@xiayun200825 thank you for your contributions. 
Can you give us some testcase through 'http://dotwe.org/vue' ?


---


[GitHub] incubator-weex issue #1127: WXImageComponent: set imageview in completion bl...

2018-04-23 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1127
  






  

  
  Messages

  
  
  :book:
  has no jsfm file changed.

  

  :book:
  jsfm test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS




---


[GitHub] incubator-weex pull request #1127: WXImageComponent: set imageview in comple...

2018-04-23 Thread xiayun200825
GitHub user xiayun200825 opened a pull request:

https://github.com/apache/incubator-weex/pull/1127

WXImageComponent: set imageview in completion block

 bugfix
1. Apply image to imageview in completion block while downloading via url.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/xiayun200825/incubator-weex master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1127.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1127


commit 951e6a68d7e7227b9bd50f378860040258e3b88e
Author: Xiayun 
Date:   2018-04-23T12:31:47Z

set imageview in completion block




---


[GitHub] incubator-weex issue #1126: [jsfm] Deep normalize the options when calling n...

2018-04-23 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1126
  





  

  
  Warnings

  
  
  :warning:
  No Changelog changes!

  




  

  
  Messages

  
  
  :book:
  danger test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS




---


[GitHub] incubator-weex pull request #1126: [jsfm] Deep normalize the options when ca...

2018-04-23 Thread Hanks10100
GitHub user Hanks10100 opened a pull request:

https://github.com/apache/incubator-weex/pull/1126

[jsfm] Deep normalize the options when calling native module

In some cases, the `options` argument of a module call may contain 
functions and complex structures, such as the `weex.imporsScript` api. The 
value of the `options` should be deep normalized.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Hanks10100/incubator-weex 
jsfm-feature-deep-normalize

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1126.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1126


commit 793c3e4d7d5dc2c1fa4ef272eeead11e89c51367
Author: Hanks 
Date:   2018-04-23T08:28:21Z

* [jsfm] deep normalize the options when calling native module




---


[GitHub] incubator-weex issue #1125: [jsfm] Support to build a standalone polyfill pa...

2018-04-23 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1125
  






  

  
  Messages

  
  
  :book:
  has no jsfm file changed.

  

  :book:
  jsfm test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS




---


[GitHub] incubator-weex pull request #1125: [jsfm] Support to build a standalone poly...

2018-04-23 Thread Hanks10100
GitHub user Hanks10100 opened a pull request:

https://github.com/apache/incubator-weex/pull/1125

[jsfm] Support to build a standalone polyfill package

Build a standalone polyfill package which can be used in some outdated 
versions of iOS.

The `weex-polyfill` package contains:

+ `Array.from`
+ `Object.assign`
+ `Object.setPrototypeOf`
+ `Promise`

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Hanks10100/incubator-weex 
jsfm-feature-polyfill-package

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1125.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1125


commit be8a84e4f69b13c105ff0a1b1735428b2fd604be
Author: Hanks 
Date:   2018-04-23T08:19:09Z

* [jsfm] support to build a standalnoe polyfill package




---


[GitHub] incubator-weex issue #1124: [jsfm] Support import script dynamically at runt...

2018-04-23 Thread weex-bot
Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1124
  






  

  
  Messages

  
  
  :book:
  has no jsfm file changed.

  

  :book:
  jsfm test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS




---


[GitHub] incubator-weex pull request #1124: [jsfm] Support import script dynamically ...

2018-04-23 Thread Hanks10100
GitHub user Hanks10100 opened a pull request:

https://github.com/apache/incubator-weex/pull/1124

[jsfm] Support import script dynamically at runtime

The code here partially supports the feature of import script dynamically 
at runtime. It needs native render engines to implement the corresponding 
features to fully support it.

## API

```typescript
weex.importScript(url: string): Promise
```

Import javascript code from remote and run it in the current context. It 
takes a url string as the only argument and return a Promise, which will be 
fullfilled once the code is successfully executed.

## Usage

```js
weex.importScript('https://whatever.com/shared.js')
.then(() => {
console.log('Import and run script success!')
})
.catch(() => {
console.log('Failed to import script dynamically')
})
```

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Hanks10100/incubator-weex 
jsfm-feature-import-script

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1124.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1124


commit e2395567f85d21dbb03916dedafd41554e0ff4cd
Author: Hanks 
Date:   2018-04-23T08:01:20Z

+ [jsfm] support import script dynamically at runtime




---