You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ac...@apache.org on 2017/05/05 11:25:34 UTC
[01/23] incubator-weex git commit: + [ios] add not connected internet
code
Repository: incubator-weex
Updated Branches:
refs/heads/0.13-dev f03e671e0 -> bc0aae637
+ [ios] add not connected internet code
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ca7aa7f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ca7aa7f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ca7aa7f9
Branch: refs/heads/0.13-dev
Commit: ca7aa7f98bff72ad8c0dec5ddacf8c8429546e4b
Parents: d81b16a
Author: lybeen <il...@gmail.com>
Authored: Tue Apr 11 10:50:53 2017 +0800
Committer: lybeen <il...@gmail.com>
Committed: Tue Apr 11 10:50:53 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h | 1 +
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca7aa7f9/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
index 851194d..7f4f2dd 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
@@ -37,6 +37,7 @@ typedef NS_ENUM(int, WXSDKErrCode)
WX_ERR_DOWNLOAD_START = -2201,
WX_ERR_JSBUNDLE_DOWNLOAD = -2202,
WX_ERR_JSBUNDLE_STRING_CONVERT = -2203,
+ WX_ERR_NOT_CONNECTED_TO_INTERNET = -2205,
WX_ERR_CANCEL = -2204,
WX_ERR_DOWNLOAD_END = -2299,
};
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ca7aa7f9/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index afc6c53..440add2 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -249,7 +249,8 @@ typedef enum : NSUInteger {
_mainBundleLoader.onFailed = ^(NSError *loadError) {
NSString *errorMessage = [NSString stringWithFormat:@"Request to %@ occurs an error:%@", request.URL, loadError.localizedDescription];
- WX_MONITOR_FAIL_ON_PAGE(WXMTJSDownload, WX_ERR_JSBUNDLE_DOWNLOAD, errorMessage, weakSelf.pageName);
+
+ WX_MONITOR_FAIL_ON_PAGE(WXMTJSDownload, [loadError.domain isEqualToString:NSURLErrorDomain] && loadError.code == NSURLErrorNotConnectedToInternet ? WX_ERR_NOT_CONNECTED_TO_INTERNET : WX_ERR_JSBUNDLE_DOWNLOAD, errorMessage, weakSelf.pageName);
if (weakSelf.onFailed) {
weakSelf.onFailed(error);
[20/23] incubator-weex git commit: Merge branch
'ios-feature-addNotConnectedToInternetCode' of
https://github.com/lybeen/incubator-weex into apache0.12-dev
Posted by ac...@apache.org.
Merge branch 'ios-feature-addNotConnectedToInternetCode' of https://github.com/lybeen/incubator-weex into apache0.12-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/58eaa9d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/58eaa9d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/58eaa9d8
Branch: refs/heads/0.13-dev
Commit: 58eaa9d851403158bd481394750d7f0b61301354
Parents: b4c68c6 ca7aa7f
Author: acton393 <zh...@gmail.com>
Authored: Fri May 5 17:48:01 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri May 5 17:48:01 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h | 1 +
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/58eaa9d8/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/58eaa9d8/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
[04/23] incubator-weex git commit: * [jsfm] v0.20.6
Posted by ac...@apache.org.
* [jsfm] v0.20.6
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3adf41db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3adf41db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3adf41db
Branch: refs/heads/0.13-dev
Commit: 3adf41dbcb4329225be38aefd2bfbf1e633e2a3a
Parents: 5d9d12a
Author: fkysly <fk...@gmail.com>
Authored: Fri Apr 28 17:11:13 2017 +0800
Committer: fkysly <fk...@gmail.com>
Committed: Fri Apr 28 17:11:13 2017 +0800
----------------------------------------------------------------------
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3adf41db/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 90b949c..b28dea3 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "0.4.0",
"subversion": {
"browser": "0.5.0",
- "framework": "0.20.5",
+ "framework": "0.20.6",
"vue-render": "0.11.10",
"transformer": ">=0.1.5 <0.5"
},
@@ -95,7 +95,7 @@
"semver": "^5.1.0",
"weex-picker": "^0.1.0",
"weex-rax-framework": "0.2.11",
- "weex-vue-framework": "2.2.2-weex.5",
+ "weex-vue-framework": "2.2.6-weex.1",
"weex-styler": "0.1.9"
},
"devDependencies": {
[23/23] incubator-weex git commit: Merge branch 'ios-slider-0.13-dev'
of https://github.com/kfeagle/incubator-weex into apache-0.13-dev
Posted by ac...@apache.org.
Merge branch 'ios-slider-0.13-dev' of https://github.com/kfeagle/incubator-weex into apache-0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/bc0aae63
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/bc0aae63
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/bc0aae63
Branch: refs/heads/0.13-dev
Commit: bc0aae63768dd51f4525b36b3860998c233cef96
Parents: 3b30599 db72360
Author: acton393 <zh...@gmail.com>
Authored: Fri May 5 19:22:44 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri May 5 19:22:44 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bc0aae63/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
[15/23] incubator-weex git commit: Merge branch '0.13-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/2e7d1645
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/2e7d1645
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/2e7d1645
Branch: refs/heads/0.13-dev
Commit: 2e7d1645381479f3edeaa8c890adebea42d67eb7
Parents: 8f1ffa2 d184e1b
Author: cxfeng <cx...@apache.org>
Authored: Thu May 4 19:45:43 2017 +0800
Committer: cxfeng <cx...@apache.org>
Committed: Thu May 4 19:45:43 2017 +0800
----------------------------------------------------------------------
.../weex/extend/module/WXEventModule.java | 5 +++-
.../com/taobao/weex/ui/view/WXImageView.java | 31 +++++++++++++++++---
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 14 +++++++++
3 files changed, 45 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
[08/23] incubator-weex git commit: Merge branch
'android-bugfix-imagesize' of github.com:misakuo/incubator-weex into 0.13-dev
Posted by ac...@apache.org.
Merge branch 'android-bugfix-imagesize' of github.com:misakuo/incubator-weex into 0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e795fd5d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e795fd5d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e795fd5d
Branch: refs/heads/0.13-dev
Commit: e795fd5d18cef2e676774b45b4a85f3e811e7b28
Parents: bb33a75 73f1038
Author: sospartan <so...@apache.org>
Authored: Thu May 4 13:54:26 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu May 4 13:54:26 2017 +0800
----------------------------------------------------------------------
.../com/taobao/weex/ui/view/WXImageView.java | 31 +++++++++++++++++---
1 file changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
[22/23] incubator-weex git commit: + [ios] update judgement
Posted by ac...@apache.org.
+ [ios] update judgement
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/db723605
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/db723605
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/db723605
Branch: refs/heads/0.13-dev
Commit: db7236054a16ae0eae9654bc4af34d96f7572831
Parents: 850d846
Author: 齐山 <su...@163.com>
Authored: Fri May 5 17:56:02 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Fri May 5 17:56:02 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/db723605/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index ff1532c..ffa44b7 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -197,7 +197,7 @@ typedef enum : NSUInteger {
BOOL useCoreText = [[configCenter configForKey:@"iOS_weex_ext_config.text_render_useCoreText" defaultValue:@false isDefault:NULL] boolValue];
[WXTextComponent setRenderUsingCoreText:useCoreText];
NSString *className = [[configCenter configForKey:@"iOS_weex_ext_config.slider_class_name" defaultValue:@"WXSliderComponent" isDefault:NULL] stringValue];
- if(className.length>0){
+ if(className.length>0 && NSClassFromString(className)){
[WXSDKEngine registerComponent:@"slider" withClass:NSClassFromString(className)];
}else{
[WXSDKEngine registerComponent:@"slider" withClass:NSClassFromString(@"WXSliderComponent")];
[02/23] incubator-weex git commit: + [jsfm] add event bubble support
Posted by ac...@apache.org.
+ [jsfm] add event bubble support
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/ad00ce58
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ad00ce58
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ad00ce58
Branch: refs/heads/0.13-dev
Commit: ad00ce58c04efc57f264bb8efd0ceb290c1b8dc2
Parents: 3b8700b
Author: fkysly <fk...@gmail.com>
Authored: Fri Apr 28 15:31:28 2017 +0800
Committer: fkysly <fk...@gmail.com>
Committed: Fri Apr 28 15:31:28 2017 +0800
----------------------------------------------------------------------
html5/runtime/vdom/document.js | 4 +++-
html5/runtime/vdom/element.js | 25 ++++++++++++++++++++-----
html5/test/unit/default/vm/vm.js | 2 +-
3 files changed, 24 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ad00ce58/html5/runtime/vdom/document.js
----------------------------------------------------------------------
diff --git a/html5/runtime/vdom/document.js b/html5/runtime/vdom/document.js
index 77d146b..fe4f52f 100644
--- a/html5/runtime/vdom/document.js
+++ b/html5/runtime/vdom/document.js
@@ -172,11 +172,13 @@ Object.assign(Document.prototype, {
e = e || {}
e.type = type
e.target = el
+ e.currentTarget = el
e.timestamp = Date.now()
if (domChanges) {
updateElement(el, domChanges)
}
- return el.fireEvent(type, e)
+ const isBubble = this.getRef('_root').attr['bubble'] === 'true'
+ return el.fireEvent(type, e, isBubble)
},
/**
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ad00ce58/html5/runtime/vdom/element.js
----------------------------------------------------------------------
diff --git a/html5/runtime/vdom/element.js b/html5/runtime/vdom/element.js
index 8a78198..9ecff04 100644
--- a/html5/runtime/vdom/element.js
+++ b/html5/runtime/vdom/element.js
@@ -41,6 +41,7 @@ import {
} from './element-types'
const DEFAULT_TAG_NAME = 'div'
+const BUBBLE_EVENTS = ['click', 'longpress', 'touchstart', 'touchmove', 'touchend', 'panstart', 'panmove', 'panend', 'horizontalpan', 'verticalpan', 'swipe']
export default function Element (type = DEFAULT_TAG_NAME, props, isExtended) {
const XElement = elementTypes[type]
@@ -387,14 +388,28 @@ Object.assign(Element.prototype, {
/**
* Fire an event manually.
- * @param {string} event type
- * @param {function} event handler
+ * @param {string} type type
+ * @param {function} e handler
+ * @param {boolean} isBubble whether or not event bubble
* @return {} anything returned by handler function
*/
- fireEvent (type, e) {
+ fireEvent (type, e, isBubble) {
+ let isStopPropagation = false
const handler = this.event[type]
- if (handler) {
- return handler.call(this, e)
+ if (handler && e) {
+ e.stopPropagation = () => {
+ isStopPropagation = true
+ }
+ handler.call(this, e)
+ }
+
+ if (isStopPropagation) {
+ return
+ }
+
+ if (isBubble && BUBBLE_EVENTS.includes(type) && this.parentNode && this.parentNode.fireEvent) {
+ e.currentTarget = this.parentNode
+ this.parentNode.fireEvent(type, e, isBubble)
}
},
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ad00ce58/html5/test/unit/default/vm/vm.js
----------------------------------------------------------------------
diff --git a/html5/test/unit/default/vm/vm.js b/html5/test/unit/default/vm/vm.js
index 04e426c..b27cf3d 100644
--- a/html5/test/unit/default/vm/vm.js
+++ b/html5/test/unit/default/vm/vm.js
@@ -1658,7 +1658,7 @@ describe('generate dom actions', () => {
expect(doc.body.event.click).is.a.function
expect(handler.args.length).eql(0)
doc.body.fireEvent('click')
- expect(handler.args.length).eql(1)
+ expect(handler.args.length).eql(0)
})
it('received actions for a template with if & repeat', () => {
[21/23] incubator-weex git commit: Merge remote-tracking branch
'apache/0.12-dev' into apache-0.13-dev
Posted by ac...@apache.org.
Merge remote-tracking branch 'apache/0.12-dev' into apache-0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3b305999
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3b305999
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3b305999
Branch: refs/heads/0.13-dev
Commit: 3b30599950ff635084ed0fdd0ae5deb56fe886d0
Parents: a044ec8 58eaa9d
Author: acton393 <zh...@gmail.com>
Authored: Fri May 5 17:51:22 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri May 5 17:51:22 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h | 1 +
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b305999/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
[19/23] incubator-weex git commit: Merge branch '0.13-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into apache-0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into apache-0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a044ec8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a044ec8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a044ec8b
Branch: refs/heads/0.13-dev
Commit: a044ec8b5e9beea6113d8507c39ea6b1c9a6f48e
Parents: 53695c7 4794dd7
Author: acton393 <zh...@gmail.com>
Authored: Fri May 5 17:44:37 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri May 5 17:44:37 2017 +0800
----------------------------------------------------------------------
doc/source/cn/references/bubble.md | 146 ++++++++++++++++++
doc/source/cn/references/downgrade.md | 11 ++
doc/source/cn/references/index.md | 4 +-
doc/source/cn/v-0.10/references/bubble.md | 150 +++++++++++++++++++
doc/source/references/bubble.md | 146 ++++++++++++++++++
doc/source/references/downgrade.md | 11 ++
doc/source/references/index.md | 2 +
doc/source/v-0.10/references/bubble.md | 150 +++++++++++++++++++
html5/runtime/vdom/document.js | 4 +-
html5/runtime/vdom/element.js | 25 +++-
html5/test/unit/default/vm/vm.js | 2 +-
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 4 +
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 9 +-
.../Sources/Protocol/WXConfigCenterProtocol.h | 20 +++
package.json | 4 +-
15 files changed, 677 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
[17/23] incubator-weex git commit: + [ios] add slider switch function
Posted by ac...@apache.org.
+ [ios] add slider switch function
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/850d846f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/850d846f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/850d846f
Branch: refs/heads/0.13-dev
Commit: 850d846f65e912f07bc899a4e277811696171c3a
Parents: 4794dd7
Author: 齐山 <su...@163.com>
Authored: Fri May 5 15:30:39 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Fri May 5 15:30:39 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/850d846f/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index c546d42..ff1532c 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -196,6 +196,12 @@ typedef enum : NSUInteger {
if ([configCenter respondsToSelector:@selector(configForKey:defaultValue:isDefault:)]) {
BOOL useCoreText = [[configCenter configForKey:@"iOS_weex_ext_config.text_render_useCoreText" defaultValue:@false isDefault:NULL] boolValue];
[WXTextComponent setRenderUsingCoreText:useCoreText];
+ NSString *className = [[configCenter configForKey:@"iOS_weex_ext_config.slider_class_name" defaultValue:@"WXSliderComponent" isDefault:NULL] stringValue];
+ if(className.length>0){
+ [WXSDKEngine registerComponent:@"slider" withClass:NSClassFromString(className)];
+ }else{
+ [WXSDKEngine registerComponent:@"slider" withClass:NSClassFromString(@"WXSliderComponent")];
+ }
}
[[WXSDKManager bridgeMgr] createInstance:self.instanceId template:mainBundleString options:dictionary data:_jsData];
[03/23] incubator-weex git commit: + [doc] add event bubble
Posted by ac...@apache.org.
+ [doc] add event bubble
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/5d9d12ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5d9d12ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5d9d12ab
Branch: refs/heads/0.13-dev
Commit: 5d9d12ab63b84ac59861c39f5ded56ca2cceacdd
Parents: ad00ce5
Author: fkysly <fk...@gmail.com>
Authored: Fri Apr 28 15:58:26 2017 +0800
Committer: fkysly <fk...@gmail.com>
Committed: Fri Apr 28 15:58:26 2017 +0800
----------------------------------------------------------------------
doc/source/cn/references/bubble.md | 146 ++++++++++++++++++++++++
doc/source/cn/references/index.md | 3 +-
doc/source/cn/v-0.10/references/bubble.md | 150 +++++++++++++++++++++++++
doc/source/references/bubble.md | 146 ++++++++++++++++++++++++
doc/source/references/index.md | 1 +
doc/source/v-0.10/references/bubble.md | 150 +++++++++++++++++++++++++
6 files changed, 595 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d9d12ab/doc/source/cn/references/bubble.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/bubble.md b/doc/source/cn/references/bubble.md
new file mode 100644
index 0000000..4b63cad
--- /dev/null
+++ b/doc/source/cn/references/bubble.md
@@ -0,0 +1,146 @@
+---
+title: 事件冒泡
+type: references
+order: 1.3
+version: 2.1
+---
+
+# 事件冒泡 <span class="api-version">v0.13+</span>
+
+Weex 2.0 实现了 W3C 标准的事件冒泡机制。
+
+### 使用
+
+```javascript
+<template>
+ <div class="root" @click="rootClick" bubble="true">
+ <text style="font-size: 40px;">{{rootText}}</text>
+ <div class="outer" @click="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" @click="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ }
+ }
+ }
+</script>
+
+<style scoped>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/vue/fa2957ce3e9eb47ad9ae1da22d845e95)
+
+运行以上代码,用客户端打开,点击中间的元素,可以看到事件向上传播,依次触发。
+
+### 注意
+
+需要注意的是: ** 为了兼容之前的版本,Weex 默认不会开启事件冒泡机制。需要在根元素的属性上,添加 `bubble="true"` 来开启冒泡机制。否则,将不会向上传播事件,保持与之前版本的效果相同。 **
+
+### stopPropagation
+
+在事件处理函数中,可以使用 `e.stopPropagation()` 方法,来阻止本次事件向上的传递过程。注意,`e.stopPropagation()` 与 `bubble="true"` 不同,前者只会影响当前元素以及父元素的传播,不会影响子元素的传播;后者是为了版本兼容而增加的开关机制,会全局关闭或者开启冒泡机制,两者可以共同存在使用,如下:
+
+```javascript
+<template>
+ <div class="root" @click="rootClick" bubble="true">
+ <text style="font-size: 40px;">{{rootText}}</text>
+ <div class="outer" @click="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" @click="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ e.stopPropagation()
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ // e.stopPropagation()
+ }
+ }
+ }
+</script>
+
+<style scoped>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/vue/2cc80e19c9b2430fb780234628065a69)
+
+运行以上代码,用客户端打开,点击中间的元素,可以看到事件向上传播到父元素被终止,不再继续往根元素传播。
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d9d12ab/doc/source/cn/references/index.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/index.md b/doc/source/cn/references/index.md
index 9b44a33..65e4769 100644
--- a/doc/source/cn/references/index.md
+++ b/doc/source/cn/references/index.md
@@ -14,4 +14,5 @@ version: 2.1
- [文本样式](./text-style.html)
- [颜色名称](./color-names.html)
- [手势](./gesture.html)
-- [路径](./path.html)
\ No newline at end of file
+- [路径](./path.html)
+- [事件冒泡](./bubble.html)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d9d12ab/doc/source/cn/v-0.10/references/bubble.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/v-0.10/references/bubble.md b/doc/source/cn/v-0.10/references/bubble.md
new file mode 100644
index 0000000..cb25e05
--- /dev/null
+++ b/doc/source/cn/v-0.10/references/bubble.md
@@ -0,0 +1,150 @@
+---
+title: 事件冒泡
+type: references
+order: 1.3
+version: 2.1
+---
+
+# 事件冒泡 <span class="api-version">v0.13+</span>
+
+Weex 1.0 实现了 W3C 标准的事件冒泡机制。
+
+### 使用
+
+```javascript
+<template>
+ <div class="root" onclick="rootClick" bubble="true">
+ <div>
+ <text style="font-size: 40px;">{{rootText}}</text>
+ </div>
+ <div class="outer" onclick="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" onclick="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ }
+ }
+ }
+</script>
+
+<style>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/weex/dbfeb926e003986e2eea88c8ccdadb92)
+
+运行以上代码,用客户端打开,点击中间的元素,可以看到事件向上传播,依次触发。
+
+### 注意
+
+需要注意的是: ** 为了兼容之前的版本,Weex 默认不会开启事件冒泡机制。需要在根元素的属性上,添加 `bubble="true"` 来开启冒泡机制。否则,将不会向上传播事件,保持与之前版本的效果相同。 **
+
+### stopPropagation
+
+在事件处理函数中,可以使用 `e.stopPropagation()` 方法,来阻止本次事件向上的传递过程。注意,`e.stopPropagation()` 与 `bubble="true"` 不同,前者只会影响当前元素以及父元素的传播,不会影响子元素的传播;后者是为了版本兼容而增加的开关机制,会全局关闭或者开启冒泡机制,两者可以共同存在使用,如下:
+
+```javascript
+<template>
+ <div class="root" onclick="rootClick" bubble="true">
+ <div>
+ <text style="font-size: 40px;">{{rootText}}</text>
+ </div>
+ <div class="outer" onclick="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" onclick="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ e.stopPropagation()
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ // e.stopPropagation()
+ }
+ }
+ }
+</script>
+
+<style>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/weex/0cab45a7c62e8bebedd2ffd83a8e1256)
+
+运行以上代码,用客户端打开,点击中间的元素,可以看到事件向上传播到父元素被终止,不再继续往根元素传播。
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d9d12ab/doc/source/references/bubble.md
----------------------------------------------------------------------
diff --git a/doc/source/references/bubble.md b/doc/source/references/bubble.md
new file mode 100644
index 0000000..c66d9b9
--- /dev/null
+++ b/doc/source/references/bubble.md
@@ -0,0 +1,146 @@
+---
+title: Event Bubble
+type: references
+order: 1.3
+version: 2.1
+---
+
+# Event Bubble <span class="api-version">v0.13+</span>
+
+Weex 2.0 implements the W3C standard event bubbling mechanism.
+
+### Usage
+
+```javascript
+<template>
+ <div class="root" @click="rootClick" bubble="true">
+ <text style="font-size: 40px;">{{rootText}}</text>
+ <div class="outer" @click="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" @click="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ }
+ }
+ }
+</script>
+
+<style scoped>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/vue/fa2957ce3e9eb47ad9ae1da22d845e95)
+
+Run the above code, open with the client, click on the middle of the elements, you can see the event spread up, followed by the trigger.
+
+### Notice
+
+One thing should be noticed: **For compatibility with previous versions, Weex does not turn on event bubbling by default. You need to add `bubble = "true"` on the root element's properties to turn on the bubbling mechanism. Otherwise, the event will not be propagated upwards, keeping the same effect as the previous version.**
+
+### stopPropagation
+
+In the event handler function, you can use the `e.stopPropagation()` method to prevent the event from escalating. Note that `e.stopPropagation()` differs from `bubble = "true"`, which affects only the current elements and the propagation of parent elements, without affecting the propagation of child elements; the latter is a switching mechanism that is added for compatibility, Will be a global shutdown or open the bubble mechanism, the two can co-exist, as follows:
+
+```javascript
+<template>
+ <div class="root" @click="rootClick" bubble="true">
+ <text style="font-size: 40px;">{{rootText}}</text>
+ <div class="outer" @click="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" @click="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ e.stopPropagation()
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ // e.stopPropagation()
+ }
+ }
+ }
+</script>
+
+<style scoped>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/vue/2cc80e19c9b2430fb780234628065a69)
+
+Run the above code, open with the client, click on the middle of the element, you can see the event up to the parent element is terminated, no longer continue to spread to the root element.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d9d12ab/doc/source/references/index.md
----------------------------------------------------------------------
diff --git a/doc/source/references/index.md b/doc/source/references/index.md
index 2bda820..efbb296 100644
--- a/doc/source/references/index.md
+++ b/doc/source/references/index.md
@@ -15,3 +15,4 @@ version: 2.1
- [Color name](./color-names.html)
- [Gesture](./gesture.html)
- [path](./path.html)
+- [event bubble](./bubble.html)
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d9d12ab/doc/source/v-0.10/references/bubble.md
----------------------------------------------------------------------
diff --git a/doc/source/v-0.10/references/bubble.md b/doc/source/v-0.10/references/bubble.md
new file mode 100644
index 0000000..849ab36
--- /dev/null
+++ b/doc/source/v-0.10/references/bubble.md
@@ -0,0 +1,150 @@
+---
+title: Event Bubble
+type: references
+order: 1.3
+version: 2.1
+---
+
+# Event Bubble <span class="api-version">v0.13+</span>
+
+Weex 2.0 implements the W3C standard event bubbling mechanism.
+
+### Usage
+
+```javascript
+<template>
+ <div class="root" onclick="rootClick" bubble="true">
+ <div>
+ <text style="font-size: 40px;">{{rootText}}</text>
+ </div>
+ <div class="outer" onclick="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" onclick="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ }
+ }
+ }
+</script>
+
+<style>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/weex/dbfeb926e003986e2eea88c8ccdadb92)
+
+Run the above code, open with the client, click on the middle of the elements, you can see the event spread up, followed by the trigger.
+
+### Notice
+
+One thing should be noticed: **For compatibility with previous versions, Weex does not turn on event bubbling by default. You need to add `bubble = "true"` on the root element's properties to turn on the bubbling mechanism. Otherwise, the event will not be propagated upwards, keeping the same effect as the previous version.**
+
+### stopPropagation
+
+In the event handler function, you can use the `e.stopPropagation()` method to prevent the event from escalating. Note that `e.stopPropagation()` differs from `bubble = "true"`, which affects only the current elements and the propagation of parent elements, without affecting the propagation of child elements; the latter is a switching mechanism that is added for compatibility, Will be a global shutdown or open the bubble mechanism, the two can co-exist, as follows:
+
+```javascript
+<template>
+ <div class="root" onclick="rootClick" bubble="true">
+ <div>
+ <text style="font-size: 40px;">{{rootText}}</text>
+ </div>
+ <div class="outer" onclick="parentClick">
+ <div>
+ <text style="font-size: 40px;">{{parentText}}</text>
+ </div>
+ <text class="inner" onclick="click">{{innerText}}</text>
+ </div>
+ </div>
+</template>
+
+<script>
+ module.exports = {
+ data: {
+ innerText: 'click me',
+ parentText: '',
+ rootText: ''
+ },
+ methods: {
+ click: function(e) {
+ this.innerText = 'inner bubble'
+ },
+ parentClick: function(e) {
+ this.parentText = 'parent bubble'
+ e.stopPropagation()
+ },
+ rootClick: function(e) {
+ this.rootText = 'root bubble'
+ // e.stopPropagation()
+ }
+ }
+ }
+</script>
+
+<style>
+ .inner {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a9b1b;
+ padding: 40px;
+ }
+
+ .outer {
+ font-size: 40px;
+ text-align: center;
+ background-color: #9b7a1b;
+ padding: 120px;
+ }
+
+ .root {
+ font-size: 40px;
+ text-align: center;
+ background-color: #7a1b9b;
+ padding: 80px;
+ }
+</style>
+```
+
+[try it](http://dotwe.org/weex/0cab45a7c62e8bebedd2ffd83a8e1256)
+
+Run the above code, open with the client, click on the middle of the element, you can see the event up to the parent element is terminated, no longer continue to spread to the root element.
[13/23] incubator-weex git commit: Merge branch '0.13-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d184e1bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d184e1bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d184e1bb
Branch: refs/heads/0.13-dev
Commit: d184e1bb4f611181eefdf9239975222e4abebe5a
Parents: dd29a23 71dbb5b
Author: sospartan <so...@apache.org>
Authored: Thu May 4 18:29:46 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu May 4 18:29:46 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
[16/23] incubator-weex git commit: Merge branch '0.13-dev' of
https://github.com/fkysly/incubator-weex into 0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of https://github.com/fkysly/incubator-weex into 0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/4794dd7b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4794dd7b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4794dd7b
Branch: refs/heads/0.13-dev
Commit: 4794dd7b3be1372759b4cc986bbda44ad8158107
Parents: 2e7d164 77cdc18
Author: MrRaindrop <te...@gmail.com>
Authored: Fri May 5 14:18:00 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Fri May 5 14:18:00 2017 +0800
----------------------------------------------------------------------
doc/source/cn/references/bubble.md | 146 ++++++++++++++++++++++++
doc/source/cn/references/downgrade.md | 11 ++
doc/source/cn/references/index.md | 4 +-
doc/source/cn/v-0.10/references/bubble.md | 150 +++++++++++++++++++++++++
doc/source/references/bubble.md | 146 ++++++++++++++++++++++++
doc/source/references/downgrade.md | 11 ++
doc/source/references/index.md | 2 +
doc/source/v-0.10/references/bubble.md | 150 +++++++++++++++++++++++++
html5/runtime/vdom/document.js | 4 +-
html5/runtime/vdom/element.js | 25 ++++-
html5/test/unit/default/vm/vm.js | 2 +-
package.json | 4 +-
12 files changed, 645 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
[05/23] incubator-weex git commit: * [android] fix the incorrect
image size
Posted by ac...@apache.org.
* [android] fix the incorrect image size
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/73f1038f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/73f1038f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/73f1038f
Branch: refs/heads/0.13-dev
Commit: 73f1038f6a1ed82f84b983a404447350a24bb778
Parents: 42f2a85
Author: moxun.ljf <fu...@foxmail.com>
Authored: Wed May 3 11:17:41 2017 +0800
Committer: moxun.ljf <fu...@foxmail.com>
Committed: Wed May 3 11:17:41 2017 +0800
----------------------------------------------------------------------
.../com/taobao/weex/ui/view/WXImageView.java | 31 +++++++++++++++++---
1 file changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/73f1038f/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java
index 32baa00..dd7b2bc 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/view/WXImageView.java
@@ -32,6 +32,7 @@ import com.taobao.weex.ui.component.WXImage;
import com.taobao.weex.ui.view.gesture.WXGesture;
import com.taobao.weex.ui.view.gesture.WXGestureObservable;
import com.taobao.weex.utils.ImageDrawable;
+import com.taobao.weex.utils.WXLogUtils;
import java.lang.ref.WeakReference;
import java.util.Arrays;
@@ -130,8 +131,19 @@ public class WXImageView extends ImageView implements WXGestureObservable,
@Override
public int getNaturalWidth() {
Drawable drawable = getDrawable();
- if (drawable != null && drawable instanceof ImageDrawable) {
- return ((ImageDrawable) drawable).getBitmapWidth();
+ if (drawable != null) {
+ if (drawable instanceof ImageDrawable) {
+ return ((ImageDrawable) drawable).getBitmapWidth();
+ } else if (drawable instanceof BitmapDrawable) {
+ Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap();
+ if (bitmap != null) {
+ return bitmap.getWidth();
+ } else {
+ WXLogUtils.w("WXImageView", "Bitmap on " + drawable.toString() + " is null");
+ }
+ } else {
+ WXLogUtils.w("WXImageView", "Not supported drawable type: " + drawable.getClass().getSimpleName());
+ }
}
return -1;
}
@@ -139,8 +151,19 @@ public class WXImageView extends ImageView implements WXGestureObservable,
@Override
public int getNaturalHeight() {
Drawable drawable = getDrawable();
- if (drawable != null && drawable instanceof ImageDrawable) {
- return ((ImageDrawable) drawable).getBitmapHeight();
+ if (drawable != null) {
+ if (drawable instanceof ImageDrawable) {
+ return ((ImageDrawable) drawable).getBitmapHeight();
+ } else if (drawable instanceof BitmapDrawable) {
+ Bitmap bitmap = ((BitmapDrawable) drawable).getBitmap();
+ if (bitmap != null) {
+ return bitmap.getHeight();
+ } else {
+ WXLogUtils.w("WXImageView", "Bitmap on " + drawable.toString() + " is null");
+ }
+ } else {
+ WXLogUtils.w("WXImageView", "Not supported drawable type: " + drawable.getClass().getSimpleName());
+ }
}
return -1;
}
[10/23] incubator-weex git commit: Merge branch '0.13-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into apache-0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into apache-0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/2aafe9d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/2aafe9d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/2aafe9d9
Branch: refs/heads/0.13-dev
Commit: 2aafe9d9546b360799e422fb0accc8113796800b
Parents: 3b2ab91 59062f3
Author: acton393 <zh...@gmail.com>
Authored: Thu May 4 14:13:22 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu May 4 14:13:22 2017 +0800
----------------------------------------------------------------------
.../com/taobao/weex/ui/view/WXImageView.java | 31 +++++++++++++++++---
1 file changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
[09/23] incubator-weex git commit: Merge branch '0.13-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/59062f36
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/59062f36
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/59062f36
Branch: refs/heads/0.13-dev
Commit: 59062f36c14c00da3988fa4424de6e0c1e0674cb
Parents: e795fd5 b33a2fe
Author: sospartan <so...@apache.org>
Authored: Thu May 4 13:54:38 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu May 4 13:54:38 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 69 ++++++++++++++++----
.../WeexSDK/Sources/Component/WXAComponent.m | 8 +--
.../Sources/Component/WXImageComponent.m | 9 ++-
.../Sources/Component/WXVideoComponent.m | 12 ++--
.../WeexSDK/Sources/Component/WXWebComponent.m | 10 +--
ios/sdk/WeexSDK/Sources/Manager/WXRuleManager.m | 8 +--
ios/sdk/WeexSDK/Sources/Module/WXStreamModule.m | 6 +-
.../Sources/Protocol/WXURLRewriteProtocol.h | 5 +-
test/scripts/util.js | 2 +-
9 files changed, 90 insertions(+), 39 deletions(-)
----------------------------------------------------------------------
[14/23] incubator-weex git commit: * [ios] add config protocol
Posted by ac...@apache.org.
* [ios] add config protocol
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8f1ffa27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8f1ffa27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8f1ffa27
Branch: refs/heads/0.13-dev
Commit: 8f1ffa2724002189e94c9e56f59d67092e9741ed
Parents: 3b2ab91
Author: acton393 <zh...@gmail.com>
Authored: Thu May 4 19:37:53 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Thu May 4 19:37:53 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 4 ++++
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 9 ++++++++-
.../Sources/Protocol/WXConfigCenterProtocol.h | 20 ++++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8f1ffa27/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
index 4e22eba..f9b8000 100644
--- a/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
+++ b/ios/sdk/WeexSDK.xcodeproj/project.pbxproj
@@ -271,6 +271,7 @@
DC03ADB91D508719003F76E7 /* WXTextAreaComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = DC03ADB71D508719003F76E7 /* WXTextAreaComponent.m */; };
DC03ADBA1D508719003F76E7 /* WXTextAreaComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = DC03ADB81D508719003F76E7 /* WXTextAreaComponent.h */; };
DC0F99311D48E5320087C6AF /* WeexSDK.h in Headers */ = {isa = PBXBuildFile; fileRef = DC0F99301D48E5320087C6AF /* WeexSDK.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ DC6836E61EBB12B200AD2D84 /* WXConfigCenterProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
DC9867441D826D1E000AF388 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC9867431D826D1E000AF388 /* GLKit.framework */; };
DC9F46831D61AC8800A88239 /* WXStreamModuleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DC9F46821D61AC8800A88239 /* WXStreamModuleTests.m */; };
DC9F46871D61BA8C00A88239 /* wx_load_error@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 59AC02501D2A7E6E00355112 /* wx_load_error@3x.png */; };
@@ -585,6 +586,7 @@
DC03ADB71D508719003F76E7 /* WXTextAreaComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXTextAreaComponent.m; sourceTree = "<group>"; };
DC03ADB81D508719003F76E7 /* WXTextAreaComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXTextAreaComponent.h; sourceTree = "<group>"; };
DC0F99301D48E5320087C6AF /* WeexSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeexSDK.h; sourceTree = "<group>"; };
+ DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXConfigCenterProtocol.h; sourceTree = "<group>"; };
DC9867431D826D1E000AF388 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
DC9F46821D61AC8800A88239 /* WXStreamModuleTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXStreamModuleTests.m; sourceTree = "<group>"; };
DCA0EF621D6EED6F00CB18B9 /* WXGlobalEventModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXGlobalEventModule.h; sourceTree = "<group>"; };
@@ -994,6 +996,7 @@
59A582D31CF481110081FD3E /* WXAppMonitorProtocol.h */,
74EF31A91DE58AE600667A07 /* WXURLRewriteProtocol.h */,
042013AC1E66CD6A001FC79C /* WXValidateProtocol.h */,
+ DC6836E51EBB12B200AD2D84 /* WXConfigCenterProtocol.h */,
);
path = Protocol;
sourceTree = "<group>";
@@ -1215,6 +1218,7 @@
775BEE4E1C16F993008D1629 /* WXDefine.h in Headers */,
59597F981D2A041700EE9317 /* WXDebugLoggerBridge.h in Headers */,
77D161241C02DDD10010B15B /* WXSDKInstance.h in Headers */,
+ DC6836E61EBB12B200AD2D84 /* WXConfigCenterProtocol.h in Headers */,
74A4BAA61CB4F98300195969 /* WXStreamModule.h in Headers */,
740451EA1E14BB26004157CB /* WXServiceFactory.h in Headers */,
744BEA591D0520F300452B5D /* WXComponent+Layout.h in Headers */,
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8f1ffa27/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
index 85ca4e2..c546d42 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
@@ -38,6 +38,8 @@
#import "WXResourceLoader.h"
#import "WXSDKEngine.h"
#import "WXValidateProtocol.h"
+#import "WXConfigCenterProtocol.h"
+#import "WXTextComponent.h"
NSString *const bundleUrlOptionKey = @"bundleUrl";
@@ -187,10 +189,15 @@ typedef enum : NSUInteger {
self.onCreate(_rootView);
}
});
-
// ensure default modules/components/handlers are ready before create instance
[WXSDKEngine registerDefaults];
+ id configCenter = [WXSDKEngine handlerForProtocol:@protocol(WXConfigCenterProtocol)];
+ if ([configCenter respondsToSelector:@selector(configForKey:defaultValue:isDefault:)]) {
+ BOOL useCoreText = [[configCenter configForKey:@"iOS_weex_ext_config.text_render_useCoreText" defaultValue:@false isDefault:NULL] boolValue];
+ [WXTextComponent setRenderUsingCoreText:useCoreText];
+ }
+
[[WXSDKManager bridgeMgr] createInstance:self.instanceId template:mainBundleString options:dictionary data:_jsData];
WX_MONITOR_PERF_SET(WXPTBundleSize, [mainBundleString lengthOfBytesUsingEncoding:NSUTF8StringEncoding], self);
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8f1ffa27/ios/sdk/WeexSDK/Sources/Protocol/WXConfigCenterProtocol.h
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Protocol/WXConfigCenterProtocol.h b/ios/sdk/WeexSDK/Sources/Protocol/WXConfigCenterProtocol.h
new file mode 100644
index 0000000..9d71409
--- /dev/null
+++ b/ios/sdk/WeexSDK/Sources/Protocol/WXConfigCenterProtocol.h
@@ -0,0 +1,20 @@
+//
+// WXConfigCenterProtocol.h
+// WeexSDK
+//
+// Created by zifan.zx on 2017/5/4.
+// Copyright © 2017年 taobao. All rights reserved.
+//
+
+@protocol WXConfigCenterProtocol <NSObject>
+
+/**
+ get config from config center handler
+ @param key the key for config
+ @param defaultValue default value for key if the key is not exist.
+ @param isDefault whether the value is default value
+ @return the value for config key
+ */
+- (id)configForKey:(NSString*)key defaultValue:(id)defaultValue isDefault:(BOOL*)isDefault;
+
+@end
[18/23] incubator-weex git commit: Merge branch '0.13-dev' of
https://github.com/acton393/incubator-weex into apache-0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of https://github.com/acton393/incubator-weex into apache-0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/53695c73
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/53695c73
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/53695c73
Branch: refs/heads/0.13-dev
Commit: 53695c73670c65fe64faa56bcbc0521bd708e7f3
Parents: d184e1b f03e671
Author: acton393 <zh...@gmail.com>
Authored: Fri May 5 17:44:18 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri May 5 17:44:18 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Events/WXComponent+Events.m | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
[07/23] incubator-weex git commit: + [doc] weex 2.0 downgrade
Posted by ac...@apache.org.
+ [doc] weex 2.0 downgrade
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/77cdc187
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/77cdc187
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/77cdc187
Branch: refs/heads/0.13-dev
Commit: 77cdc18724d4a2f5469f21488b964dc6e96d7eb6
Parents: a6f71be
Author: fkysly <fk...@gmail.com>
Authored: Wed May 3 17:05:32 2017 +0800
Committer: fkysly <fk...@gmail.com>
Committed: Wed May 3 17:05:32 2017 +0800
----------------------------------------------------------------------
doc/source/cn/references/downgrade.md | 11 +++++++++++
doc/source/cn/references/index.md | 3 ++-
doc/source/references/downgrade.md | 11 +++++++++++
doc/source/references/index.md | 1 +
4 files changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/77cdc187/doc/source/cn/references/downgrade.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/downgrade.md b/doc/source/cn/references/downgrade.md
new file mode 100644
index 0000000..1393c2b
--- /dev/null
+++ b/doc/source/cn/references/downgrade.md
@@ -0,0 +1,11 @@
+---
+title: 降级方案
+type: references
+order: 1.3
+version: 2.1
+---
+
+# 降级方案
+
+Weex 2.0 降级方案改成模块的形式支持,具体请参考[downgrade](https://www.npmjs.com/package/@weex-project/downgrade)
+
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/77cdc187/doc/source/cn/references/index.md
----------------------------------------------------------------------
diff --git a/doc/source/cn/references/index.md b/doc/source/cn/references/index.md
index 65e4769..9988c3c 100644
--- a/doc/source/cn/references/index.md
+++ b/doc/source/cn/references/index.md
@@ -15,4 +15,5 @@ version: 2.1
- [颜色名称](./color-names.html)
- [手势](./gesture.html)
- [路径](./path.html)
-- [事件冒泡](./bubble.html)
\ No newline at end of file
+- [事件冒泡](./bubble.html)
+- [降级方案](./downgrade.html)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/77cdc187/doc/source/references/downgrade.md
----------------------------------------------------------------------
diff --git a/doc/source/references/downgrade.md b/doc/source/references/downgrade.md
new file mode 100644
index 0000000..f0271b1
--- /dev/null
+++ b/doc/source/references/downgrade.md
@@ -0,0 +1,11 @@
+---
+title: downgrade
+type: references
+order: 1.3
+version: 2.1
+---
+
+# downgrade
+
+Weex 2.0 downgrade change to module,please refer to [downgrade](https://www.npmjs.com/package/@weex-project/downgrade)
+
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/77cdc187/doc/source/references/index.md
----------------------------------------------------------------------
diff --git a/doc/source/references/index.md b/doc/source/references/index.md
index efbb296..b20a713 100644
--- a/doc/source/references/index.md
+++ b/doc/source/references/index.md
@@ -16,3 +16,4 @@ version: 2.1
- [Gesture](./gesture.html)
- [path](./path.html)
- [event bubble](./bubble.html)
+- [downgrade](./downgrade.html)
[12/23] incubator-weex git commit: * [android] use Activity class to
construct intent for opening url
Posted by ac...@apache.org.
* [android] use Activity class to construct intent for opening url
old way ‘new Intent(WEEX_ACTION, uri)’ will crash after android 7.0
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/dd29a23d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/dd29a23d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/dd29a23d
Branch: refs/heads/0.13-dev
Commit: dd29a23d6634a368218dad013aa404b2f3bfa8c6
Parents: 2aafe9d
Author: sospartan <so...@apache.org>
Authored: Thu May 4 18:28:11 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Thu May 4 18:28:11 2017 +0800
----------------------------------------------------------------------
.../main/java/com/alibaba/weex/extend/module/WXEventModule.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dd29a23d/android/playground/app/src/main/java/com/alibaba/weex/extend/module/WXEventModule.java
----------------------------------------------------------------------
diff --git a/android/playground/app/src/main/java/com/alibaba/weex/extend/module/WXEventModule.java b/android/playground/app/src/main/java/com/alibaba/weex/extend/module/WXEventModule.java
index 098681d..10a51cd 100644
--- a/android/playground/app/src/main/java/com/alibaba/weex/extend/module/WXEventModule.java
+++ b/android/playground/app/src/main/java/com/alibaba/weex/extend/module/WXEventModule.java
@@ -22,6 +22,7 @@ import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
+import com.alibaba.weex.WXPageActivity;
import com.taobao.weex.annotation.JSMethod;
import com.taobao.weex.common.WXModule;
@@ -49,7 +50,9 @@ public class WXEventModule extends WXModule {
}
Uri uri = Uri.parse(builder.toString());
- Intent intent = new Intent(WEEX_ACTION, uri);
+ Intent intent = new Intent(mWXSDKInstance.getContext(),WXPageActivity.class);
+ intent.setAction(WEEX_ACTION);
+ intent.setData(uri);
intent.addCategory(WEEX_CATEGORY);
mWXSDKInstance.getContext().startActivity(intent);
[11/23] incubator-weex git commit: + [ios] add feature b to a
Posted by ac...@apache.org.
+ [ios] add feature b to a
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/71dbb5b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/71dbb5b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/71dbb5b2
Branch: refs/heads/0.13-dev
Commit: 71dbb5b234380039e64ef8f989b8ab99e33a3d18
Parents: 2aafe9d
Author: 齐山 <su...@163.com>
Authored: Thu May 4 16:06:49 2017 +0800
Committer: 齐山 <su...@163.com>
Committed: Thu May 4 16:06:49 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/71dbb5b2/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
index 7071e1f..1cd52ee 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m
@@ -90,6 +90,20 @@
[weakSelf triggerClearTimeout:[ret toString]];
};
+ _jsContext[@"btoa"] = ^(JSValue *value ) {
+ NSData *nsdata = [[value toString]
+ dataUsingEncoding:NSUTF8StringEncoding];
+ NSString *base64Encoded = [nsdata base64EncodedStringWithOptions:0];
+ return base64Encoded;
+ };
+ _jsContext[@"atob"] = ^(JSValue *value ) {
+ NSData *nsdataFromBase64String = [[NSData alloc]
+ initWithBase64EncodedString:[value toString] options:0];
+ NSString *base64Decoded = [[NSString alloc]
+ initWithData:nsdataFromBase64String encoding:NSUTF8StringEncoding];
+ return base64Decoded;
+ };
+
_jsContext[@"nativeLog"] = ^() {
static NSDictionary *levelMap;
static dispatch_once_t onceToken;
[06/23] incubator-weex git commit: Merge branch '0.13-dev' of
github.com:apache/incubator-weex into 0.13-dev
Posted by ac...@apache.org.
Merge branch '0.13-dev' of github.com:apache/incubator-weex into 0.13-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a6f71be6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a6f71be6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a6f71be6
Branch: refs/heads/0.13-dev
Commit: a6f71be60146edbabf6fc54c504442d384bb2316
Parents: 3adf41d 5c1ffb7
Author: fkysly <fk...@gmail.com>
Authored: Wed May 3 16:57:47 2017 +0800
Committer: fkysly <fk...@gmail.com>
Committed: Wed May 3 16:57:47 2017 +0800
----------------------------------------------------------------------
.travis.yml | 6 +
android/.gitignore | 4 +-
android/README.md | 6 +
android/build.gradle | 44 +++
android/codeStyleSettings.xml | 393 +++++++++++++++++++
android/commons/build.gradle | 38 +-
android/gradle.properties | 16 +
android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 52266 bytes
.../gradle/wrapper/gradle-wrapper.properties | 6 +
android/gradlew | 164 ++++++++
android/gradlew.bat | 90 +++++
android/license/LICENSE | 16 +
android/playground/LICENSE | 202 ----------
android/playground/NOTICE | 7 -
android/playground/README.md | 5 -
android/playground/app/build.gradle | 25 +-
.../java/com/alibaba/weex/WXPageActivity.java | 3 +-
android/playground/build.gradle | 22 --
android/playground/codeStyleSettings.xml | 393 -------------------
android/playground/gradle.properties | 16 -
.../gradle/wrapper/gradle-wrapper.jar | Bin 51018 -> 0 bytes
.../gradle/wrapper/gradle-wrapper.properties | 8 -
android/playground/gradlew | 164 --------
android/playground/gradlew.bat | 90 -----
android/playground/settings.gradle | 10 -
android/run-ci.sh | 6 +-
android/sdk/.gitignore | 3 +-
android/sdk/NOTICE | 13 -
android/sdk/build.gradle | 51 +--
android/sdk/gradle/wrapper/gradle-wrapper.jar | Bin 53637 -> 0 bytes
.../gradle/wrapper/gradle-wrapper.properties | 7 -
android/sdk/gradlew | 160 --------
android/sdk/gradlew.bat | 90 -----
android/sdk/license/LICENSE | 16 -
.../license/license-gradle-plugin-0.12.1.jar | Bin 329739 -> 0 bytes
.../license/maven-license-plugin-1.10.b1.jar | Bin 57954 -> 0 bytes
android/sdk/license/plexus-utils-3.0.24.jar | Bin 247351 -> 0 bytes
.../taobao/weex/dom/WXRecyclerDomObject.java | 2 +-
.../java/com/taobao/weex/utils/WXUtilsTest.java | 16 +-
android/sdk/unittest.sh | 3 -
android/settings.gradle | 9 +
android/weex_debug/build.gradle | 25 +-
.../gradle/wrapper/gradle-wrapper.jar | Bin 51018 -> 0 bytes
.../gradle/wrapper/gradle-wrapper.properties | 6 -
android/weex_debug/gradlew | 164 --------
android/weex_debug/gradlew.bat | 90 -----
dangerfile-junit.js | 80 ++++
dangerfile.js | 4 +-
.../WeexDemo/Scanner/WXScannerHistoryVC.m | 25 +-
ios/sdk/WeexSDK.xcodeproj/project.pbxproj | 2 +-
.../WeexSDK/Sources/Component/WXTextComponent.m | 29 +-
ios/sdk/WeexSDK/Sources/Model/WXComponent.m | 1 +
package.json | 10 +-
test/pages/components/hyperlink.vue | 31 ++
test/pages/components/hyperlink_target.vue | 22 ++
test/pages/modules/vue_timer.vue | 75 ++++
test/pages/modules/we_timer.we | 73 ++++
test/run.sh | 2 +-
test/scripts/components/hyperlink.test.js | 44 +++
test/scripts/components/text.test.js | 2 +-
test/scripts/modules/timer.test.js | 100 +++++
61 files changed, 1283 insertions(+), 1606 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a6f71be6/package.json
----------------------------------------------------------------------