[incubator-weex] Git Push Summary

2017-07-20 Thread cxfeng
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev [created] da562689a


[10/27] incubator-weex git commit: Closes #10: invalid.

2017-07-20 Thread cxfeng
Closes #10: invalid.


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

Branch: refs/heads/0.16-dev
Commit: 5f96a2ceb656aaa2df1690af9d325922fee3d851
Parents: efc74a4
Author: MrRaindrop 
Authored: Mon Jul 3 11:49:36 2017 +0800
Committer: MrRaindrop 
Committed: Mon Jul 3 11:49:36 2017 +0800

--

--




[11/27] incubator-weex git commit: Closes #169: invalid.

2017-07-20 Thread cxfeng
Closes #169: invalid.


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

Branch: refs/heads/0.16-dev
Commit: 6d395f5d5df06fe6971c22cf070d72411e11bb5a
Parents: 5f96a2c
Author: MrRaindrop 
Authored: Mon Jul 3 11:53:02 2017 +0800
Committer: MrRaindrop 
Committed: Mon Jul 3 11:53:02 2017 +0800

--

--




[05/27] incubator-weex git commit: Merge branch 'dev' of https://github.com/MrRaindrop/incubator-weex into dev

2017-07-20 Thread cxfeng
Merge branch 'dev' of https://github.com/MrRaindrop/incubator-weex into 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/cf0bff04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/cf0bff04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/cf0bff04

Branch: refs/heads/0.16-dev
Commit: cf0bff04a750f94d6285d329087e2955b1d1d292
Parents: a53deeb 21a8032
Author: tancy 
Authored: Fri Jun 30 11:21:51 2017 +0800
Committer: tancy 
Committed: Fri Jun 30 11:21:51 2017 +0800

--
 doc/source/cn/references/weex-variable.md | 2 +-
 doc/source/references/weex-variable.md| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--




[02/27] incubator-weex git commit: * [doc] correct platform information.x

2017-07-20 Thread cxfeng
* [doc] correct platform information.x


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

Branch: refs/heads/0.16-dev
Commit: 21a8032fc332e2121488389706e26d5d2266b4e1
Parents: 44e959a
Author: MrRaindrop 
Authored: Fri Jun 30 10:42:21 2017 +0800
Committer: MrRaindrop 
Committed: Fri Jun 30 10:42:21 2017 +0800

--
 doc/source/cn/references/weex-variable.md | 2 +-
 doc/source/references/weex-variable.md| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/21a8032f/doc/source/cn/references/weex-variable.md
--
diff --git a/doc/source/cn/references/weex-variable.md 
b/doc/source/cn/references/weex-variable.md
index 4630681..0848441 100644
--- a/doc/source/cn/references/weex-variable.md
+++ b/doc/source/cn/references/weex-variable.md
@@ -19,7 +19,7 @@ has_chapter_content: true
 * `weexVersion: string`: Weex sdk 版本。
 * `appName: string`: 应用名字。
 * `appVersion: string`: 应用版本。
-* `platform: string`: 平台信息,是 iOS、Android 还是 Web。
+* `platform: string`: 平台信息,是 'iOS'、'android' 还是 'Web'。
 * `osVersion: string`: 系统版本。
 * `deviceModel: string`: 设备型号 (仅原生应用)。
 * `deviceWidth: number`: 设备宽度。Weex 默认以宽度为 750px 
做适配渲染,要获得750px下的屏幕高度,可以通过 `height = 
750/deviceWidth*deviceHeight`  公式获得,可以使用到 CSS 
中,用来设置全屏尺寸

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/21a8032f/doc/source/references/weex-variable.md
--
diff --git a/doc/source/references/weex-variable.md 
b/doc/source/references/weex-variable.md
index b55eef5..c8806af 100644
--- a/doc/source/references/weex-variable.md
+++ b/doc/source/references/weex-variable.md
@@ -18,7 +18,7 @@ This variable contains all the environment information for 
the current Weex page
 + `WeexVersion: string`: Weex sdk version.
 + `AppName: string`: application name.
 + `AppVersion: string`: app version.
-+ `Platform: string`: platform information, that is iOS, Android or Web.
++ `Platform: string`: platform information, that is 'iOS', 'android' or 'Web'.
 + `OsVersion: string`: system version.
 + `DeviceModel: string`: device model (native application only).
 + `DeviceWidth: number`: device width



[15/27] incubator-weex git commit: Merge branch 'dev' of https://github.com/cxfeng1/incubator-weex into dev

2017-07-20 Thread cxfeng
Merge branch 'dev' of https://github.com/cxfeng1/incubator-weex into 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/515b003b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/515b003b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/515b003b

Branch: refs/heads/0.16-dev
Commit: 515b003ba769a9e153461d6f01017f33845eb8bd
Parents: 96ef64c e26e4a7
Author: tancy 
Authored: Tue Jul 4 16:47:23 2017 +0800
Committer: tancy 
Committed: Tue Jul 4 16:47:23 2017 +0800

--
 doc/source/references/components/list.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--




[21/27] incubator-weex git commit: Merge branch 'miyalee-patch-1' of https://github.com/miyalee/incubator-weex into dev

2017-07-20 Thread cxfeng
Merge branch 'miyalee-patch-1' of https://github.com/miyalee/incubator-weex 
into 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/4742d5d0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4742d5d0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4742d5d0

Branch: refs/heads/0.16-dev
Commit: 4742d5d098823120d2313016276cc5a27929a822
Parents: 1794375 4bcf7cc
Author: tancy 
Authored: Mon Jul 10 14:14:18 2017 +0800
Committer: tancy 
Committed: Mon Jul 10 14:14:18 2017 +0800

--
 doc/source/cn/references/common-style.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--




[06/27] incubator-weex git commit: * [doc] Add scroll event demo.

2017-07-20 Thread cxfeng
* [doc] Add scroll event demo.


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

Branch: refs/heads/0.16-dev
Commit: dd60d6566767418802450f6dd13e3fdfb16f28ac
Parents: cf0bff0
Author: yinfeng 
Authored: Fri Jun 30 17:09:53 2017 +0800
Committer: yinfeng 
Committed: Fri Jun 30 17:09:53 2017 +0800

--
 doc/source/cn/references/components/list.md | 4 ++--
 doc/source/cn/references/components/scroller.md | 2 +-
 doc/source/references/components/list.md| 4 +---
 doc/source/references/components/scroller.md| 4 ++--
 4 files changed, 6 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dd60d656/doc/source/cn/references/components/list.md
--
diff --git a/doc/source/cn/references/components/list.md 
b/doc/source/cn/references/components/list.md
index 2175bfc..be14d06 100644
--- a/doc/source/cn/references/components/list.md
+++ b/doc/source/cn/references/components/list.md
@@ -63,7 +63,7 @@ version: 2.1
 
 - `loadmore` 0.5+:如果列表滚动到底部将会立即触发这个事件,ä½
 å¯ä»¥åœ¨è¿™ä¸ªäº‹ä»¶çš„处理函数中加载下一页的列表项。
 - `onscroll` 0.11+: 
列表发生滚动时将会触发该事件,事件的默认抽æ 
·çŽ‡ä¸º10px,即列表每滚动10px触发一次,可通过属性`offset-accuracy`设置抽æ
 ·çŽ‡ã€‚
-  
+
   事件中 event 对象属性:
   - `contentSize {Object}`:列表的内容尺寸
 - `width {number}`: 列表内容宽度
@@ -74,7 +74,7 @@ version: 2.1
 
   [体验一下](http://dotwe.org/bc445ede8746a31360e3607d210304c5)
 
-- `scroll` 0.12+:列表滚动时触发这个事件。此事件回调中会给出当前`contentOffset`值。
+- `scroll` 0.12+:列表滚动时触发这个事件。此事件回调中会给出当前`contentOffset`值。参见
 [scroll event demo](http://dotwe.org/vue/9ef0e52bacaa20182a693f2187d851aa)。
 
   [体验一下](http://dotwe.org/weex/7ba3b6222d912b4b0b4aafb8248ca22f)
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dd60d656/doc/source/cn/references/components/scroller.md
--
diff --git a/doc/source/cn/references/components/scroller.md 
b/doc/source/cn/references/components/scroller.md
index dd74525..acac227 100644
--- a/doc/source/cn/references/components/scroller.md
+++ b/doc/source/cn/references/components/scroller.md
@@ -62,7 +62,7 @@ version: 2.1
 ## 事件
 
 - `loadmore` v0.5+:如果滚动到底部将会立即触发这个事件,ä½
 å¯ä»¥åœ¨è¿™ä¸ªäº‹ä»¶çš„处理函数中加载下一页的列表项。
-- `scroll` 0.11+: 
列表发生滚动时将会触发该事件,事件的默认抽æ 
·çŽ‡ä¸º10px,即列表每滚动10px触发一次,可通过属性`offset-accuracy`设置抽æ
 ·çŽ‡ã€‚
+- `scroll` 0.11+: 
列表发生滚动时将会触发该事件,事件的默认抽æ 
·çŽ‡ä¸º10px,即列表每滚动10px触发一次,可通过属性`offset-accuracy`设置抽æ
 ·çŽ‡ã€‚参见 [scroll event 
demo](http://dotwe.org/vue/9ef0e52bacaa20182a693f2187d851aa)。 
 
   事件中 event 对象属性:
   - `contentSize {Object}`:列表的内容尺寸

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dd60d656/doc/source/references/components/list.md
--
diff --git a/doc/source/references/components/list.md 
b/doc/source/references/components/list.md
index 1e69b94..12a62ee 100644
--- a/doc/source/references/components/list.md
+++ b/doc/source/references/components/list.md
@@ -91,9 +91,7 @@ common styles: check out [common styles for 
components](../common-style.html)
 
 onloadmore  0.5 used with loadmoreoffset attribute. if the view has less than 
loadmoreoffset to scroll down, the onloadmore event will be triggered.
 
-scroll  0.12+ used with offset-accuracy attribute. 
This event is fired when the list scrolls. The current contentOffset value is 
given in this event callback.
-
-[try](http://dotwe.org/weex/7ba3b6222d912b4b0b4aafb8248ca22f)
+scroll  0.12+ used with offset-accuracy attribute. 
This event is fired when the list scrolls. The current contentOffset value is 
given in this event callback. See details in [scroll event 
demo](http://dotwe.org/vue/9ef0e52bacaa20182a693f2187d851aa).
 
 common events: check out the [common events](../common-event.html)
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dd60d656/doc/source/references/components/scroller.md
--
diff --git a/doc/sou

[03/27] incubator-weex git commit: * [doc] update title style

2017-07-20 Thread cxfeng
* [doc] update title style


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

Branch: refs/heads/0.16-dev
Commit: 825c6e308effbb652c29369ab946e13754a6929d
Parents: 2510206
Author: tancy 
Authored: Fri Jun 30 11:08:30 2017 +0800
Committer: tancy 
Committed: Fri Jun 30 11:08:30 2017 +0800

--
 doc/themes/weex/source/css/index.scss | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/825c6e30/doc/themes/weex/source/css/index.scss
--
diff --git a/doc/themes/weex/source/css/index.scss 
b/doc/themes/weex/source/css/index.scss
index e1e744b..7d8614c 100644
--- a/doc/themes/weex/source/css/index.scss
+++ b/doc/themes/weex/source/css/index.scss
@@ -124,6 +124,7 @@
   top: 70px;
   left: 50%;
   margin-left: -250px;
+  line-height: 120%;
 }
 
 .btn-group {
@@ -226,6 +227,7 @@
   .left-text h2 {
 width: 300px;
 text-align: left;
+line-height: 120%;
   }
 
   .left-text p {



[25/27] incubator-weex git commit: * [doc] update input components document & bubble document

2017-07-20 Thread cxfeng
* [doc] update input components document & bubble document


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

Branch: refs/heads/0.16-dev
Commit: bf874113e47186bf11903db829d1a77765ad18c3
Parents: 3b9b5a5
Author: tancy 
Authored: Wed Jul 19 15:12:22 2017 +0800
Committer: tancy 
Committed: Wed Jul 19 15:12:22 2017 +0800

--
 doc/source/_posts/coreml.md  | 79 +++
 doc/source/_posts/hello_world.md |  3 +-
 doc/source/_posts/test.md| 14 
 doc/source/cn/references/bubble.md   |  4 +-
 doc/source/cn/references/components/input.md | 34 +-
 doc/source/cn/v-0.10/references/bubble.md|  6 +-
 doc/source/references/bubble.md  |  4 +-
 doc/source/references/components/input.md| 34 +-
 doc/source/v-0.10/references/bubble.md   |  8 +--
 9 files changed, 142 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bf874113/doc/source/_posts/coreml.md
--
diff --git a/doc/source/_posts/coreml.md b/doc/source/_posts/coreml.md
new file mode 100644
index 000..c628fb3
--- /dev/null
+++ b/doc/source/_posts/coreml.md
@@ -0,0 +1,79 @@
+title: Weex ❤️ iOS 11 系列之一:Core ML 初探
+type: blog
+date: 2017-06-21 15:46:44
+
+---
+
+## 背景
+
+WWDC 2017 有一个非常明确的信号:**端上机器学习
将会是未来苹果的一个重要发力点,同时开发者
的使用门槛在不断降低**。
+
+Core ML 是今年 WWDC 上苹果发布的机器学习框架。它å…
è®¸å¼€å‘者在自己开发的 app 上使用机器学习
,同时不需要收集用户数据。 有了 Core ML,你
可以将自己训练得到的模型,借助苹果提供的转换工å…
·ï¼Œè½¬åŒ–成 Core ML 类型的模型文件,你
可以非常轻松地直接实现模型和 app 数据的互通。
+
+WWDC 上展示了一张简单的架构图:
+
+![屏幕快照 2017-06-20 
下午8.50.21](https://gw.alicdn.com/tfs/TB1YT5dRVc1XFXX-498-392.png)
+
+最底层的 Accelerate 和 MPS,其实是苹果去年推出的接口,前者
可以直接调用 CPU,后者则直接调用 GPU。 Core ML 
会自行决定到底使用 CPU 还是 GPU 
来进行运算,可以最大程度地利用硬件资源来处理模型数据。
+
+而 Core ML 往上一层则是应用层。Vision 主要负责图像相å…
³çš„人工智能处理,如人脸识别、面部追踪、文字识别等等;NLP
 则提供语义分析相关 API。这部分内容在以前版本的 SDK 
中也存在,这次被集成到了新框架当中。好处在于,开发者
拥有了更大的自由度。在以前,开发者的 app 
调用这些高级接口,对底层的实现细节的掌控力度非常小。现在,ä½
 å¯ä»¥é€šè¿‡è‡ªå®šä¹‰åº•å±‚所使用的机器学习
模型,从而实现更个性化的需求。
+
+## Weex-ML
+
+Weex 交互视觉能力小结中提到,**Weex 最大的特别之处在于其 
native 的能力, 我们要最大化利用 native 的特性, 
而不是去模仿它**。
+
+作为本次 iOS 11 的一个重要 native 
能力,我也第一时间尝试将 Core ML 透传到了 Weex 上。所有代ç 
å’Œ Demo 都已开源到 
[Github](https://github.com/cxfeng1/Weex-ML),后续也会将机器学习相å…
³çš„Weex 模块统一放到 Weex Market 上。
+
+得益于 Core ML API 的简洁,在 Weex 上使用 Core ML 相å…
³èƒ½åŠ›å˜å¾—非常简单:
+
+```javascript
+let imageRecognition = weex.requireModule('imageRecognition')
+imageRecognition.predictWithImage(this.$refs.image.ref, (results)=>{
+  this.results = results.slice(0,5);
+})
+```
+
+通过调用透传的 module `imageRecognition` , 并传入 image 组件的 
ref 
作为参数,就可以实现图片识别的功能,最后提取出识别结果中
 confidence 最高的 5 个结果。
+
+## Demo
+
+### imageRecognition
+
+![](https://gw.alicdn.com/tfs/TB1AmqgRVcmXFXX-240-427.gif)
+
+使用 
[Inceptionv3](https://github.com/fchollet/keras/blob/0bb4e0fad5b4bb3743c8a7d03c260b62a35e7045/keras/applications/inception_v3.py)
 作为模型,能够高效识别, 该模型已经在 
[keras](https://github.com/fchollet/keras) 
中被训练好并通过苹果提供的工具转换成 **mlmodel** 文件, 
只需拖拽的方式就可以集成到 iOS 开发环境中, 上述 demo 
输出了对一张图片分类最大可能的5个预测结果, 对于 Weex 
来说,几行代码就能搞定。
+
+
+
+### digitDetect
+
+![](https://gw.alicdn.com/tfs/TB1nZ8_RVczXVXX-240-427.gif)
+
+上述 demo é¦

[22/27] incubator-weex git commit: * [doc] update docsearch apiKey

2017-07-20 Thread cxfeng
* [doc] update docsearch apiKey


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

Branch: refs/heads/0.16-dev
Commit: 081b7a3de3dd5c6d472773cd07b436bd09328449
Parents: 4742d5d
Author: parryworld 
Authored: Thu Jul 13 10:56:59 2017 +0800
Committer: parryworld 
Committed: Thu Jul 13 10:56:59 2017 +0800

--
 doc/_config.yml   | 6 --
 doc/_config_cn.yml| 6 --
 doc/themes/weex/layout/layout.ejs | 6 +++---
 3 files changed, 11 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/081b7a3d/doc/_config.yml
--
diff --git a/doc/_config.yml b/doc/_config.yml
index dd564d7..e262984 100644
--- a/doc/_config.yml
+++ b/doc/_config.yml
@@ -125,8 +125,10 @@ autoprefixer:
 # docsearch
 docsearch:
   enable: true
-  en: weex
-  cn: weex_cn
+  index_name_en: weex
+  index_name_cn: weex_cn
+  api_key_en: a6896fe3619315a7f04e9a76bfcb
+  api_key_cn: db5b2379e5ffbc33509585c35ccabba8
 
 alias:
   doc/index.html: index.html

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/081b7a3d/doc/_config_cn.yml
--
diff --git a/doc/_config_cn.yml b/doc/_config_cn.yml
index c98a00b..ef5679f 100644
--- a/doc/_config_cn.yml
+++ b/doc/_config_cn.yml
@@ -123,8 +123,10 @@ autoprefixer:
 # docsearch
 docsearch:
   enable: true
-  en: weex_io
-  cn: weex_io_cn
+  index_name_en: weex_io
+  index_name_cn: weex_io_cn
+  api_key_en: e487bb3d17e4fa1787db9976b086792c
+  api_key_cn: ce50ba9d18b3295d568b305a7171ceef
 
 alias:
   doc/index.html: index.html

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/081b7a3d/doc/themes/weex/layout/layout.ejs
--
diff --git a/doc/themes/weex/layout/layout.ejs 
b/doc/themes/weex/layout/layout.ejs
index 9e5ee1f..df3b12b 100644
--- a/doc/themes/weex/layout/layout.ejs
+++ b/doc/themes/weex/layout/layout.ejs
@@ -14,12 +14,12 @@
   <%- js('js/reqwest.js') %>
   <%- js('js/common.js') %>
   <% if (config.docsearch.enable){ %>
-<% index_name = page.path.indexOf('cn/') === 0 ? config.docsearch.cn : 
config.docsearch.en %>
+<% index_name = page.path.indexOf('cn/') === 0 ? 
config.docsearch.index_name_cn : config.docsearch.index_name_en %>
+<% api_key = page.path.indexOf('cn/') === 0 ? config.docsearch.api_key_cn 
: config.docsearch.api_key_en %>
 <%- js('js/docsearch.min.js') %>
 

[26/27] incubator-weex git commit: *[doc] add color-name file color block

2017-07-20 Thread cxfeng
*[doc] add color-name file color block


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

Branch: refs/heads/0.16-dev
Commit: 8a5e0ee7819e2c085b17fafc9b2ff6b86a3b4b46
Parents: bf87411
Author: tancy 
Authored: Wed Jul 19 17:15:49 2017 +0800
Committer: tancy 
Committed: Wed Jul 19 17:15:49 2017 +0800

--
 doc/themes/weex/source/js/common.js | 22 ++
 1 file changed, 22 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8a5e0ee7/doc/themes/weex/source/js/common.js
--
diff --git a/doc/themes/weex/source/js/common.js 
b/doc/themes/weex/source/js/common.js
index 3e92ba4..c3f6631 100644
--- a/doc/themes/weex/source/js/common.js
+++ b/doc/themes/weex/source/js/common.js
@@ -105,6 +105,28 @@
 
   initPickLang()
 
+ /**
+   * color name
+   */
+
+  function colorname(){
+if(location.pathname.indexOf('references/color-names.html')>0){
+  var t = document.querySelectorAll("table");
+  Array.prototype.forEach.call(t, function (table) {
+  var d = 
table.getElementsByTagName("tbody")[0].getElementsByTagName("tr");
+  Array.prototype.forEach.call(d, function (tr) {
+var r = tr.getElementsByTagName("td")[1];
+r.innerHTML =' yy   ' + r.innerHTML
+  });
+
+  });
+}
+  }
+
+  colorname();
+
+
+
   /**
*  Search
*/



[23/27] incubator-weex git commit: add weex-project.io website host by aliyun

2017-07-20 Thread cxfeng
add weex-project.io website host by aliyun


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

Branch: refs/heads/0.16-dev
Commit: b397774a8570c981c8a51c0eebb5ac8feb6e2591
Parents: 081b7a3
Author: tancy 
Authored: Fri Jul 14 17:37:15 2017 +0800
Committer: tancy 
Committed: Fri Jul 14 17:37:15 2017 +0800

--
 doc/themes/weex/layout/_partial/footer.ejs   |  2 +-
 doc/themes/weex/layout/_partial/post/summary.ejs |  6 ++
 doc/themes/weex/layout/_partial/slider.ejs   |  2 +-
 doc/themes/weex/source/css/partial/footer.scss   |  1 +
 doc/themes/weex/source/css/partial/summary.scss  |  6 ++
 doc/themes/weex/source/js/common.js  | 16 
 6 files changed, 31 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b397774a/doc/themes/weex/layout/_partial/footer.ejs
--
diff --git a/doc/themes/weex/layout/_partial/footer.ejs 
b/doc/themes/weex/layout/_partial/footer.ejs
index 289cfb8..0cbe7b2 100644
--- a/doc/themes/weex/layout/_partial/footer.ejs
+++ b/doc/themes/weex/layout/_partial/footer.ejs
@@ -27,4 +27,4 @@
   
 
   
-
\ No newline at end of file
+

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b397774a/doc/themes/weex/layout/_partial/post/summary.ejs
--
diff --git a/doc/themes/weex/layout/_partial/post/summary.ejs 
b/doc/themes/weex/layout/_partial/post/summary.ejs
index f6c6313..e81308d 100644
--- a/doc/themes/weex/layout/_partial/post/summary.ejs
+++ b/doc/themes/weex/layout/_partial/post/summary.ejs
@@ -1,5 +1,6 @@
 <% var result = page.path.match(/(v-)(\d+(\.\d+))/) %>
 <% var version = result ? +result[2] : 2.1 %>
+
 
   
   <% if (version == 2.1) { %>
@@ -45,4 +46,9 @@
 <% }) %>
 
   
+
+
+  https://render.alipay.com/p/s/taobaonpm_click/weex_banner_click";>
+https://render.alipay.com/p/s/taobaonpm_click/weex_banner"; 
alt="" width="180px">
+  
 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b397774a/doc/themes/weex/layout/_partial/slider.ejs
--
diff --git a/doc/themes/weex/layout/_partial/slider.ejs 
b/doc/themes/weex/layout/_partial/slider.ejs
index f35c58f..6ddf55e 100644
--- a/doc/themes/weex/layout/_partial/slider.ejs
+++ b/doc/themes/weex/layout/_partial/slider.ejs
@@ -6,7 +6,7 @@
   <%= _p('index.page_title') %>
   
 <%= _p('index.get_started') %>
-https://github.com/apache/incubator-weex/"; class="button 
get-started" target="_blank"><%= _p('menu.github') %>
+<%= _p('menu.invovled') %>
   
 
   

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b397774a/doc/themes/weex/source/css/partial/footer.scss
--
diff --git a/doc/themes/weex/source/css/partial/footer.scss 
b/doc/themes/weex/source/css/partial/footer.scss
index 922eb0b..1bc4c69 100644
--- a/doc/themes/weex/source/css/partial/footer.scss
+++ b/doc/themes/weex/source/css/partial/footer.scss
@@ -71,3 +71,4 @@
 margin-bottom: 10px;
   }
 }
+

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b397774a/doc/themes/weex/source/css/partial/summary.scss
--
diff --git a/doc/themes/weex/source/css/partial/summary.scss 
b/doc/themes/weex/source/css/partial/summary.scss
index 1b78b55..d9d4609 100644
--- a/doc/themes/weex/source/css/partial/summary.scss
+++ b/doc/themes/weex/source/css/partial/summary.scss
@@ -45,4 +45,10 @@
 
 .lang-en .summary h3.chapter-title{
   font-weight: 600;
+}
+
+.hostbyaliyun {
+  width: 180px;
+  z-index: 99;
+  display: none;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b397774a/doc/themes/weex/source/js/common.js
--
diff --git a/doc/themes/weex/source/js/common.js 
b/doc/themes/weex/source/js/common.js
index d45df41..3e92ba4 100644
--- a/doc/themes/weex/source/js/common.js
+++ b/doc/themes/weex/source/js/common.js
@@ -273,6 +273,22 @@
   }
 
   initSearch()
+
+
+  function hostbyaliyun(){
+if(location.hostname === "weex-project.io" || location.hostname === 
'localhost'){
+  var hosts = document.querySelectorAll('.hostbyaliyun');
+   hosts.forEach(function (i) {
+  i.style.display = 'block'
+})
+  
+}
+  }
+
+  hostbyaliyun()
+
+
+
  

[24/27] incubator-weex git commit: + [doc] update doc for proguard rules

2017-07-20 Thread cxfeng
+ [doc] update doc for proguard rules


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

Branch: refs/heads/0.16-dev
Commit: 3b9b5a54258a753ac3cc5337cb2ae360b4095e6e
Parents: b397774
Author: misakuo 
Authored: Mon Jul 17 10:51:44 2017 +0800
Committer: misakuo 
Committed: Mon Jul 17 10:51:44 2017 +0800

--
 .../cn/references/advanced/extend-to-android.md  | 15 ++-
 doc/source/cn/references/components/image.md |  2 +-
 doc/source/cn/references/components/list.md  |  6 +-
 doc/source/references/advanced/extend-to-android.md  | 14 ++
 doc/source/references/components/image.md|  2 +-
 5 files changed, 31 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/cn/references/advanced/extend-to-android.md
--
diff --git a/doc/source/cn/references/advanced/extend-to-android.md 
b/doc/source/cn/references/advanced/extend-to-android.md
index e2d654c..61a5bbf 100644
--- a/doc/source/cn/references/advanced/extend-to-android.md
+++ b/doc/source/cn/references/advanced/extend-to-android.md
@@ -185,4 +185,17 @@ public class ImageAdapter implements IWXImgLoaderAdapter {

```
 
-注:工程要添加依赖 `compile 'com.squareup.picasso:picasso:2.5.2'`
\ No newline at end of file
+注:工程要添加依赖 `compile 'com.squareup.picasso:picasso:2.5.2'`
+
+ SDK混淆规则
+若要在APP中使用混淆,请在相应的配置文件中添加
如下规则:
+
+```java
+-keep class com.taobao.weex.WXDebugTool{*;}
+-keep class com.taobao.weex.devtools.common.LogUtil{*;}
+-keep public class * extends com.taobao.weex.ui.component.WXComponent{*;}
+-keep public class * extends com.taobao.weex.common.WXModule{*;}
+-keepclassmembers class ** {
+  @com.taobao.weex.ui.component.WXComponentProp public *;
+}
+```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/cn/references/components/image.md
--
diff --git a/doc/source/cn/references/components/image.md 
b/doc/source/cn/references/components/image.md
index 7755618..bc675cb 100644
--- a/doc/source/cn/references/components/image.md
+++ b/doc/source/cn/references/components/image.md
@@ -82,7 +82,7 @@ version: 2.1
 
 ## 事件
 
-- `load`: v0.8+:当图片加
载完成时触发。目前在 Android、iOS 上支持,H5 
暂不支持。[示例](http://dotwe.org/vue/98ee340348d7cc3e6fbfe68dbaef1eed)
+- `load`: v0.8+:当图片加
载完成时触发。目前在 Android、iOS 上支持,H5 
暂不支持。[示例](http://dotwe.org/vue/e291159ac60b35dcd4994638a78d54ad)
 
   - 事件对象
 - `success`: 当图片成功加载时为`true`,否则为`false`

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/cn/references/components/list.md
--
diff --git a/doc/source/cn/references/components/list.md 
b/doc/source/cn/references/components/list.md
index be14d06..8e1e63c 100644
--- a/doc/source/cn/references/components/list.md
+++ b/doc/source/cn/references/components/list.md
@@ -62,7 +62,7 @@ version: 2.1
 ## 事件
 
 - `loadmore` 0.5+:如果列表滚动到底部将会立即触发这个事件,ä½
 å¯ä»¥åœ¨è¿™ä¸ªäº‹ä»¶çš„处理函数中加载下一页的列表项。
-- `onscroll` 0.11+: 
列表发生滚动时将会触发该事件,事件的默认抽æ 
·çŽ‡ä¸º10px,即列表每滚动10px触发一次,可通过属性`offset-accuracy`设置抽æ
 ·çŽ‡ã€‚
+- `scroll` 0.11+: 
列表发生滚动时将会触发该事件,事件的默认抽æ 
·çŽ‡ä¸º10px,即列表每滚动10px触发一次,可通过属性`offset-accuracy`设置抽æ
 ·çŽ‡ã€‚
 
   事件中 event 对象属性:
   - `contentSize {Object}`:列表的内容尺寸
@@ -74,10 +74,6 @@ version: 2.1
 
   [体验一下](http://dotwe.org/bc445ede8746a31360e3607d210304c5)
 
-- `scroll` 0.12+:列表滚动时触发这个事件。此事件回调中会给出当前`contentOffset`值。参见
 [scroll event demo](http://dotwe.org/vue/9ef0e52bacaa20182a693f2187d851aa)。
-
-  [体验一下](http://dotwe.org/weex/7ba3b6222d912b4b0b4aafb8248ca22f)
-
 - 通用事件
 
   支持所有通用事件:

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3b9b5a54/doc/source/references/advanced/extend-to-android.md
--
diff --git a/doc/source/references/advanced/extend-to-andro

[16/27] incubator-weex git commit: Update common-style.md

2017-07-20 Thread cxfeng
Update common-style.md

文案校对

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

Branch: refs/heads/0.16-dev
Commit: 4bcf7cc8d2bc19fbb7fe24c34f23abaa16cda48a
Parents: 92399a4
Author: miyalee 
Authored: Thu Jul 6 11:27:57 2017 +0800
Committer: GitHub 
Committed: Thu Jul 6 11:27:57 2017 +0800

--
 doc/source/cn/references/common-style.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4bcf7cc8/doc/source/cn/references/common-style.md
--
diff --git a/doc/source/cn/references/common-style.md 
b/doc/source/cn/references/common-style.md
index 8ba1a8a..a36d2cd 100644
--- a/doc/source/cn/references/common-style.md
+++ b/doc/source/cn/references/common-style.md
@@ -343,11 +343,11 @@ transform 属性向元素应用 2D 转换。该属性å…
è®¸æˆ‘们对元素进行
 
 Weex 支持四种伪类:`active`, `focus`, `disabled`, `enabled`
 
-所有组件都支持 `active`, 但只有 `input` 组件和 `textarea` 
组件支持 `focus`, `enabled`, `diabled`。
+所有组件都支持 `active`, 但只有 `input` 组件和 `textarea` 
组件支持 `focus`, `enabled`, `disabled`。
 
 ### 规则
 
-- 同时生效生效的时候,优先级高覆盖优先级低
+- 同时生效的时候,优先级高覆盖优先级低
 
- 例如:`input:active:enabled` 和 `input:active` 同时生效,前者
覆盖后者
 



[27/27] incubator-weex git commit: Merge branch 'dev' into 0.16-dev

2017-07-20 Thread cxfeng
Merge branch 'dev' into 0.16-dev

Conflicts:
doc/source/cn/references/weex-variable.md
doc/source/references/weex-variable.md


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

Branch: refs/heads/0.16-dev
Commit: f102f3fe1f08541ba34190c2b8f0f8185a10a553
Parents: da56268 8a5e0ee
Author: cxfeng 
Authored: Thu Jul 20 15:21:07 2017 +0800
Committer: cxfeng 
Committed: Thu Jul 20 15:21:07 2017 +0800

--
 doc/_config.yml |  6 +-
 doc/_config_cn.yml  |  6 +-
 doc/source/_posts/coreml.md | 79 
 doc/source/_posts/hello_world.md|  3 +-
 doc/source/_posts/test.md   | 14 
 .../cn/references/advanced/extend-to-android.md | 15 +++-
 doc/source/cn/references/bubble.md  |  4 +-
 doc/source/cn/references/common-style.md|  4 +-
 doc/source/cn/references/components/image.md|  2 +-
 doc/source/cn/references/components/input.md| 34 +
 doc/source/cn/references/components/list.md |  8 +-
 doc/source/cn/references/components/scroller.md |  2 +-
 doc/source/cn/references/weex-variable.md   |  2 +-
 doc/source/cn/v-0.10/references/bubble.md   |  6 +-
 doc/source/guide/intro/write-once.md| 14 ++--
 doc/source/guide/set-up-env.md  | 22 +++---
 .../references/advanced/extend-to-android.md| 14 
 doc/source/references/bubble.md |  4 +-
 doc/source/references/components/image.md   |  2 +-
 doc/source/references/components/input.md   | 34 +
 doc/source/references/components/list.md|  7 +-
 doc/source/references/components/scroller.md|  4 +-
 doc/source/v-0.10/references/bubble.md  |  8 +-
 doc/themes/weex/languages/cn.yml|  5 +-
 doc/themes/weex/languages/en.yml|  3 +-
 doc/themes/weex/layout/_partial/footer.ejs  |  2 +-
 doc/themes/weex/layout/_partial/header.ejs  | 23 +++---
 .../weex/layout/_partial/post/summary.ejs   |  6 ++
 doc/themes/weex/layout/_partial/slider.ejs  |  2 +-
 doc/themes/weex/layout/layout.ejs   |  6 +-
 doc/themes/weex/source/css/index.scss   |  2 +
 doc/themes/weex/source/css/partial/footer.scss  |  5 +-
 doc/themes/weex/source/css/partial/summary.scss |  6 ++
 doc/themes/weex/source/js/common.js | 38 ++
 34 files changed, 286 insertions(+), 106 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f102f3fe/doc/source/cn/references/weex-variable.md
--
diff --cc doc/source/cn/references/weex-variable.md
index 0de2b37,0848441..ac2c332
--- a/doc/source/cn/references/weex-variable.md
+++ b/doc/source/cn/references/weex-variable.md
@@@ -19,8 -19,7 +19,8 @@@ has_chapter_content: tru
  * `weexVersion: string`: Weex sdk 版本。
  * `appName: string`: 应用名字。
  * `appVersion: string`: 应用版本。
 -* `platform: string`: 平台信息,是 'iOS'、'android' 还是 'Web'。
 +* `platform: string`: 平台信息,是 iOS、Android 还是 Web。
- + `osName: string`: iOS或者android,表示操作系统的名称.
++* `osName: string`: iOS或者android,表示操作系统的名称.
  * `osVersion: string`: 系统版本。
  * `deviceModel: string`: 设备型号 (仅原生应用)。
  * `deviceWidth: number`: 设备宽度。Weex 默认以宽度为 750px 
做适配渲染,要获得750px下的屏幕高度,可以通过 `height = 
750/deviceWidth*deviceHeight`  公式获得,可以使用到 CSS 
中,用来设置全屏尺寸



[13/27] incubator-weex git commit: *[doc update footer link style]

2017-07-20 Thread cxfeng
*[doc update footer link style]


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

Branch: refs/heads/0.16-dev
Commit: 96ef64cc73f191de970d583df7520362d41f119f
Parents: af2267e
Author: tancy 
Authored: Tue Jul 4 14:29:44 2017 +0800
Committer: tancy 
Committed: Tue Jul 4 14:29:44 2017 +0800

--
 doc/themes/weex/source/css/partial/footer.scss | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/96ef64cc/doc/themes/weex/source/css/partial/footer.scss
--
diff --git a/doc/themes/weex/source/css/partial/footer.scss 
b/doc/themes/weex/source/css/partial/footer.scss
index 71d263f..922eb0b 100644
--- a/doc/themes/weex/source/css/partial/footer.scss
+++ b/doc/themes/weex/source/css/partial/footer.scss
@@ -6,7 +6,9 @@
   margin: 0;
   background: $bg-white;
   border-top: 1px solid #DD;
-
+  a{
+   text-decoration: underline 
+  }
   .ali-logo {
 width: 83px;
 height: 41px;



[17/27] incubator-weex git commit: Updated grammar in set-up-env.md

2017-07-20 Thread cxfeng
Updated grammar in set-up-env.md

Updated grammar in set-up-env.md

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

Branch: refs/heads/0.16-dev
Commit: 87dac9fed6dd3f8b90904d7fed0a4bb75865a9f7
Parents: 6d395f5
Author: Denny 
Authored: Fri Jul 7 20:34:03 2017 -0500
Committer: GitHub 
Committed: Fri Jul 7 20:34:03 2017 -0500

--
 doc/source/guide/set-up-env.md | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/87dac9fe/doc/source/guide/set-up-env.md
--
diff --git a/doc/source/guide/set-up-env.md b/doc/source/guide/set-up-env.md
index 702c347..6aac518 100644
--- a/doc/source/guide/set-up-env.md
+++ b/doc/source/guide/set-up-env.md
@@ -8,11 +8,11 @@ has_chapter_content: true
 
 # Set up development environment 
 
-Use dotWe is a good choice, But if you want to develop locally on your own 
machine, you will set up your development environment.
+Using [dotWe](http://dotwe.org/vue) is a good choice, but if you want to 
develop locally on your own machine, you will need to set up your development 
environment.
 
-You will need Node.js and the [Weex 
CLi](https://github.com/weexteam/weex-toolkit).
+You will need Node.js and the [Weex 
CLI](https://github.com/weexteam/weex-toolkit).
 
-You can installing Node using [nvm](https://github.com/creationix/nvm) (Simple 
bash script to manage multiple active node.js versions). Run the following 
commands in a Terminal after installing nvm:
+You can install Node using [nvm](https://github.com/creationix/nvm) (Simple 
bash script to manage multiple active node.js versions). Run the following 
commands in a Terminal after installing nvm:
 
 ```bash
 $ nvm install 6.10.0
@@ -41,13 +41,13 @@ Then you can use the weex command to verify that the 
installation is successful:
 
 ### Generate a new Weex project
 
-You can use CLi to generate a Weex project called "awesome-project". Run the 
following command in a Terminal:
+You can use CLI to generate a Weex project called "awesome-project". Run the 
following command in a Terminal:
 
 ```bash
 $ weex init awesome-project
 ```
 
-Then we enter the awesome-project folder, the CLi has been for us to generate 
a standard project structure.
+Then enter the awesome-project folder, the CLI has been for us to generate a 
standard project structure.
 
 ### Usage
 
@@ -57,7 +57,7 @@ We enter the awesome-project folder and install dependencies 
with the following
 npm install
 ```
 
-Then we run `npm run dev` and `npm run serve` to start watch mode and static 
server.
+Then run `npm run dev` and `npm run serve` to start watch mode and static 
server.
 
 Finally, we can see the Weex page in `http://localhost:8080/index.html`.
 
@@ -66,8 +66,8 @@ You can modify this page in `src/foo.vue`. The code is shown 
below:
 ```html
 
   
-Hello Weex !
-Hello Vue !
+Hello Weex!
+Hello Vue!
   
 
 
@@ -90,4 +90,4 @@ You can modify this page in `src/foo.vue`. The code is shown 
below:
 
 ```
 
-If you're curious to learn more about technical details, continue on to the 
next. And don't forget to write code at [dotWe](https://dotwe.org) and preview 
at anytime.
+If you're curious to learn more about technical details, continue on to the 
next section. And don't forget to write code at [dotWe](https://dotwe.org) and 
preview at anytime.



[12/27] incubator-weex git commit: *[doc]update site navigation

2017-07-20 Thread cxfeng
*[doc]update site navigation


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

Branch: refs/heads/0.16-dev
Commit: af2267e92a90725c1360ccd4b03c9e2ba201ec4c
Parents: 26b638c
Author: tancy 
Authored: Tue Jul 4 10:48:12 2017 +0800
Committer: tancy 
Committed: Tue Jul 4 10:48:12 2017 +0800

--
 doc/themes/weex/languages/cn.yml   |  5 +++--
 doc/themes/weex/languages/en.yml   |  3 ++-
 doc/themes/weex/layout/_partial/header.ejs | 23 ---
 3 files changed, 17 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/af2267e9/doc/themes/weex/languages/cn.yml
--
diff --git a/doc/themes/weex/languages/cn.yml b/doc/themes/weex/languages/cn.yml
index 67d0266..3796d04 100644
--- a/doc/themes/weex/languages/cn.yml
+++ b/doc/themes/weex/languages/cn.yml
@@ -82,14 +82,15 @@ menu:
   references: 手册
   doc: 文档
   faq: FAQ
-  note: 参考
+  note: 说明
   releasenote: 版本说明
   index: 首页
   blog: 博客
   showcase: 示例
   download: 下载
   resources: 资源
-  tools: 工具和服务
+  tools: 工具
+  invovled: 参与
   advanced: 高阶知识
   github: GitHub
   legacy: 旧语法文档

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/af2267e9/doc/themes/weex/languages/en.yml
--
diff --git a/doc/themes/weex/languages/en.yml b/doc/themes/weex/languages/en.yml
index dae9090..12cec69 100644
--- a/doc/themes/weex/languages/en.yml
+++ b/doc/themes/weex/languages/en.yml
@@ -89,7 +89,8 @@ menu:
   showcase: Showcase
   download: Download
   resources: Resources
-  tools: Services & Tools
+  tools: Tools
+  invovled: Get Invovled
   advanced: Advanced
   github: GitHub
   legacy: Old Syntax Doc

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/af2267e9/doc/themes/weex/layout/_partial/header.ejs
--
diff --git a/doc/themes/weex/layout/_partial/header.ejs 
b/doc/themes/weex/layout/_partial/header.ejs
index 6922437..4c7d92d 100644
--- a/doc/themes/weex/layout/_partial/header.ejs
+++ b/doc/themes/weex/layout/_partial/header.ejs
@@ -7,17 +7,7 @@
   
 <%= _p('menu.guide') 
%>
 <%= 
_p('menu.references') %>
-
-  <%= _p('menu.note') %>
-  
-
-  <%= _p('menu.faq') 
%>
-
-
-  <%= 
_p('menu.releasenote') %>
-
-  
-
+<%= 
_p('menu.invovled') %>
 
 <%= _p('menu.tools') %>
 
@@ -35,6 +25,17 @@
   
 
 
+
+  <%= _p('menu.note') %>
+  
+
+  <%= _p('menu.faq') 
%>
+
+
+  <%= 
_p('menu.releasenote') %>
+
+  
+
   
   
 https://github.com/apache/incubator-weex/"; 
target="_blank">



[08/27] incubator-weex git commit: Closes #169: invalid

2017-07-20 Thread cxfeng
Closes #169: invalid


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

Branch: refs/heads/0.16-dev
Commit: 26b638ca984a99d7b86a75aeaf0d2e188311d14a
Parents: 1a957f1
Author: MrRaindrop 
Authored: Fri Jun 30 18:03:12 2017 +0800
Committer: MrRaindrop 
Committed: Fri Jun 30 18:03:12 2017 +0800

--

--




[01/27] incubator-weex git commit: Update write-once.md

2017-07-20 Thread cxfeng
Repository: incubator-weex
Updated Branches:
  refs/heads/0.16-dev da562689a -> f102f3fe1


Update write-once.md

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

Branch: refs/heads/0.16-dev
Commit: 3d4a52d52ba0d24d32ec13703d5dd73ddb65d90d
Parents: 88828c2
Author: Lukasz Balcerzak 
Authored: Wed Jun 7 10:29:58 2017 +0200
Committer: GitHub 
Committed: Wed Jun 7 10:29:58 2017 +0200

--
 doc/source/guide/intro/write-once.md | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3d4a52d5/doc/source/guide/intro/write-once.md
--
diff --git a/doc/source/guide/intro/write-once.md 
b/doc/source/guide/intro/write-once.md
index 382b7b4..673b302 100644
--- a/doc/source/guide/intro/write-once.md
+++ b/doc/source/guide/intro/write-once.md
@@ -9,15 +9,15 @@ version: 2.1
 
 Weex is a "Write Once, Run Everywhere" solution.
 
-* First, Weex is based on web dev experience, which including syntax and 
project management.
-* Second, all components & modules in Weex is discussed by iOS, Android, web 
developers together to ensure it's common enough to satisfy every platforms.
+* First, Weex is based on web dev experience, which includes syntax and 
project management.
+* Second, all components & modules in Weex are discussed by iOS, Android, web 
developers together to ensure it's common enough to satisfy every platforms.
 * You only need write the same Weex code for each platforms.
 
 We think about it in these aspects below:
 
-1. Today for almost mobile apps, one app solves the same problem in different 
platforms. Weex hope to supply a lightweight way to describe your business 
logic which works well in all platforms you need.
-2. For the differences of all mobile platforms, we are willing to fill the gap 
in 2 points:
-1. Design the same APIs for all platforms to ensure different platforms 
the same business logic description.
-2. Implement the APIs with different style or behaviors to ensure the 
implementation and user experience matching different platforms.
-3. If there are definitely some different features in different platforms. 
We also have some environment variables to help developers in certain detail 
situations.
+1. Today for almost all mobile apps, one app solves the same problem in 
different platforms. Weex hope to supply a lightweight way to describe your 
business logic which works well in all platforms you need.
+2. For the differences of all mobile platforms, we are willing to fill the gap 
in 3 points:
+1. Design the same APIs for all platforms to ensure different platforms 
have the same business logic description.
+2. Implement the APIs with different style or behaviors to ensure the 
implementation and user experience matches different platforms.
+3. Platforms obviously differ among each other. We also have some 
environment variables to help developers in certain situations.
 3. We trust (web) standard is the best for all features in all platforms.



[18/27] incubator-weex git commit: Update set-up-env.md

2017-07-20 Thread cxfeng
Update set-up-env.md

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

Branch: refs/heads/0.16-dev
Commit: 5fcb08dae572405c147d0268780f0ae9e1ad9c9e
Parents: 87dac9f
Author: Denny 
Authored: Fri Jul 7 20:41:54 2017 -0500
Committer: GitHub 
Committed: Fri Jul 7 20:41:54 2017 -0500

--
 doc/source/guide/set-up-env.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5fcb08da/doc/source/guide/set-up-env.md
--
diff --git a/doc/source/guide/set-up-env.md b/doc/source/guide/set-up-env.md
index 6aac518..f8ac41a 100644
--- a/doc/source/guide/set-up-env.md
+++ b/doc/source/guide/set-up-env.md
@@ -19,7 +19,7 @@ $ nvm install 6.10.0
 $ nvm use 6.10.0
 ```
 
-Node.js comes with npm, which lets you install the Weex Cli.
+Node.js comes with npm, which lets you install the Weex CLI.
 
 Run the following command in a Terminal:
 
@@ -35,13 +35,13 @@ weex-previewer : v1.3.4
 **NOTE: ** If you get an error like "permission error", try installing with 
`sudo`.
 
 
-Then you can use the weex command to verify that the installation is 
successful:
+Then you can use the Weex command to verify that the installation is 
successful:
 
 ![](https://img.alicdn.com/tfs/TB1NBhdQXXzXFXX-712-343.png)
 
 ### Generate a new Weex project
 
-You can use CLI to generate a Weex project called "awesome-project". Run the 
following command in a Terminal:
+You can use the CLI to generate a Weex project called "awesome-project". Run 
the following command in a Terminal:
 
 ```bash
 $ weex init awesome-project



[09/27] incubator-weex git commit: Closes #81: invalid.

2017-07-20 Thread cxfeng
Closes #81: invalid.


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

Branch: refs/heads/0.16-dev
Commit: efc74a49713c844da88ed9e06f35b222b05d17b4
Parents: 25d52bd
Author: MrRaindrop 
Authored: Mon Jul 3 11:47:25 2017 +0800
Committer: MrRaindrop 
Committed: Mon Jul 3 11:47:25 2017 +0800

--

--




[04/27] incubator-weex git commit: Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into dev

2017-07-20 Thread cxfeng
Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex 
into 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/a53deeb1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a53deeb1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a53deeb1

Branch: refs/heads/0.16-dev
Commit: a53deeb15b42712aa0b0249a9124ecce1c21817f
Parents: 825c6e3 44e959a
Author: tancy 
Authored: Fri Jun 30 11:09:09 2017 +0800
Committer: tancy 
Committed: Fri Jun 30 11:09:09 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so  | Bin 7575352 -> 7570504 bytes
 android/sdk/libs/x86/libweexjsc.so  | Bin 12130116 -> 12121924 
bytes
 .../java/com/taobao/weex/ComponentObserver.java |  50 
 .../java/com/taobao/weex/WXSDKInstance.java |  16 +++
 .../taobao/weex/ui/component/WXComponent.java   |  14 +++
 .../ui/component/list/BasicListComponent.java   |  16 ++-
 examples/vue/index.vue  |   1 +
 examples/vue/modules/websocket.vue  | 116 +++
 html5/render/vue/README.md  |  19 ++-
 html5/render/vue/components/input.js|  52 +++--
 .../components/scrollable/loading-indicator.js  |  11 +-
 .../render/vue/components/slider/slideMixin.js  |  24 ++--
 html5/render/vue/core/style.js  |  31 +++--
 html5/render/vue/env/weex.js|   3 +
 html5/render/vue/mixins/scrollable.js   |  38 +++---
 html5/render/vue/modules/index.js   |   2 +
 html5/render/vue/modules/websocket/index.js |  26 +
 html5/render/vue/modules/websocket/websocket.js |  60 ++
 html5/render/vue/utils/style.js |  44 +++
 html5/test/render/vue/modules/websocket.js  |  11 ++
 .../Sources/Component/WXCycleSliderComponent.m  |   7 ++
 package.json|   2 +-
 packages/weex-vue-render/package.json   |   2 +-
 test/pages/components/textarea-maxlength.vue|  10 +-
 .../components/textarea-maxlength.test.js   |   6 +-
 test/scripts/util.js|   2 +-
 26 files changed, 491 insertions(+), 72 deletions(-)
--




[19/27] incubator-weex git commit: Merge branch 'patch-1' of https://github.com/lukaszb/incubator-weex into dev

2017-07-20 Thread cxfeng
Merge branch 'patch-1' of https://github.com/lukaszb/incubator-weex into 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/a4931a68
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a4931a68
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a4931a68

Branch: refs/heads/0.16-dev
Commit: a4931a68abedede5ef0fb62f4ad578c8f0273b52
Parents: 515b003 3d4a52d
Author: tancy 
Authored: Mon Jul 10 11:10:56 2017 +0800
Committer: tancy 
Committed: Mon Jul 10 11:10:56 2017 +0800

--
 doc/source/guide/intro/write-once.md | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--




[20/27] incubator-weex git commit: Merge branch 'master' of https://github.com/dennythecoder/incubator-weex into dev

2017-07-20 Thread cxfeng
Merge branch 'master' of https://github.com/dennythecoder/incubator-weex into 
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/17943752
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/17943752
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/17943752

Branch: refs/heads/0.16-dev
Commit: 179437521b97d2a2a703edb8910763f3d302e15f
Parents: a4931a6 5fcb08d
Author: tancy 
Authored: Mon Jul 10 11:24:48 2017 +0800
Committer: tancy 
Committed: Mon Jul 10 11:24:48 2017 +0800

--
 doc/source/guide/set-up-env.md | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)
--




[07/27] incubator-weex git commit: closes #169: invalid.

2017-07-20 Thread cxfeng
closes #169: invalid.


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

Branch: refs/heads/0.16-dev
Commit: 1a957f1dfb4dc6a595f465ffc1d917bd7f6e843e
Parents: dd60d65
Author: MrRaindrop 
Authored: Fri Jun 30 17:50:30 2017 +0800
Committer: MrRaindrop 
Committed: Fri Jun 30 17:50:30 2017 +0800

--

--




[14/27] incubator-weex git commit: * [doc] remove unsupported scroll-direction attribute in list documentation

2017-07-20 Thread cxfeng
* [doc] remove unsupported scroll-direction attribute in list documentation


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

Branch: refs/heads/0.16-dev
Commit: e26e4a7d5e09a1246879fc158d43d6099d6cdad9
Parents: dd60d65
Author: yinfeng 
Authored: Tue Jul 4 15:40:29 2017 +0800
Committer: yinfeng 
Committed: Tue Jul 4 15:40:29 2017 +0800

--
 doc/source/references/components/list.md | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e26e4a7d/doc/source/references/components/list.md
--
diff --git a/doc/source/references/components/list.md 
b/doc/source/references/components/list.md
index 12a62ee..0a0a174 100644
--- a/doc/source/references/components/list.md
+++ b/doc/source/references/components/list.md
@@ -62,7 +62,7 @@ It can provide excellent experience and performance while 
still maintaining smoo
 
 Notes: The list now supports the following child components: cell, header, 
refresh, loading and fixed-position components. Other kinds of components will 
not be guaranteed to be displayed correctly.
 
-* cell 0.6.1 defines the attributes and behavior of the cells that appear in 
list. 
+* cell 0.6.1 defines the attributes and behavior of the cells that appear in 
list.
 * header 0.6.1 sticks to the top when it reaches the top of the screen.
 * refresh 0.6.1 used inside list to add pull-down-to-refresh functionality.
 * loading 0.6.1 used inside list to add pull-up-to-load-more functionality.
@@ -71,7 +71,6 @@ Notes: The list now supports the following child components: 
cell, header, refre
 ### Attributes
 
 * show-scrollbar: true/false whether show the scroll bar or not, default value 
is true
-* scroll-direction:  define scroll direction of component, horizontal 
or vertical
 * loadmoreoffset :  default value is 0. The loadmore event will be 
triggered when the list is loadmoreoffset left to reach the bottom of the list 
view. e.g. a list has total content length of 1000, and the loadmoreoffset is 
set to 400, the loadmore event will be triggered when 600 has beed scrolled and 
there is less than 400 left.
 * loadmoreretry :  default value 0,whether to reset loadmore related 
UI when loadmore failed, will be deprecated in further release.
 * offset-accuracy: default value is 0, the vertical offset distance 
required to trigger the scroll event.



[GitHub] incubator-weex pull request #523: * [android] fix illegal value in scroll ev...

2017-07-20 Thread misakuo
GitHub user misakuo opened a pull request:

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

* [android] fix illegal value in scroll event for list



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

$ git pull https://github.com/misakuo/incubator-weex 
android-bugfix-list-scroll-event

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

https://github.com/apache/incubator-weex/pull/523.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 #523


commit 831cb26d33e3faa2047192e36fff9d67631569d2
Author: misakuo 
Date:   2017-07-20T07:26:03Z

* [android] fix illegal value in scroll event for list




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex issue #523: * [android] fix illegal value in scroll event for...

2017-07-20 Thread weex-bot
Github user weex-bot commented on the issue:

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




  

  
  Fails

  
  
  :no_entry_sign:
  This PR modify SDK code. Please add/modify corresponding 
testcases. If it is ok, please comment about it. Or put '@notdanger' in you 
commit message.

  




  

  
  Warnings

  
  
  :warning:
  No Changelog changes!

  

  :warning:
  This PR should update related documents as well. 

  

  :warning:
  Potential BREAK CHANGE. Modify public in 
android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
 without metion it in commit message. You'd better add '@notdanger' in your 
commit log. 

  




  

  
  Messages

  
  
  :book:
  According to the blame info, we recommended @sospartan , 
@Rowandjj to be the reviewers.

  




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




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


incubator-weex git commit: * [android] fix illegal value in scroll event for list

2017-07-20 Thread misakuo
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev da562689a -> 831cb26d3


* [android] fix illegal value in scroll event for list


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

Branch: refs/heads/0.15-dev
Commit: 831cb26d33e3faa2047192e36fff9d67631569d2
Parents: da56268
Author: misakuo 
Authored: Thu Jul 20 15:26:03 2017 +0800
Committer: misakuo 
Committed: Thu Jul 20 15:26:03 2017 +0800

--
 .../ui/component/list/BasicListComponent.java   | 66 +---
 .../taobao/weex/ui/component/list/WXCell.java   | 10 ---
 2 files changed, 30 insertions(+), 46 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/831cb26d/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
index f3f6ac6..cdff266 100644
--- 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
+++ 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/BasicListComponent.java
@@ -113,7 +113,6 @@ public abstract class BasicListComponent event = new HashMap<>(2);
 Map contentSize = new HashMap<>(2);
@@ -1308,7 +1299,10 @@ public abstract class BasicListComponent= mOffsetAccuracy || 
Math.abs(mLastReport.y - offsetY) >= mOffsetAccuracy) {
+int gapX = Math.abs(mLastReport.x - offsetX);
+int gapY = Math.abs(mLastReport.y - offsetY);
+
+if (gapX >= mOffsetAccuracy || gapY >= mOffsetAccuracy) {
   mLastReport.x = offsetX;
   mLastReport.y = offsetY;
   return true;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/831cb26d/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
index 172f19b..9a5e468 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/WXCell.java
@@ -27,7 +27,6 @@ import android.widget.FrameLayout;
 import com.taobao.weex.WXSDKInstance;
 import com.taobao.weex.annotation.Component;
 import com.taobao.weex.dom.WXDomObject;
-import com.taobao.weex.dom.flex.CSSLayout;
 import com.taobao.weex.ui.component.WXVContainer;
 import com.taobao.weex.ui.view.WXFrameLayout;
 
@@ -83,15 +82,6 @@ public class WXCell extends WXVContainer {
 }
 }
 
-@Override
-protected void onFinishLayout() {
-super.onFinishLayout();
-WXVContainer container = getParent();
-if(container != null && container instanceof BasicListComponent){
-((BasicListComponent)container).recalculateSize();
-}
-}
-
 public int getLocationFromStart(){
 return mLastLocationY;
 }



[GitHub] incubator-weex pull request #523: * [android] fix illegal value in scroll ev...

2017-07-20 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[38/50] incubator-weex git commit: * [html5] improve style unit test case @notdanger

2017-07-20 Thread danz
* [html5] improve style unit test case @notdanger


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

Branch: refs/heads/0.15-dev
Commit: d2315fb4ac74a7cca7fe33032a80e7e8ed892474
Parents: 229ba3a
Author: erha19 
Authored: Tue Jul 18 11:34:43 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 11:34:43 2017 +0800

--
 html5/test/render/vue/utils/style.js | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d2315fb4/html5/test/render/vue/utils/style.js
--
diff --git a/html5/test/render/vue/utils/style.js 
b/html5/test/render/vue/utils/style.js
index 4ef26c0..31b672c 100644
--- a/html5/test/render/vue/utils/style.js
+++ b/html5/test/render/vue/utils/style.js
@@ -17,6 +17,7 @@
  * under the License.
  */
 import {
+  supportHairlines,
   autoPrefix,
   // normalizeStyle,
   normalizeString,
@@ -30,7 +31,12 @@ describe('style', function () {
   // const rect = document.documentElement.getBoundingClientRect()
   // const info = {}
   const { scale, dpr } = init()
-
+  it('should support using 0.5px to paint 1px width border', () => {
+expect(supportHairlines()).to.be.false
+window.devicePixelRatio = 2
+//phantomjs didn't support using 0.5px to paint 1px width border
+expect(supportHairlines()).to.be.false
+  })
   it('should normalize units numbers', () => {
 expect(normalizeUnitsNum('100px')).to.equal(100 * scale + 'px')
 expect(normalizeUnitsNum('100')).to.equal(100 * scale + 'px')
@@ -68,6 +74,7 @@ describe('autoPrefix', () => {
   const style = {
 width: '200px',
 flexDirection: 'row',
+flex: 1,
 transform: 'translate3d(100px, 100px, 0)'
   }
 



[26/50] incubator-weex git commit: * [html5] fix lazyload test case

2017-07-20 Thread danz
* [html5] fix lazyload test case


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

Branch: refs/heads/0.15-dev
Commit: 1a77685a027d0261ebb8a4f871e380d2a1a66cf0
Parents: f00356a
Author: erha19 
Authored: Thu Jul 13 22:38:14 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 22:38:14 2017 +0800

--
 html5/test/render/vue/utils/lazyload.js | 49 ++--
 1 file changed, 25 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1a77685a/html5/test/render/vue/utils/lazyload.js
--
diff --git a/html5/test/render/vue/utils/lazyload.js 
b/html5/test/render/vue/utils/lazyload.js
index 59c5593..5f5eeaa 100644
--- a/html5/test/render/vue/utils/lazyload.js
+++ b/html5/test/render/vue/utils/lazyload.js
@@ -19,48 +19,49 @@
 import * as lazyload from '../../../../render/vue/utils/lazyload'
 describe('utils', function () {
   describe('lazyload', function () {
+const validImage_transparent = 
'data:image/gif;base64,R0lGODlhAQABAIAAAP///yH5BAEALAABAAEAAAIBRAA7'
+const validImage_black = 
'data:image/gif;base64,R0lGODlhAQABAIUEBCwAAQABAAACAkQBADs='
+const invalidImage = 'data:image/jpeg;base64,'
 before(() => {
-  this.clock = sinon.useFakeTimers()
+//   this.clock = sinon.useFakeTimers()
 })
 after(() => {
-  this.clock.restore()
-})
-it('applySrc', () => {
-  const {
-applySrc
-  } = lazyload
-  const node = document.createElement('figure')
-  node.setAttribute('img-src', 'http://via.placeholder.com/1x1')
-  node.setAttribute('img-placeholder', 'http://via.placeholder.com/2x2')
-  document.body.appendChild(node)
-  expect(applySrc(node, '')).to.be.a('undefined')
-  expect(node.attributes[0].name).to.be.equal('img-src')
+//   this.clock.restore()
 })
 it('fireLazyload', () => {
   const {
 fireLazyload
   } = lazyload
   const node = document.createElement('figure')
-  node.setAttribute('img-src', 'http://via.placeholder.com/1x1')
-  node.setAttribute('img-placeholder', 'http://via.placeholder.com/2x2')
+  const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
+  node.style.height = '10px'
+  node.setAttribute('img-src', validImage_transparent)
+  node.setAttribute('img-placeholder', validImage_transparent)
   document.body.appendChild(node)
+  fireLazyload([node])
+  setTimeout(() => {
+  console.log(node)
+  },200)
+  
expect(node.style.backgroundImage.replace(urlReg,'')).to.be.equal('url('+validImage_transparent+')')
+  node.setAttribute('img-src', validImage_black)
   fireLazyload(node, true)
-  
expect(node.style.backgroundImage).to.be.equal('url(http://via.placeholder.com/1x1)')
+  
expect(node.style.backgroundImage.replace(urlReg,'')).to.be.equal('url('+validImage_black+')')
+  document.body.removeChild(node)
 })
 it('getThrottleLazyload', () => {
   const {
 getThrottleLazyload
   } = lazyload
   const node = document.createElement('figure')
-  node.setAttribute('img-src', 'http://via.placeholder.com/1x1')
-  node.setAttribute('img-placeholder', 'http://via.placeholder.com/2x2')
+  const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
+  const wait = 100,duration = wait + (wait > 25 ? wait : 25)
+  node.style.height = '10px'
+  node.setAttribute('img-src', validImage_transparent)
+  node.setAttribute('img-placeholder', validImage_transparent)
   document.body.appendChild(node)
-  const throttle = getThrottleLazyload(100, node)
-  expect(throttle).to.be.a('function')
-  throttle()
-//   this.clock.tick(100)
-//   console.log(node.style.backgroundImage)
-//   
expect(node.style.backgroundImage).to.be.equal('url(http://localhost:9876/img-src.jpg)')
+  getThrottleLazyload(wait, node)()
+  document.body.removeChild(node)
+  
expect(node.style.backgroundImage.replace(urlReg,'')).to.be.equal('url('+validImage_transparent+')')
 })
   })
 })



[24/50] incubator-weex git commit: - [html5] remove useless test

2017-07-20 Thread danz
- [html5] remove useless test


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

Branch: refs/heads/0.15-dev
Commit: ab67cf8e49649ff90605fa7fbc220f4bcd7db900
Parents: 8bc53ca
Author: erha19 
Authored: Thu Jul 13 15:16:14 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 15:16:14 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ab67cf8e/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index 05a2fca..257bb56 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -50,7 +50,7 @@ describe('webSocket module', function () {
 context('should forward native events', function () {
   let ws = null
   before(() => {
-ws = websocket.WebSocket(TestUrl, '')
+ws = websocket.WebSocket(TestUrl, 'ws')
   })
   after(() => {
 websocket.close()
@@ -81,10 +81,6 @@ describe('webSocket module', function () {
 websocket.WebSocket('')
 expect(websocket.INSTANCE).to.be.null
   })
-  it('both url and protocol is defined', (done) => {
-websocket.WebSocket(TestUrl, 'ws')
-expect(websocket.INSTANCE).not.to.be.null
-  })
 })
   })
 })



[20/50] incubator-weex git commit: - [html5] remove useless code

2017-07-20 Thread danz
- [html5] remove useless 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/a1a6b2cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a1a6b2cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a1a6b2cc

Branch: refs/heads/0.15-dev
Commit: a1a6b2cc5fb57649961ef0e6338be93739639a6b
Parents: 5521172
Author: erha19 
Authored: Thu Jul 13 13:18:49 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 13:18:49 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1a6b2cc/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index 3b34c51..d5a3c0d 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -85,12 +85,10 @@ describe('webSocket module', () => {
   it('url is undefined', function (done) {
 websocket.WebSocket('')
 expect(websocket.INSTANCE).to.be.null
-done()
   })
   it('both url and protocol is defined', function (done) {
 websocket.WebSocket(TestUrl, 'ws')
 expect(websocket.INSTANCE).not.to.be.null
-done()
   })
 })
   })



[41/50] incubator-weex git commit: * [html5] formate code style @notdanger

2017-07-20 Thread danz
* [html5] formate code style @notdanger


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

Branch: refs/heads/0.15-dev
Commit: a2e8b08551e8f2a36a09d2508da31a7cb7a61284
Parents: d2aacf7
Author: erha19 
Authored: Tue Jul 18 14:46:25 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 14:46:25 2017 +0800

--
 html5/render/vue/utils/func.js | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a2e8b085/html5/render/vue/utils/func.js
--
diff --git a/html5/render/vue/utils/func.js b/html5/render/vue/utils/func.js
index 5018b09..386a932 100644
--- a/html5/render/vue/utils/func.js
+++ b/html5/render/vue/utils/func.js
@@ -24,7 +24,7 @@ import {
  * Mix properties into target object.
  * the rightest object's value has the highest priority.
  */
-export function extend (to: {}, ...args: Array < {} >): {} {
+export function extend (to: {}, ...args: Array<{}>): {} {
   if (!args || args.length <= 0) {
 return to
   }
@@ -43,7 +43,7 @@ export function extend (to: {}, ...args: Array < {} >): {} {
  * mostly for merging styles. (that's why '' is falsy but still should be 
counted in.)
  * the rightest object's value has the highest priority.
  */
-export function extendTruthy (to: {}, ...args: Array < {} >): {} {
+export function extendTruthy (to: {}, ...args: Array<{}>): {} {
   if (!args || args.length <= 0) {
 return to
   }
@@ -63,7 +63,7 @@ export function extendTruthy (to: {}, ...args: Array < {} >): 
{} {
 /**
  * Mix specified properties into target object.
  */
-export function extendKeys (to: {}, from: {} = {}, keys: Array < string >): {} 
{
+export function extendKeys (to: {}, from: {} = {}, keys: Array): {} {
   (keys || []).forEach(key => {
 from && (to[key] = from[key])
   })
@@ -72,7 +72,7 @@ export function extendKeys (to: {}, from: {} = {}, keys: 
Array < string >): {} {
 /**
  * Extract specified properties from src to target object.
  */
-export function extractKeys (to: {}, from: {} = {}, keys: Array < string >) {
+export function extractKeys (to: {}, from: {} = {}, keys: Array) {
   if (!from) {
 return to
   }



[33/50] incubator-weex git commit: * [html5] improve component unit test case

2017-07-20 Thread danz
* [html5] improve component unit test case


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

Branch: refs/heads/0.15-dev
Commit: 25947ddbbd07a605152340f9ff5ef75365f33259
Parents: 30a52ef
Author: erha19 
Authored: Mon Jul 17 20:49:59 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 20:49:59 2017 +0800

--
 html5/test/render/vue/utils/component.js | 27 ++-
 1 file changed, 22 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/25947ddb/html5/test/render/vue/utils/component.js
--
diff --git a/html5/test/render/vue/utils/component.js 
b/html5/test/render/vue/utils/component.js
index fd97d5b..8248493 100644
--- a/html5/test/render/vue/utils/component.js
+++ b/html5/test/render/vue/utils/component.js
@@ -2,6 +2,7 @@ import { init } from '../helper/runtime'
 import div from '../../../../render/vue/components/div'
 
 import firstScreenAppearBundle from 
'../data/build/dotvue/first-screen-appear.js'
+import * as components from '../../../../render/vue/utils/component'
 
 init('utils component', (Vue, helper) => {
   const spys = {
@@ -14,14 +15,27 @@ init('utils component', (Vue, helper) => {
   }
 
   const id = 'test-first-screen-appear'
+  let vm = null
 
   before(() => {
 helper.register('div', div)
+vm =helper.createVm(firstScreenAppearBundle, id)
   })
-
-  describe('watchAppear', function () {
+  
+  describe('component functions', () => {
+it('getParentScroller', () => {
+  const { getParentScroller } = components
+  expect(getParentScroller).to.be.a('function')
+  expect(getParentScroller(vm)).to.be.a('undefined')
+})
+it('isComponentVisible', () => {
+  const { isComponentVisible } = components
+  expect(isComponentVisible).to.be.a('function')
+  expect(isComponentVisible(vm)).to.be.true
+})
+  })
+  describe('watchAppear', () => {
 it('should work when mounted and updated.', function (done) {
-  helper.createVm(firstScreenAppearBundle, id)
   helper.registerDone(id, () => {
 const { appear: appearSpy, disappear: disappearSpy } = spys
 expect(appearSpy.callCount).to.equal(2)
@@ -32,8 +46,11 @@ init('utils component', (Vue, helper) => {
 expect(appearSpy.args[0][0].direction).to.not.exist
 expect(appearSpy.args[1][0].direction).to.not.exist
 expect(disappearSpy.args[0][0].direction).to.not.exist
-helper.unregisterDone(id)
-done()
+window.dispatchEvent(new Event('scroll'))
+setTimeout(() => {
+  helper.unregisterDone(id)
+  done()
+},25)
   })
 })
   })



[47/50] incubator-weex git commit: * [html5] fix copy right error

2017-07-20 Thread danz
* [html5] fix copy right error


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

Branch: refs/heads/0.15-dev
Commit: 310314884a16507d2563ec0615f328afbe1b974b
Parents: dac01e3
Author: erha19 
Authored: Wed Jul 19 11:26:06 2017 +0800
Committer: erha19 
Committed: Wed Jul 19 11:26:06 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 2 +-
 html5/test/render/vue/utils/component.js   | 2 +-
 html5/test/render/vue/utils/event.js   | 2 +-
 html5/test/render/vue/utils/func.js| 2 +-
 html5/test/render/vue/utils/perf.js| 2 +-
 html5/test/render/vue/utils/type.js| 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/31031488/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index 8731957..881f352 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License") you may not use this file except in compliance
+ * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/31031488/html5/test/render/vue/utils/component.js
--
diff --git a/html5/test/render/vue/utils/component.js 
b/html5/test/render/vue/utils/component.js
index 0f0b4f1..fc70be2 100644
--- a/html5/test/render/vue/utils/component.js
+++ b/html5/test/render/vue/utils/component.js
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License") you may not use this file except in compliance
+ * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/31031488/html5/test/render/vue/utils/event.js
--
diff --git a/html5/test/render/vue/utils/event.js 
b/html5/test/render/vue/utils/event.js
index 837242e..9834d16 100644
--- a/html5/test/render/vue/utils/event.js
+++ b/html5/test/render/vue/utils/event.js
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License") you may not use this file except in compliance
+ * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/31031488/html5/test/render/vue/utils/func.js
--
diff --git a/html5/test/render/vue/utils/func.js 
b/html5/test/render/vue/utils/func.js
index ca8a2c5..57eb32f 100644
--- a/html5/test/render/vue/utils/func.js
+++ b/html5/test/render/vue/utils/func.js
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License") you may not use this file except in compliance
+ * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/31031488/html5/test/render/vue/utils/perf.js
--
diff --git a/html5/test/render/vue/utils/perf.js 
b/html5/test/render/vue/utils/perf.js
index c582334..602da08 100644
--- a/html5/test/render/vue/utils/perf.js
+++ b/html5/test/render/vue/utils/perf.js
@@ -4,7 +4,7 @@
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
- * "License") you may not use this file except in compliance
+ * "License"); you may

[03/50] incubator-weex git commit: * [html5] improve utils/pref.js unit test cast coverage

2017-07-20 Thread danz
* [html5] improve utils/pref.js unit test cast coverage


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

Branch: refs/heads/0.15-dev
Commit: 500a3b07b02e5499d33a9dc55dee3f60e9a32d9d
Parents: 4135755
Author: erha19 
Authored: Mon Jul 10 10:20:30 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 10:20:30 2017 +0800

--
 html5/test/render/vue/utils/pref.js | 48 
 1 file changed, 43 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/500a3b07/html5/test/render/vue/utils/pref.js
--
diff --git a/html5/test/render/vue/utils/pref.js 
b/html5/test/render/vue/utils/pref.js
index 3aad2b8..431ce33 100644
--- a/html5/test/render/vue/utils/pref.js
+++ b/html5/test/render/vue/utils/pref.js
@@ -19,7 +19,7 @@
 import {
   collectStatPerf,
   tagFirstScreen,
-  tagImg,  
+  tagImg,
   tagBeforeCreate,
   tagRootMounted,
   tagMounted,
@@ -29,8 +29,7 @@ import {
   tagEnd
 } from '../../../../render/vue/utils/perf'
 describe('utils', function () {
-  before(function(){
-  })
+  before(function () {})
   describe('pref', function () {
 before(function () {
   this.clock = sinon.useFakeTimers()
@@ -44,7 +43,7 @@ describe('utils', function () {
   expect(collectStatPerf()).to.be.a('undefined')
 })
 it('tagFirstScreen', function () {
-  const weexEmit = sinon.stub(window.weex,'emit')
+  const weexEmit = sinon.stub(window.weex, 'emit')
   expect(tagFirstScreen).to.be.a('function')
   tagFirstScreen()
   expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
@@ -56,11 +55,50 @@ describe('utils', function () {
   weexEmit.restore()
 })
 it('tagImg', function () {
-  const weexEmit = sinon.stub(window.weex,'emit')
+  const weexEmit = sinon.stub(window.weex, 'emit')
   tagImg()
   this.clock.tick(500)
   expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
   expect(tagImg).to.be.a('function')
+  weexEmit.restore()
+})
+it('tagBeforeCreate', function () {
+  const shouldBe = tagBeforeCreate()
+  this.clock.tick(25)
+  expect(shouldBe).to.be.a('undefined')
+  expect(tagBeforeCreate).to.be.a('function')
+})
+it('tagRootMounted', function () {
+  expect(tagRootMounted()).to.be.a('undefined')
+  expect(tagRootMounted).to.be.a('function')
+})
+it('tagMounted', function () {
+  const tagmount = tagMounted()
+  this.clock.tick(25)
+  expect(tagMounted).to.be.a('function')
+  expect(tagmount).to.be.a('undefined')
+})
+it('tagBeforeUpdate', function () {
+  const tagbeforeupdate = tagBeforeUpdate()
+  this.clock.tick(25)
+  expect(tagBeforeUpdate).to.be.a('function')
+  expect(tagbeforeupdate).to.be.a('undefined')
+})
+it('tagUpdated', function () {
+  const tagupdated = tagUpdated()
+  this.clock.tick(25)
+  expect(tagUpdated).to.be.a('function')
+  expect(tagupdated).to.be.a('undefined')
+})
+it('tagBegin', function () {
+  const tagbegin = tagBegin()
+  expect(tagbegin).to.be.a('undefined')
+  expect(tagBegin).to.be.a('function')
+})
+it('tagEnd', function () {
+  const tagend = tagEnd()
+  expect(tagend).to.be.a('undefined')
+  expect(tagEnd).to.be.a('function')
 })
   })
 })



[32/50] incubator-weex git commit: * [html5] improve lazyload unit test case

2017-07-20 Thread danz
* [html5] improve lazyload unit test case


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

Branch: refs/heads/0.15-dev
Commit: 30a52ef4f742e7f3dabcfb840c4a3fa3599392a0
Parents: abb4d66
Author: erha19 
Authored: Mon Jul 17 20:49:32 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 20:49:32 2017 +0800

--
 html5/test/render/vue/utils/lazyload.js | 27 +++
 1 file changed, 19 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/30a52ef4/html5/test/render/vue/utils/lazyload.js
--
diff --git a/html5/test/render/vue/utils/lazyload.js 
b/html5/test/render/vue/utils/lazyload.js
index 7fc25a7..6f574d4 100644
--- a/html5/test/render/vue/utils/lazyload.js
+++ b/html5/test/render/vue/utils/lazyload.js
@@ -23,9 +23,11 @@ describe('utils', function () {
 const validImageBlack = 
'data:image/gif;base64,R0lGODlhAQABAIUEBCwAAQABAAACAkQBADs='
 const invalidImage = 'data:image/jpeg;base64,'
 before(() => {
+  this.weexEmit = sinon.stub(window.weex, 'emit')
   //   this.clock = sinon.useFakeTimers()
 })
 after(() => {
+  this.weexEmit.restore()
   //   this.clock.restore()
 })
 it('fireLazyload', (done) => {
@@ -34,20 +36,24 @@ describe('utils', function () {
   } = lazyload
   const node = document.createElement('figure')
   const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
-  //  const IMG_REC_INDENT = 500
+  const IMG_REC_INDENT = 500
   node.setAttribute('img-src', invalidImage)
   node.setAttribute('img-placeholder', validImageBlack)
   node.style.height = '10px'
-//  coverage branch if (item._src_loading)
+  //  coverage branch if (item._src_loading)
   node._src_loading = true
-//  coverage branch if (Array.isArray(el))
+  //  coverage branch if (Array.isArray(el))
   fireLazyload([node])
   node._src_loading = false
   fireLazyload(node, true)
   setTimeout(() => {
 expect(node.style.backgroundImage.replace(urlReg, 
'')).to.be.equal('url(' + validImageBlack + ')')
-done()
-document.body.removeChild(node)
+setTimeout(() => {
+  
expect(this.weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
+  
expect(this.weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(0)
+  done()
+  document.body.removeChild(node)
+}, IMG_REC_INDENT)
   }, 100)
 })
 it('getThrottleLazyload', (done) => {
@@ -57,16 +63,21 @@ describe('utils', function () {
   const node = document.createElement('figure')
   const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
   const wait = 100
+  const IMG_REC_INDENT = 500
   node.style.height = '10px'
   node.setAttribute('img-src', validImageTransparent)
   node.setAttribute('img-placeholder', validImageBlack)
   document.body.appendChild(node)
-  window._weex_perf.renderTime.length = 3
+  window._first_screen_detected = false
   getThrottleLazyload(wait, node)()
   setTimeout(() => {
 expect(node.style.backgroundImage.replace(urlReg, 
'')).to.be.equal('url(' + validImageTransparent + ')')
-done()
-document.body.removeChild(node)
+setTimeout(() => {
+  
expect(this.weexEmit.withArgs('renderfinish').callCount).to.be.equal(2)
+  
expect(this.weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
+  done()
+  document.body.removeChild(node)
+}, IMG_REC_INDENT)
   }, 100)
 })
   })



[18/50] incubator-weex git commit: * [html5] update webSocket unit test

2017-07-20 Thread danz
* [html5] update webSocket unit test


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

Branch: refs/heads/0.15-dev
Commit: 1bbe8866fc537f39368ae04b241fbbaf2a4e24a6
Parents: b978273
Author: erha19 
Authored: Thu Jul 13 13:16:49 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 13:16:49 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 72 +
 1 file changed, 39 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1bbe8866/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index 487334a..3b34c51 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -19,63 +19,69 @@
 import websocket from '../../../../render/vue/modules/websocket/websocket'
 const TestUrl = 'ws://echo.websocket.org'
 /** @test {webSocket module} */
-describe('webSocket module', function () {
-  describe('extends Standard WebSocket API', function () {
-context('should inherit', function () {
-  const ws = websocket.WebSocket(TestUrl)
-  it('methods', function () {
+describe('webSocket module', () => {
+
+  describe('extends Standard WebSocket API', () => {
+context('should inherit', () => {
+  let ws = null
+  before(() => {
+ws = websocket.WebSocket(TestUrl)
+  })
+  after(() => {
+websocket.close()
+  })
+  it('methods', () => {
 expect(websocket, 'should close method to be 
defined').to.have.property('close')
 expect(websocket, 'should send method to be 
defined').to.have.property('send')
   })
-  it('attributes', function () {
+  it('attributes', () => {
 expect(websocket, 'should onerror to be 
defined').to.have.property('onerror')
 expect(websocket, 'should onmessage to be 
defined').to.have.property('onmessage')
 expect(websocket, 'should onopen to be 
defined').to.have.property('onopen')
 expect(websocket, 'should onclose to be 
defined').to.have.property('onclose')
 expect(ws, 'should binaryType to be 
defined').to.have.property('binaryType')
-expect(ws, 'should bufferdAmount to be 
defined').to.have.property('bufferedAmount')
-expect(ws, 'should extensions to be 
defined').to.have.property('extensions')
 expect(ws, 'should protocol to be 
defined').to.have.property('protocol')
 expect(ws, 'should readyState to be 
defined').to.have.property('readyState')
 expect(ws, 'should url to be defined').to.have.property('url')
   })
-  it('constants', function () {
+  it('constants', () => {
 expect(websocket, 'should INSTANCE to be 
defined').to.have.property('INSTANCE')
   })
 })
-context('should forward native events', function () {
+context('should forward native events', () => {
   let ws = null
-  beforeEach(function () {
-ws = websocket.WebSocket(TestUrl, '')
+  before(() => {
+ws = websocket.WebSocket(TestUrl,'')
   })
-  afterEach(function () {
+  after(() => {
 websocket.close()
   })
-  it('open && message && close', function (done) {
-let closed = false
-const message = 'Test'
-ws.onclose = function () {
-  if (!closed) {
-closed = true
-  }
-  expect(closed).to.be.true
-  done()
+  it('open', function () {
+const open  = () => {
 }
-websocket.onmessage = function (e) {
-  expect(e.data).to.be.equal(message)
-  setTimeout(() => { websocket.close() }, 200)
+websocket.onopen = open
+expect(ws.onopen).to.be.deep.equal(open)
+  })
+  it('close', function () {
+const close  = () => {
 }
-websocket.onopen = function () {
-  websocket.send(message)
+websocket.onclose = close
+expect(ws.onclose).to.be.deep.equal(close)
+  })
+  it('error', function () {
+const error  = () => {
 }
+websocket.onerror = error
+expect(ws.onerror).to.be.deep.equal(error)
   })
-})
-describe('should ignore', function () {
-  it('protocol is undefined', function (done) {
-websocket.WebSocket(TestUrl)
-expect(websocket.INSTANCE).not.to.be.null
-done()
+  it('message', function () {
+const message  = () => {
+}
+websocket.onmessage = message
+expect(ws.o

[39/50] incubator-weex git commit: * [html5] update to eslint formate @notdanger

2017-07-20 Thread danz
* [html5] update to eslint formate @notdanger


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

Branch: refs/heads/0.15-dev
Commit: b8606a405794a486a9bc21b65dd124d5c3e77e1a
Parents: d2315fb
Author: erha19 
Authored: Tue Jul 18 14:35:04 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 14:35:04 2017 +0800

--
 html5/test/render/vue/utils/style.js | 26 +++---
 1 file changed, 23 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b8606a40/html5/test/render/vue/utils/style.js
--
diff --git a/html5/test/render/vue/utils/style.js 
b/html5/test/render/vue/utils/style.js
index 31b672c..1f1e78f 100644
--- a/html5/test/render/vue/utils/style.js
+++ b/html5/test/render/vue/utils/style.js
@@ -18,8 +18,9 @@
  */
 import {
   supportHairlines,
+  supportSticky,
   autoPrefix,
-  // normalizeStyle,
+  normalizeStyle,
   normalizeString,
   normalizeNumber,
   normalizeUnitsNum,
@@ -34,9 +35,14 @@ describe('style', function () {
   it('should support using 0.5px to paint 1px width border', () => {
 expect(supportHairlines()).to.be.false
 window.devicePixelRatio = 2
-//phantomjs didn't support using 0.5px to paint 1px width border
+// phantomjs didn't support using 0.5px to paint 1px width border
 expect(supportHairlines()).to.be.false
   })
+  it('should support stick style', () => {
+// phantomjs support stick true
+expect(supportSticky()).to.be.true
+  })
+
   it('should normalize units numbers', () => {
 expect(normalizeUnitsNum('100px')).to.equal(100 * scale + 'px')
 expect(normalizeUnitsNum('100')).to.equal(100 * scale + 'px')
@@ -69,7 +75,21 @@ describe('style', function () {
 expect(trimComment(cssText)).to.equal(trimmed)
   })
 })
-
+describe('normalizeStyle', () => {
+  const style = {
+width: '200px',
+flexDirection: 'row',
+flex: 1,
+transform: 'translate3d(100px, 100px, 0)'
+  }
+  it('should switch to suitble case', () => {
+const res = normalizeStyle(style)
+expect(normalizeString('transform', 
style.transform)).to.equal(res.transform)
+expect(normalizeString('width', style.width)).to.equal(res.width)
+expect(normalizeString('flexDirection', 
style.flexDirection)).to.equal(res.flexDirection)
+expect(normalizeNumber('flex', style.flex)).to.equal(res.flex)
+  })
+})
 describe('autoPrefix', () => {
   const style = {
 width: '200px',



[31/50] incubator-weex git commit: Merge branch '0.15-dev' of https://github.com/simplefatty/incubator-weex into 0.15-dev

2017-07-20 Thread danz
Merge branch '0.15-dev' of https://github.com/simplefatty/incubator-weex into 
0.15-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/abb4d667
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/abb4d667
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/abb4d667

Branch: refs/heads/0.15-dev
Commit: abb4d667e92e38529fbfbf998324545fe0b8c30d
Parents: b66b626 8a84fa6
Author: erha19 
Authored: Mon Jul 17 17:56:30 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 17:56:30 2017 +0800

--

--




[17/50] incubator-weex git commit: Merge branch '0.15-dev' of https://github.com/apache/incubator-weex into 0.15-dev

2017-07-20 Thread danz
Merge branch '0.15-dev' of https://github.com/apache/incubator-weex into 
0.15-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/b9782739
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b9782739
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b9782739

Branch: refs/heads/0.15-dev
Commit: b978273983975de68915e4e8dc85e8a7d7e56d02
Parents: a60c54f 7f247fc
Author: erha19 
Authored: Tue Jul 11 21:15:03 2017 +0800
Committer: erha19 
Committed: Tue Jul 11 21:15:03 2017 +0800

--
 ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m  |  4 ++--
 ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m | 14 +-
 2 files changed, 15 insertions(+), 3 deletions(-)
--




[02/50] incubator-weex git commit: * [html5] remove useless console log

2017-07-20 Thread danz
* [html5]  remove useless console log


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

Branch: refs/heads/0.15-dev
Commit: 4135755702839afe221be19a49fa1e0f42cbeab3
Parents: 635d27a
Author: erha19 
Authored: Sun Jul 9 20:12:46 2017 +0800
Committer: erha19 
Committed: Sun Jul 9 20:12:46 2017 +0800

--
 html5/test/render/vue/utils/event.js | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41357557/html5/test/render/vue/utils/event.js
--
diff --git a/html5/test/render/vue/utils/event.js 
b/html5/test/render/vue/utils/event.js
index d44bd95..5be2e7f 100644
--- a/html5/test/render/vue/utils/event.js
+++ b/html5/test/render/vue/utils/event.js
@@ -24,7 +24,6 @@ describe('utils', function () {
 createEvent
   } = event
   const clickEvent = createEvent('', 'click')
-  console.log(createEvent('', 'click'))
   expect(createEvent).to.be.a('function')
   expect(clickEvent.type).to.be.equal('click')
   expect(clickEvent.target).to.be.a('null')



[06/50] incubator-weex git commit: * [html5] add unit test

2017-07-20 Thread danz
* [html5] add unit test


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

Branch: refs/heads/0.15-dev
Commit: 0378b36973b9107b61d31b49a65efd2f480eb32b
Parents: 7baff11
Author: erha19 
Authored: Mon Jul 10 15:03:44 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 15:03:44 2017 +0800

--
 html5/test/render/vue/utils/func.js | 135 +++
 1 file changed, 135 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/0378b369/html5/test/render/vue/utils/func.js
--
diff --git a/html5/test/render/vue/utils/func.js 
b/html5/test/render/vue/utils/func.js
index 246178d..1c50bac 100644
--- a/html5/test/render/vue/utils/func.js
+++ b/html5/test/render/vue/utils/func.js
@@ -164,5 +164,140 @@ describe('utils', function () {
   expect(loopArray([1, 2, 3], -1)).to.be.deep.equal([2, 3, 1])
   expect(loopArray([1, 2, 3], 0)).to.be.deep.equal([1, 2, 3])
 })
+it('cached', function () {
+  expect(utils.cached).to.be.a('function')
+})
+it('camelize', function () {
+  const {
+camelize
+  } = utils
+  expect(camelize).to.be.a('function')
+  expect(camelize('')).to.be.equal('')
+  expect(camelize('dispaly')).to.be.equal('dispaly')
+  expect(camelize('-webkit-transform')).to.be.equal('WebkitTransform')
+  expect(camelize('text-overflow')).to.be.equal('textOverflow')
+  expect(camelize('a-b-c-d')).to.be.equal('aBCD')
+})
+it('camelizeKeys', function () {
+  const {
+camelizeKeys
+  } = utils
+  const camelizeobj = {
+dispaly: 'none',
+'-webkit-transform': 'all 1s ease'
+  }
+  const shouldBe = camelizeKeys(camelizeobj)
+  const expected = {
+dispaly: 'none',
+WebkitTransform: 'all 1s ease'
+  }
+  expect(camelizeKeys).to.be.a('function')
+  expect(shouldBe).to.be.deep.equal(expected)
+})
+it('capitalize', function () {
+  const {
+capitalize
+  } = utils
+  expect(capitalize).to.be.a('function')
+  expect(capitalize('')).to.be.equal('')
+  expect(capitalize('string')).to.be.equal('String')
+  expect(capitalize('string object')).to.be.equal('String object')
+  expect(capitalize('[string object]')).to.be.equal('[string object]')
+  expect(capitalize('I have an apple')).to.be.equal('I have an apple')
+})
+it('hyphenate', function () {
+  const {
+hyphenate
+  } = utils
+  expect(hyphenate).to.be.a('function')
+  expect(hyphenate('')).to.be.equal('')
+  expect(hyphenate('dispaly')).to.be.equal('dispaly')
+  expect(hyphenate('WebkitTransform')).to.be.equal('webkit-transform')
+  expect(hyphenate('textOverflow')).to.be.equal('text-overflow')
+  expect(hyphenate('aBCD')).to.be.equal('a-b-c-d')
+})
+it('hyphenateKeys', function () {
+  const {
+hyphenateKeys
+  } = utils
+  const hyphenateobj = {
+dispaly: 'none',
+WebkitTransform: 'all 1s ease'
+  }
+  const shouldBe = hyphenateKeys(hyphenateobj)
+  const expected = {
+dispaly: 'none',
+'webkit-transform': 'all 1s ease'
+  }
+  expect(hyphenateKeys).to.be.a('function')
+  expect(shouldBe).to.be.deep.equal(expected)
+})
+it('hyphenateStyleKeys', function () {
+  const {
+hyphenateStyleKeys
+  } = utils
+  const hyphenateStyleObj = {
+dispaly: 'none',
+'webkit-transform': 'all 1s ease'
+  }
+  const shouldBe = hyphenateStyleKeys(hyphenateStyleObj)
+  const expected = {
+dispaly: 'none',
+'-webkit-transform': 'all 1s ease'
+  }
+  expect(hyphenateStyleKeys).to.be.a('function')
+  expect(shouldBe).to.be.deep.equal(expected)
+})
+it('camelToKebab', function () {
+  const {
+camelToKebab
+  } = utils
+  expect(camelToKebab).to.be.a('function')
+  expect(camelToKebab('')).to.be.equal('')
+  expect(camelToKebab('ABC')).to.be.equal('-a-b-c')
+})
+it('appendCss', function () {
+  const {
+appendCss
+  } = utils
+  const cssid = 'append-test'
+  const css = '.test{font-size:12px}'
+  expect(appendCss).to.be.a('function')
+  appendCss(css, cssid, true)
+  let handler = document.querySelector('#' + cssid)
+  expect(handler.textContent).to.be.equal(css)
+  const anothercss = '.test2{font-size:16px}'
+  appendCss(anothercss, cssid, true)
+  handler = document.querySelector('#' + cssid)
+  expect(handler.text

[08/50] incubator-weex git commit: - [html5] rename file name

2017-07-20 Thread danz
- [html5] rename file name


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

Branch: refs/heads/0.15-dev
Commit: 9591b2474ef66d3a31a6e1bad9953a4644bd2c36
Parents: c96f0e3
Author: erha19 
Authored: Mon Jul 10 15:05:33 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 15:05:33 2017 +0800

--
 html5/test/render/vue/utils/pref.js | 104 ---
 1 file changed, 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9591b247/html5/test/render/vue/utils/pref.js
--
diff --git a/html5/test/render/vue/utils/pref.js 
b/html5/test/render/vue/utils/pref.js
deleted file mode 100644
index 431ce33..000
--- a/html5/test/render/vue/utils/pref.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License") you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import {
-  collectStatPerf,
-  tagFirstScreen,
-  tagImg,
-  tagBeforeCreate,
-  tagRootMounted,
-  tagMounted,
-  tagBeforeUpdate,
-  tagUpdated,
-  tagBegin,
-  tagEnd
-} from '../../../../render/vue/utils/perf'
-describe('utils', function () {
-  before(function () {})
-  describe('pref', function () {
-before(function () {
-  this.clock = sinon.useFakeTimers()
-})
-after(function () {
-  this.clock.restore()
-})
-it('collectStatPerf', function () {
-  expect(collectStatPerf).to.be.a('function')
-  expect(collectStatPerf('totalTime', (new 
Date()).getTime())).to.be.a('undefined')
-  expect(collectStatPerf()).to.be.a('undefined')
-})
-it('tagFirstScreen', function () {
-  const weexEmit = sinon.stub(window.weex, 'emit')
-  expect(tagFirstScreen).to.be.a('function')
-  tagFirstScreen()
-  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
-  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(0)
-  window._first_screen_detected = false
-  tagFirstScreen()
-  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(2)
-  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
-  weexEmit.restore()
-})
-it('tagImg', function () {
-  const weexEmit = sinon.stub(window.weex, 'emit')
-  tagImg()
-  this.clock.tick(500)
-  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
-  expect(tagImg).to.be.a('function')
-  weexEmit.restore()
-})
-it('tagBeforeCreate', function () {
-  const shouldBe = tagBeforeCreate()
-  this.clock.tick(25)
-  expect(shouldBe).to.be.a('undefined')
-  expect(tagBeforeCreate).to.be.a('function')
-})
-it('tagRootMounted', function () {
-  expect(tagRootMounted()).to.be.a('undefined')
-  expect(tagRootMounted).to.be.a('function')
-})
-it('tagMounted', function () {
-  const tagmount = tagMounted()
-  this.clock.tick(25)
-  expect(tagMounted).to.be.a('function')
-  expect(tagmount).to.be.a('undefined')
-})
-it('tagBeforeUpdate', function () {
-  const tagbeforeupdate = tagBeforeUpdate()
-  this.clock.tick(25)
-  expect(tagBeforeUpdate).to.be.a('function')
-  expect(tagbeforeupdate).to.be.a('undefined')
-})
-it('tagUpdated', function () {
-  const tagupdated = tagUpdated()
-  this.clock.tick(25)
-  expect(tagUpdated).to.be.a('function')
-  expect(tagupdated).to.be.a('undefined')
-})
-it('tagBegin', function () {
-  const tagbegin = tagBegin()
-  expect(tagbegin).to.be.a('undefined')
-  expect(tagBegin).to.be.a('function')
-})
-it('tagEnd', function () {
-  const tagend = tagEnd()
-  expect(tagend).to.be.a('undefined')
-  expect(tagEnd).to.be.a('function')
-})
-  })
-})



[46/50] incubator-weex git commit: * [html5] dispatch some event

2017-07-20 Thread danz
* [html5] dispatch some event


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

Branch: refs/heads/0.15-dev
Commit: dac01e3f3ec415d69697d9208cf0bd038a0e0af4
Parents: fdad32f
Author: erha19 
Authored: Tue Jul 18 17:44:38 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 17:44:38 2017 +0800

--
 html5/test/render/vue/utils/component.js | 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dac01e3f/html5/test/render/vue/utils/component.js
--
diff --git a/html5/test/render/vue/utils/component.js 
b/html5/test/render/vue/utils/component.js
index ed6df2e..0f0b4f1 100644
--- a/html5/test/render/vue/utils/component.js
+++ b/html5/test/render/vue/utils/component.js
@@ -66,6 +66,10 @@ init('utils component', (Vue, helper) => {
 expect(appearSpy.args[1][0].direction).to.not.exist
 expect(disappearSpy.args[0][0].direction).to.not.exist
 window.dispatchEvent(new Event('scroll'))
+vm.$el.dispatchEvent(new Event('touchstart'))
+vm.$el.dispatchEvent(new Event('touchmove'))
+vm.$el.dispatchEvent(new Event('touchend'))
+vm.$el.dispatchEvent(new Event('touchcancel'))
 setTimeout(() => {
   helper.unregisterDone(id)
   done()



[29/50] incubator-weex git commit: * [html5] change code formate

2017-07-20 Thread danz
* [html5] change code formate


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

Branch: refs/heads/0.15-dev
Commit: f0dd9d01e2546f1c9a760b345c6400fefe2a67d3
Parents: 89c66d4
Author: erha19 
Authored: Mon Jul 17 17:53:34 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 17:53:34 2017 +0800

--
 html5/test/render/vue/validator/index.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f0dd9d01/html5/test/render/vue/validator/index.js
--
diff --git a/html5/test/render/vue/validator/index.js 
b/html5/test/render/vue/validator/index.js
index 3525dc6..e525cf7 100644
--- a/html5/test/render/vue/validator/index.js
+++ b/html5/test/render/vue/validator/index.js
@@ -16,10 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import * as validator from '../../../../render/vue/validator'
+import { validateStyles, validateProps, configure } from 
'../../../../render/vue/validator'
 
 describe('validator', function () {
-  const { validateStyles, validateProps, configure } = validator
   const warn = function () {}
 
   before(() => {



[40/50] incubator-weex git commit: * [html5] update style unit test case @notdanger

2017-07-20 Thread danz
* [html5] update style unit test case @notdanger


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

Branch: refs/heads/0.15-dev
Commit: d2aacf73c658735f3ac9e1bfb242b6d9a01c59f6
Parents: b8606a4
Author: erha19 
Authored: Tue Jul 18 14:41:09 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 14:41:09 2017 +0800

--
 html5/test/render/vue/utils/style.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d2aacf73/html5/test/render/vue/utils/style.js
--
diff --git a/html5/test/render/vue/utils/style.js 
b/html5/test/render/vue/utils/style.js
index 1f1e78f..b968826 100644
--- a/html5/test/render/vue/utils/style.js
+++ b/html5/test/render/vue/utils/style.js
@@ -87,7 +87,7 @@ describe('normalizeStyle', () => {
 expect(normalizeString('transform', 
style.transform)).to.equal(res.transform)
 expect(normalizeString('width', style.width)).to.equal(res.width)
 expect(normalizeString('flexDirection', 
style.flexDirection)).to.equal(res.flexDirection)
-expect(normalizeNumber('flex', style.flex)).to.equal(res.flex)
+expect(style.flex).to.equal(res.flex)
   })
 })
 describe('autoPrefix', () => {



[27/50] incubator-weex git commit: * [html5] fix phantomjs don't support customer event bug

2017-07-20 Thread danz
* [html5]  fix phantomjs don't  support customer event bug


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

Branch: refs/heads/0.15-dev
Commit: 92bf1d3bd968c5a2acfb83de56f490026ad5a0a1
Parents: 1a77685
Author: erha19 
Authored: Mon Jul 17 17:52:32 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 17:52:32 2017 +0800

--
 html5/render/vue/utils/event.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/92bf1d3b/html5/render/vue/utils/event.js
--
diff --git a/html5/render/vue/utils/event.js b/html5/render/vue/utils/event.js
index ac84c87..94b7a94 100644
--- a/html5/render/vue/utils/event.js
+++ b/html5/render/vue/utils/event.js
@@ -39,7 +39,10 @@ export function createEvent (target, type, props) {
   // event.stopPropagation()
 
   extend(event, props)
-
+  //  phantomjs don't support customer event
+  if (window.navigator.userAgent.indexOf('PhantomJS') !== -1) {
+return event
+  }
   try {
 Object.defineProperty(event, 'target', {
   enumerable: true,
@@ -49,7 +52,6 @@ export function createEvent (target, type, props) {
   catch (err) {
 return extend({}, event, { target: target || null })
   }
-
   return event
 }
 



[16/50] incubator-weex git commit: * [html5] fix eslint wraning

2017-07-20 Thread danz
* [html5] fix eslint wraning


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

Branch: refs/heads/0.15-dev
Commit: a60c54facecf02e0c0926bd1a49c7c3e3ff1a00b
Parents: 75de22e
Author: erha19 
Authored: Tue Jul 11 21:12:35 2017 +0800
Committer: erha19 
Committed: Tue Jul 11 21:12:35 2017 +0800

--
 html5/render/vue/modules/websocket/websocket.js | 1 +
 html5/test/render/vue/modules/websocket.js  | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a60c54fa/html5/render/vue/modules/websocket/websocket.js
--
diff --git a/html5/render/vue/modules/websocket/websocket.js 
b/html5/render/vue/modules/websocket/websocket.js
index 6488cb8..e79f8de 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -19,6 +19,7 @@
 /**
  * websocket module
  */
+/*global WebSocket*/
 export default (function () {
   const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
   const ws = {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a60c54fa/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index 1a18294..487334a 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-/*global WebSocket*/
 import websocket from '../../../../render/vue/modules/websocket/websocket'
 const TestUrl = 'ws://echo.websocket.org'
 /** @test {webSocket module} */
@@ -47,7 +46,7 @@ describe('webSocket module', function () {
 context('should forward native events', function () {
   let ws = null
   beforeEach(function () {
-ws = websocket.WebSocket(TestUrl,'')
+ws = websocket.WebSocket(TestUrl, '')
   })
   afterEach(function () {
 websocket.close()
@@ -64,7 +63,7 @@ describe('webSocket module', function () {
 }
 websocket.onmessage = function (e) {
   expect(e.data).to.be.equal(message)
-  websocket.close()
+  setTimeout(() => { websocket.close() }, 200)
 }
 websocket.onopen = function () {
   websocket.send(message)



[GitHub] incubator-weex pull request #497: [html5] Improve unit test coverage in util...

2017-07-20 Thread asfgit
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[09/50] incubator-weex git commit: + [html5] rename filename and add more unit test

2017-07-20 Thread danz
+ [html5] rename filename and add more unit test


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

Branch: refs/heads/0.15-dev
Commit: 7c42710b9e883b31ab4f8eee532048f42e428d6d
Parents: 9591b24
Author: erha19 
Authored: Mon Jul 10 15:06:06 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 15:06:06 2017 +0800

--
 html5/test/render/vue/utils/perf.js | 124 +++
 1 file changed, 124 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7c42710b/html5/test/render/vue/utils/perf.js
--
diff --git a/html5/test/render/vue/utils/perf.js 
b/html5/test/render/vue/utils/perf.js
new file mode 100644
index 000..87ee213
--- /dev/null
+++ b/html5/test/render/vue/utils/perf.js
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import {
+  collectStatPerf,
+  tagFirstScreen,
+  tagImg,
+  tagBeforeCreate,
+  tagRootMounted,
+  tagMounted,
+  tagBeforeUpdate,
+  tagUpdated,
+  tagBegin,
+  tagEnd
+} from '../../../../render/vue/utils/perf'
+describe('utils', function () {
+  describe('pref', function () {
+before(function () {
+  this.clock = sinon.useFakeTimers()
+})
+after(function () {
+  this.clock.restore()
+})
+it('collectStatPerf', function () {
+  const perf = window._weex_perf
+  const time = (new Date()).getTime()
+  collectStatPerf('totalTime', time)
+  expect(collectStatPerf).to.be.a('function')
+  expect(perf.stat['totalTime']).to.be.equal(time)
+  expect(collectStatPerf()).to.be.a('undefined')
+})
+it('tagFirstScreen', function () {
+  const weexEmit = sinon.stub(window.weex, 'emit')
+  expect(tagFirstScreen).to.be.a('function')
+  tagFirstScreen()
+  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
+  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(0)
+  window._first_screen_detected = false
+  tagFirstScreen()
+  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(2)
+  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
+  weexEmit.restore()
+})
+it('tagImg', function () {
+  const weexEmit = sinon.stub(window.weex, 'emit')
+  tagImg()
+  this.clock.tick(500)
+  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
+  expect(tagImg).to.be.a('function')
+  weexEmit.restore()
+})
+it('tagBeforeCreate', function () {
+  const perf = window._weex_perf
+  tagBeforeCreate()
+  this.clock.tick(25)
+  const time = 
perf.earliestBeforeCreates[perf.earliestBeforeCreates.length - 1]
+  expect(time).to.be.a('number')
+  expect(perf.earliestBeforeCreates).to.have.lengthOf(1)
+  expect(tagBeforeCreate).to.be.a('function')
+})
+it('tagRootMounted', function () {
+  const perf = window._weex_perf
+  tagRootMounted()
+  const time = perf.latestMounts[perf.latestMounts.length - 1]
+  expect(time).to.be.a('number')
+  expect(perf.stat['totalTime']).to.be.equal(parseInt(time))
+  expect(tagRootMounted).to.be.a('function')
+})
+it('tagMounted', function () {
+  const perf = window._weex_perf
+  perf.firstAllMountedTime = 0
+  tagMounted()
+  this.clock.tick(25)
+  expect(tagMounted).to.be.a('function')
+  expect(perf.latestMounts).to.have.lengthOf(2)
+  expect(perf.createTime).to.have.lengthOf(1)
+  expect(perf.createTime[perf.createTime.length - 
1]).to.have.all.keys('start', 'end', 'duration')
+  expect(perf.firstAllMountedTime).to.be.above(0)
+})
+it('tagBeforeUpdate', function () {
+  const perf = window._weex_perf
+  tagBeforeUpdate()
+  this.clock.tick(25)
+  expect(tagBeforeUpdate).to.be.a('function')

[21/50] incubator-weex git commit: Merge branch '0.15-dev' of https://github.com/apache/incubator-weex into 0.15-dev

2017-07-20 Thread danz
Merge branch '0.15-dev' of https://github.com/apache/incubator-weex into 
0.15-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/cfcf769c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/cfcf769c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/cfcf769c

Branch: refs/heads/0.15-dev
Commit: cfcf769cddc01f1bfc3298bb5a476b93355cb633
Parents: a1a6b2c 3d97c00
Author: erha19 
Authored: Thu Jul 13 13:19:29 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 13:19:29 2017 +0800

--
 .../Sources/Component/WXCycleSliderComponent.m  |  6 
 .../WeexSDK/Sources/Component/WXEditComponent.m |  2 +-
 ios/sdk/WeexSDK/Sources/Component/WXTransform.m |  8 +++---
 ios/sdk/WeexSDKTests/WXAnimationModuleTests.m   | 29 
 4 files changed, 40 insertions(+), 5 deletions(-)
--




[45/50] incubator-weex git commit: * [html5] fix collectStat test case

2017-07-20 Thread danz
* [html5] fix collectStat test case


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

Branch: refs/heads/0.15-dev
Commit: fdad32f47e4b7049aa30bdfb615e3a0719e5bb9d
Parents: 9c84d23
Author: erha19 
Authored: Tue Jul 18 17:29:19 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 17:29:19 2017 +0800

--
 html5/test/render/vue/utils/lazyload.js | 82 ++--
 html5/test/render/vue/utils/perf.js | 12 
 2 files changed, 64 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fdad32f4/html5/test/render/vue/utils/lazyload.js
--
diff --git a/html5/test/render/vue/utils/lazyload.js 
b/html5/test/render/vue/utils/lazyload.js
index 6f574d4..b390468 100644
--- a/html5/test/render/vue/utils/lazyload.js
+++ b/html5/test/render/vue/utils/lazyload.js
@@ -16,33 +16,44 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import * as lazyload from '../../../../render/vue/utils/lazyload'
+import {
+  fireLazyload,
+  getThrottleLazyload
+} from '../../../../render/vue/utils/lazyload'
 describe('utils', function () {
   describe('lazyload', function () {
 const validImageTransparent = 
'data:image/gif;base64,R0lGODlhAQABAIAAAP///yH5BAEALAABAAEAAAIBRAA7'
 const validImageBlack = 
'data:image/gif;base64,R0lGODlhAQABAIUEBCwAAQABAAACAkQBADs='
 const invalidImage = 'data:image/jpeg;base64,'
 before(() => {
+  // for test collectStat in utils/perf.js
+  window.performance = {
+getEntries: () => {
+  return [{
+entryType: 'resource',
+name: 'weex-invalid.jpg'
+  }, {
+entryType: 'resource',
+name: 'weex-test.jpg'
+  }]
+}
+  }
+  window.history.pushState(null, null, '?_wx_tpl=./weex-test.jpg')
   this.weexEmit = sinon.stub(window.weex, 'emit')
-  //   this.clock = sinon.useFakeTimers()
 })
 after(() => {
   this.weexEmit.restore()
-  //   this.clock.restore()
 })
 it('fireLazyload', (done) => {
-  const {
-fireLazyload
-  } = lazyload
   const node = document.createElement('figure')
   const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
   const IMG_REC_INDENT = 500
   node.setAttribute('img-src', invalidImage)
   node.setAttribute('img-placeholder', validImageBlack)
   node.style.height = '10px'
-  //  coverage branch if (item._src_loading)
+//  coverage branch if (item._src_loading)
   node._src_loading = true
-  //  coverage branch if (Array.isArray(el))
+//  coverage branch if (Array.isArray(el))
   fireLazyload([node])
   node._src_loading = false
   fireLazyload(node, true)
@@ -56,29 +67,40 @@ describe('utils', function () {
 }, IMG_REC_INDENT)
   }, 100)
 })
-it('getThrottleLazyload', (done) => {
-  const {
-getThrottleLazyload
-  } = lazyload
-  const node = document.createElement('figure')
-  const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
-  const wait = 100
-  const IMG_REC_INDENT = 500
-  node.style.height = '10px'
-  node.setAttribute('img-src', validImageTransparent)
-  node.setAttribute('img-placeholder', validImageBlack)
-  document.body.appendChild(node)
-  window._first_screen_detected = false
-  getThrottleLazyload(wait, node)()
-  setTimeout(() => {
-expect(node.style.backgroundImage.replace(urlReg, 
'')).to.be.equal('url(' + validImageTransparent + ')')
+describe('getThrottleLazyload', () => {
+  it('should use default value while parmas is undefined', (done) => {
+const IMG_REC_INDENT = 500
+window._first_screen_detected = true
+getThrottleLazyload()()
 setTimeout(() => {
-  
expect(this.weexEmit.withArgs('renderfinish').callCount).to.be.equal(2)
-  
expect(this.weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
-  done()
-  document.body.removeChild(node)
-}, IMG_REC_INDENT)
-  }, 100)
+  setTimeout(() => {
+
expect(this.weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
+
expect(this.weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(0)
+done()
+  }, IMG_REC_INDENT)
+}, 16)
+  })
+  it('should be work', (done) => {
+const node = document.createElement('figure')
+const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
+const wait = 100
+  

[10/50] incubator-weex git commit: * [html5] move tool function into func.js

2017-07-20 Thread danz
* [html5] move tool function into func.js


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

Branch: refs/heads/0.15-dev
Commit: 5c1dc2262a75382437edd8c76c07118de264d754
Parents: 7c42710
Author: erha19 
Authored: Mon Jul 10 15:07:52 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 15:07:52 2017 +0800

--
 html5/render/vue/utils/index.js | 104 ---
 1 file changed, 104 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5c1dc226/html5/render/vue/utils/index.js
--
diff --git a/html5/render/vue/utils/index.js b/html5/render/vue/utils/index.js
index 032c472..7d5dfbd 100644
--- a/html5/render/vue/utils/index.js
+++ b/html5/render/vue/utils/index.js
@@ -22,107 +22,3 @@ export * from './component'
 export * from './lazyload'
 export * from './style'
 export * from './type'
-
-/**
- * Create a cached version of a pure function.
- */
-export function cached (fn) {
-  const cache = Object.create(null)
-  return function cachedFn (str) {
-const hit = cache[str]
-return hit || (cache[str] = fn(str))
-  }
-}
-
-/**
- * Camelize a hyphen-delmited string.
- */
-const camelizeRE = /-(\w)/g
-export const camelize = cached(str => {
-  return str.replace(camelizeRE, (_, c) => c.toUpperCase())
-})
-
-export function camelizeKeys (obj) {
-  const res = {}
-  for (const key in obj) {
-res[camelize(key)] = obj[key]
-  }
-  return res
-}
-
-/**
- * Capitalize a string.
- */
-export const capitalize = cached(str => {
-  return str.charAt(0).toUpperCase() + str.slice(1)
-})
-
-/**
- * Hyphenate a camelCase string.
- */
-const hyphenateRE = /([^-])([A-Z])/g
-export const hyphenate = cached(str => {
-  return str
-.replace(hyphenateRE, '$1-$2')
-.replace(hyphenateRE, '$1-$2')
-.toLowerCase()
-})
-
-export function hyphenateKeys (obj) {
-  const res = {}
-  for (const key in obj) {
-res[hyphenate(key)] = obj[key]
-  }
-  return res
-}
-
-const vendorsReg = /webkit-|moz-|o-|ms-/
-export function hyphenateStyleKeys (obj) {
-  const res = {}
-  for (const key in obj) {
-const hk = hyphenate(key).replace(vendorsReg, function ($0) {
-  return '-' + $0
-})
-res[hk] = obj[key]
-  }
-  return res
-}
-
-export function camelToKebab (name) {
-  if (!name) { return '' }
-  return name.replace(/([A-Z])/g, function (g, g1) {
-return `-${g1.toLowerCase()}`
-  })
-}
-
-export function appendCss (css, cssId, replace) {
-  let style = document.getElementById(cssId)
-  if (style && replace) {
-style.parentNode.removeChild(style)
-style = null
-  }
-  if (!style) {
-style = document.createElement('style')
-style.type = 'text/css'
-cssId && (style.id = cssId)
-document.getElementsByTagName('head')[0].appendChild(style)
-  }
-  style.appendChild(document.createTextNode(css))
-}
-
-export function nextFrame (callback) {
-  const runner = window.requestAnimationFrame
-|| window.webkitRequestAnimationFrame
-|| (cb => setTimeout(cb, 16))
-  runner(callback)
-}
-
-export function toCSSText (object) {
-  if (!object) { return }
-  const obj = hyphenateStyleKeys(object)
-  let cssText = ''
-  for (const key in obj) {
-cssText += `${key}:${obj[key]};`
-  }
-  return cssText
-}



[14/50] incubator-weex git commit: * [html5] change code to es6 arrow functions

2017-07-20 Thread danz
* [html5] change code to es6 arrow functions


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

Branch: refs/heads/0.15-dev
Commit: c671008155bc30ee8b505d4d068230949a1b1d28
Parents: bca5422
Author: erha19 
Authored: Tue Jul 11 15:52:32 2017 +0800
Committer: erha19 
Committed: Tue Jul 11 15:52:32 2017 +0800

--
 html5/test/render/vue/utils/event.js| 12 +++
 html5/test/render/vue/utils/func.js | 54 ++--
 html5/test/render/vue/utils/lazyload.js | 36 ++-
 html5/test/render/vue/utils/style.js| 14 
 html5/test/render/vue/utils/type.js |  8 ++---
 5 files changed, 63 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c6710081/html5/test/render/vue/utils/event.js
--
diff --git a/html5/test/render/vue/utils/event.js 
b/html5/test/render/vue/utils/event.js
index 5be2e7f..837242e 100644
--- a/html5/test/render/vue/utils/event.js
+++ b/html5/test/render/vue/utils/event.js
@@ -19,7 +19,7 @@
 import * as event from '../../../../render/vue/utils/event'
 describe('utils', function () {
   describe('event', function () {
-it('createEvent', function () {
+it('createEvent', () => {
   const {
 createEvent
   } = event
@@ -28,7 +28,7 @@ describe('utils', function () {
   expect(clickEvent.type).to.be.equal('click')
   expect(clickEvent.target).to.be.a('null')
 })
-it('createCustomEvent', function () {
+it('createCustomEvent', () => {
   const {
 createCustomEvent
   } = event
@@ -37,7 +37,7 @@ describe('utils', function () {
   expect(customEvent.type).to.be.equal('customEvent')
   expect(customEvent.target).to.be.a('null')
 })
-it('dispatchEvent', function (done) {
+it('dispatchEvent', (done) => {
   const {
 dispatchEvent
   } = event
@@ -45,7 +45,7 @@ describe('utils', function () {
   let expected
   const shouldBe = 'test'
   document.body.appendChild(node)
-  node.addEventListener('click', function () {
+  node.addEventListener('click', () => {
 expected = shouldBe
 document.body.removeChild(node)
 expect(expected).to.be.equal(shouldBe)
@@ -56,7 +56,7 @@ describe('utils', function () {
   dispatchEvent(node, clickevent)
   expected(dispatchEvent).to.be.a('function')
 })
-it('mapFormEvents', function () {
+it('mapFormEvents', () => {
   const {
 mapFormEvents
   } = event
@@ -64,7 +64,7 @@ describe('utils', function () {
 $el: {
   value: 'test'
 },
-$emit: function () {}
+$emit: () => {}
   }
   const spy = sinon.spy(context, '$emit')
   const map = mapFormEvents(context)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c6710081/html5/test/render/vue/utils/func.js
--
diff --git a/html5/test/render/vue/utils/func.js 
b/html5/test/render/vue/utils/func.js
index 1c50bac..ca8a2c5 100644
--- a/html5/test/render/vue/utils/func.js
+++ b/html5/test/render/vue/utils/func.js
@@ -19,13 +19,13 @@
 import * as utils from '../../../../render/vue/utils/func'
 describe('utils', function () {
   describe('function', function () {
-before(function () {
+before(() => {
   this.clock = sinon.useFakeTimers()
 })
-after(function () {
+after(() => {
   this.clock.restore()
 })
-it('extend', function () {
+it('extend', () => {
   const {
 extend
   } = utils
@@ -45,7 +45,7 @@ describe('utils', function () {
   })
   expect(extend(abc, {})).to.be.deep.equal(abc)
 })
-it('extendTruthy', function () {
+it('extendTruthy', () => {
   const {
 extendTruthy
   } = utils
@@ -59,7 +59,7 @@ describe('utils', function () {
   expect(extendTruthy({}, [from])[0]).to.be.deep.equal(from)
   expect(extendTruthy({}, [])).to.be.deep.equal({})
 })
-it('extendKeys', function () {
+it('extendKeys', () => {
   const {
 extendKeys
   } = utils
@@ -73,7 +73,7 @@ describe('utils', function () {
   }
   expect(extendKeys({}, from, ['test1'])).to.be.deep.equal(expected)
 })
-it('extractKeys', function () {
+it('extractKeys', () => {
   const {
 extractKeys
   } = utils
@@ -92,7 +92,7 @@ describe('utils', function () {
   expect(from).to.be.deep.equal(fromExpected)
   expect(extractKeys({}, {}, [])).to.be.deep.equal({})
 })
-it('bind', functi

[44/50] incubator-weex git commit: * [html5] improve style unit test case

2017-07-20 Thread danz
* [html5] improve style unit test case


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

Branch: refs/heads/0.15-dev
Commit: 9c84d23729d424d18d7c0a2c474dc339f4617067
Parents: 646ce6b
Author: erha19 
Authored: Tue Jul 18 16:32:38 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 16:32:38 2017 +0800

--
 html5/test/render/vue/utils/style.js | 119 +-
 1 file changed, 100 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9c84d237/html5/test/render/vue/utils/style.js
--
diff --git a/html5/test/render/vue/utils/style.js 
b/html5/test/render/vue/utils/style.js
index 6bc1a78..2110f23 100644
--- a/html5/test/render/vue/utils/style.js
+++ b/html5/test/render/vue/utils/style.js
@@ -24,71 +24,153 @@ import {
   normalizeString,
   normalizeNumber,
   normalizeUnitsNum,
+  addTransform,
+  addTranslateX,
   trimComment
 } from '../../../../render/vue/utils/style'
-import { init } from '../../../../render/vue/env/viewport'
-
+import {
+  init
+} from '../../../../render/vue/env/viewport'
 describe('style', function () {
   // const rect = document.documentElement.getBoundingClientRect()
   // const info = {}
-  const { scale, dpr } = init()
+  const {
+scale,
+dpr
+  } = init()
   it('should support using 0.5px to paint 1px width border', () => {
 expect(supportHairlines()).to.be.false
 window.devicePixelRatio = 2
-// phantomjs didn't support using 0.5px to paint 1px width border
+  // phantomjs didn't support using 0.5px to paint 1px width border
 expect(supportHairlines()).to.be.false
   })
   it('should support stick style', () => {
 // phantomjs support stick true
 expect(supportSticky()).to.be.true
   })
-
   it('should normalize units numbers', () => {
 expect(normalizeUnitsNum('100px')).to.equal(100 * scale + 'px')
 expect(normalizeUnitsNum('100')).to.equal(100 * scale + 'px')
 expect(normalizeUnitsNum('100wx')).to.equal(100 * scale * dpr + 'px')
 expect(normalizeUnitsNum('20wm')).to.equal('')
   })
-
   it('should normalize number style vals', () => {
 expect(normalizeNumber('width', 10)).to.equal(10 * scale + 'px')
 expect(normalizeNumber('width', 1.2)).to.equal(1.2 * scale + 'px')
   })
-
   it('should normalize string style vals', () => {
 expect(normalizeString('width', '100%')).to.equal('100%')
-expect(normalizeString('transform', 'translate3d(10px, 10px, 10px)'))
-  .to.equal(`translate3d(${10 * scale}px, ${10 * scale}px, ${10 * 
scale}px)`)
-expect(normalizeString('border-bottom', '4px solid #112233'))
-  .to.equal(`${4 * scale}px solid #112233`)
-expect(normalizeString('border-left', '4wx dotted red'))
-  .to.equal(`${4 * scale * dpr}px dotted red`)
+expect(normalizeString('transform', 'translate3d(10px, 10px, 
10px)')).to.equal(`translate3d(${10 * scale}px, ${10 * scale}px, ${10 * 
scale}px)`)
+expect(normalizeString('border-bottom', '4px solid 
#112233')).to.equal(`${4 * scale}px solid #112233`)
+expect(normalizeString('border-left', '4wx dotted red')).to.equal(`${4 * 
scale * dpr}px dotted red`)
   })
-
   it('should normalize style object', () => {
 const style = {
   width: '200px',
   flexDirection: 'row',
   flex: 1,
   fontSize: 12,
-  transform: 'translate3d(100px, 100px, 0)'
+  transform: 'translate3d(100px, 100px, 0)',
+  // just for run default branch
+  reg: /^(\d+)/
 }
 const res = normalizeStyle(style)
-console.log(res)
 expect(normalizeString('transform', 
style.transform)).to.equal(res.transform)
 expect(normalizeString('width', style.width)).to.equal(res.width)
 expect(normalizeString('flexDirection', 
style.flexDirection)).to.equal(res.flexDirection)
 expect(normalizeNumber('fontSize', style.fontSize)).to.equal(res.fontSize)
-// flex is in noUnitsNumberKeys array
+  // flex is in noUnitsNumberKeys array
 expect(style.flex).to.equal(res.flex)
+expect(style.reg).to.equal(res.reg)
   })
-
   it('should trim comment in style.', () => {
 const cssText = '.ani-point0[data-v-4c05cc1a] {\n  left: 88px;\n  top: 
88px;\n}\n.ani-point1[data-v-4c05cc1a] {\n  /* left: 43px;\n  top: 71px;*/\n}'
 const trimmed = '.ani-point0[data-v-4c05cc1a] {\n  left: 88px;\n  top: 
88px;\n}\n.ani-point1[data-v-4c05cc1a] {\n  \n}'
 expect(trimComment(cssText)).to.equal(trimmed)
   })
 })
+describe('transform', () => {
+  describe('should add translate style to the element', () => {
+const style = {
+  tr

[25/50] incubator-weex git commit: * [html5] remove too much websocket linker

2017-07-20 Thread danz
* [html5] remove too much websocket linker


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

Branch: refs/heads/0.15-dev
Commit: f00356a1c3a2b82c31db84a2ab7e1636cf7a536a
Parents: ab67cf8
Author: erha19 
Authored: Thu Jul 13 22:37:39 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 22:37:39 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f00356a1/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index 257bb56..8731957 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -76,11 +76,5 @@ describe('webSocket module', function () {
 expect(ws.onmessage).to.be.deep.equal(message)
   })
 })
-describe('should ignore', function () {
-  it('url is undefined', (done) => {
-websocket.WebSocket('')
-expect(websocket.INSTANCE).to.be.null
-  })
-})
   })
 })



[05/50] incubator-weex git commit: * [html5] add some tool function into func.js

2017-07-20 Thread danz
* [html5]  add some tool function into func.js


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

Branch: refs/heads/0.15-dev
Commit: 7baff110fbf12650fb7a8968d1eaf66267b8bce6
Parents: 5addc15
Author: erha19 
Authored: Mon Jul 10 15:03:20 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 15:03:20 2017 +0800

--
 html5/render/vue/utils/func.js | 146 +---
 1 file changed, 118 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7baff110/html5/render/vue/utils/func.js
--
diff --git a/html5/render/vue/utils/func.js b/html5/render/vue/utils/func.js
index 38a0435..5018b09 100644
--- a/html5/render/vue/utils/func.js
+++ b/html5/render/vue/utils/func.js
@@ -16,35 +16,41 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 // @flow
-
-import { isArray } from './type'
-
+import {
+  isArray
+} from './type'
 /**
  * Mix properties into target object.
  * the rightest object's value has the highest priority.
  */
-export function extend (to: {}, ...args: Array<{}>): {} {
-  if (!args || args.length <= 0) { return to }
+export function extend (to: {}, ...args: Array < {} >): {} {
+  if (!args || args.length <= 0) {
+return to
+  }
   args.forEach(from => {
-if (typeof from !== 'object') { return }
+if (typeof from !== 'object') {
+  return
+}
 for (const key in from) {
   to[key] = from[key]
 }
   })
   return to
 }
-
 /**
  * Mix truthy or '' property values into target object.
  * mostly for merging styles. (that's why '' is falsy but still should be 
counted in.)
  * the rightest object's value has the highest priority.
  */
-export function extendTruthy (to: {}, ...args: Array<{}>): {} {
-  if (!args || args.length <= 0) { return to }
+export function extendTruthy (to: {}, ...args: Array < {} >): {} {
+  if (!args || args.length <= 0) {
+return to
+  }
   args.forEach(from => {
-if (typeof from !== 'object') { return }
+if (typeof from !== 'object') {
+  return
+}
 let i
 for (const key in from) {
   if (((i = from[key]) || i === '' || i === 0) && i !== 'undefined') {
@@ -54,29 +60,28 @@ export function extendTruthy (to: {}, ...args: Array<{}>): 
{} {
   })
   return to
 }
-
 /**
  * Mix specified properties into target object.
  */
-export function extendKeys (to: {}, from: {} = {}, keys: Array): {} {
+export function extendKeys (to: {}, from: {} = {}, keys: Array < string >): {} 
{
   (keys || []).forEach(key => {
 from && (to[key] = from[key])
   })
   return to
 }
-
 /**
  * Extract specified properties from src to target object.
  */
-export function extractKeys (to: {}, from: {} = {}, keys: Array) {
-  if (!from) { return to }
+export function extractKeys (to: {}, from: {} = {}, keys: Array < string >) {
+  if (!from) {
+return to
+  }
   (keys || []).forEach(key => {
 from && (to[key] = from[key])
 from && (delete from[key])
   })
   return to
 }
-
 /**
  * Simple bind, faster than native
  *
@@ -87,14 +92,9 @@ export function extractKeys (to: {}, from: {} = {}, keys: 
Array) {
 export function bind (fn: Function, ctx: mixed) {
   return function (a: mixed) {
 const l = arguments.length
-return l
-  ? l > 1
-? fn.apply(ctx, arguments)
-: fn.call(ctx, a)
-  : fn.call(ctx)
+return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : 
fn.call(ctx)
   }
 }
-
 /**
  * Only call the func the last time before it's not that frequently called.
  */
@@ -109,12 +109,12 @@ export function debounce (func: Function, wait: number) {
 timerId = setTimeout(later, wait)
   }
 }
-
 /**
  * Only call the func the first time before a series frequently function calls 
happen.
  */
 export function depress (func: Function, wait: number) {
   let timerId
+
   function later () {
 timerId = null
   }
@@ -126,15 +126,14 @@ export function depress (func: Function, wait: number) {
 timerId = setTimeout(later, wait)
   }
 }
-
 /**
  * Only call the func every time after a wait milliseconds if it's too 
frequently called.
  */
 export function throttle (func: Function, wait: number, callLastTime: boolean) 
{
   let last = 0
   let lastTimer = null
-  const lastTimeDuration = wait + (wait > 25 ? wait : 25)  // plus half wait 
time.
-  return function (...args: Array) {
+  const lastTimeDuration = wait + (wait > 25 ? wait : 25) // plus half wait 
time.
+  return function (...args: Array < mixed >) {
 const context = this
 const time = new Date().

[36/50] incubator-weex git commit: * [html5] fix component visible case

2017-07-20 Thread danz
* [html5] fix component visible case


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

Branch: refs/heads/0.15-dev
Commit: e878c2d4ac70938bb6c5016e76d89f47ba8e4561
Parents: a1db177
Author: erha19 
Authored: Tue Jul 18 10:40:34 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 10:40:34 2017 +0800

--
 html5/test/render/vue/utils/component.js | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e878c2d4/html5/test/render/vue/utils/component.js
--
diff --git a/html5/test/render/vue/utils/component.js 
b/html5/test/render/vue/utils/component.js
index 9de64b0..a8aee77 100644
--- a/html5/test/render/vue/utils/component.js
+++ b/html5/test/render/vue/utils/component.js
@@ -21,6 +21,7 @@ init('utils component', (Vue, helper) => {
   before(() => {
 helper.register('div', div)
 vm = helper.createVm(firstScreenAppearBundle, id)
+vm.$el.style.height = '100px'
   })
   describe('component functions', () => {
 it('getParentScroller', () => {



[22/50] incubator-weex git commit: * [html5] update webSocket formate

2017-07-20 Thread danz
* [html5] update webSocket formate


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

Branch: refs/heads/0.15-dev
Commit: 8a84fa6de3a68bfb4b990bf40c26e6e0025ae0e9
Parents: cfcf769
Author: erha19 
Authored: Thu Jul 13 14:30:22 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 14:30:22 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 17 ++---
 1 file changed, 6 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8a84fa6d/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index d5a3c0d..b07205e 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -18,9 +18,8 @@
  */
 import websocket from '../../../../render/vue/modules/websocket/websocket'
 const TestUrl = 'ws://echo.websocket.org'
-/** @test {webSocket module} */
+  /** @test {webSocket module} */
 describe('webSocket module', () => {
-
   describe('extends Standard WebSocket API', () => {
 context('should inherit', () => {
   let ws = null
@@ -51,32 +50,28 @@ describe('webSocket module', () => {
 context('should forward native events', () => {
   let ws = null
   before(() => {
-ws = websocket.WebSocket(TestUrl,'')
+ws = websocket.WebSocket(TestUrl, '')
   })
   after(() => {
 websocket.close()
   })
   it('open', function () {
-const open  = () => {
-}
+const open = () => {}
 websocket.onopen = open
 expect(ws.onopen).to.be.deep.equal(open)
   })
   it('close', function () {
-const close  = () => {
-}
+const close = () => {}
 websocket.onclose = close
 expect(ws.onclose).to.be.deep.equal(close)
   })
   it('error', function () {
-const error  = () => {
-}
+const error = () => {}
 websocket.onerror = error
 expect(ws.onerror).to.be.deep.equal(error)
   })
   it('message', function () {
-const message  = () => {
-}
+const message = () => {}
 websocket.onmessage = message
 expect(ws.onmessage).to.be.deep.equal(message)
   })



[34/50] incubator-weex git commit: * [html5] rebuild perf unit test code

2017-07-20 Thread danz
* [html5] rebuild perf unit test 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/066be096
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/066be096
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/066be096

Branch: refs/heads/0.15-dev
Commit: 066be09627f1f703af0a0cf387fac38fc6135bf6
Parents: 25947dd
Author: erha19 
Authored: Mon Jul 17 20:50:24 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 20:50:24 2017 +0800

--
 html5/test/render/vue/utils/perf.js | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/066be096/html5/test/render/vue/utils/perf.js
--
diff --git a/html5/test/render/vue/utils/perf.js 
b/html5/test/render/vue/utils/perf.js
index c3b7ac7..824daa3 100644
--- a/html5/test/render/vue/utils/perf.js
+++ b/html5/test/render/vue/utils/perf.js
@@ -37,6 +37,12 @@ describe('utils', function () {
 after(() => {
   this.clock.restore()
 })
+beforeEach(() => {
+  this.weexEmit = sinon.stub(window.weex, 'emit')
+})
+afterEach(() => {
+  this.weexEmit.restore()
+})
 it('collectStatPerf', () => {
   const time = (new Date()).getTime()
   collectStatPerf('totalTime', time)
@@ -45,24 +51,20 @@ describe('utils', function () {
   expect(collectStatPerf()).to.be.a('undefined')
 })
 it('tagFirstScreen', () => {
-  const weexEmit = sinon.stub(window.weex, 'emit')
   expect(tagFirstScreen).to.be.a('function')
   tagFirstScreen()
-  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
-  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(0)
+  expect(this.weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
+  
expect(this.weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(0)
   window._first_screen_detected = false
   tagFirstScreen()
-  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(2)
-  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
-  weexEmit.restore()
+  expect(this.weexEmit.withArgs('renderfinish').callCount).to.be.equal(2)
+  
expect(this.weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
 })
 it('tagImg', () => {
-  const weexEmit = sinon.stub(window.weex, 'emit')
   tagImg()
   this.clock.tick(500)
-  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
+  expect(this.weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
   expect(tagImg).to.be.a('function')
-  weexEmit.restore()
 })
 it('tagBeforeCreate', () => {
   tagBeforeCreate()



[12/50] incubator-weex git commit: * [html5] export perf value

2017-07-20 Thread danz
* [html5] export perf value


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

Branch: refs/heads/0.15-dev
Commit: 57599bde817f572d07e2c9891dfaa14fc7dfb5a7
Parents: f55ef8d
Author: erha19 
Authored: Tue Jul 11 15:50:11 2017 +0800
Committer: erha19 
Committed: Tue Jul 11 15:50:11 2017 +0800

--
 html5/render/vue/utils/perf.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/57599bde/html5/render/vue/utils/perf.js
--
diff --git a/html5/render/vue/utils/perf.js b/html5/render/vue/utils/perf.js
index 190b78e..0ae04bd 100644
--- a/html5/render/vue/utils/perf.js
+++ b/html5/render/vue/utils/perf.js
@@ -23,9 +23,8 @@
  */
 
 import { debounce, depress, extend } from './func'
-
 // performance tracker for weex.
-const perf: {
+export const perf: {
   earliestBeforeCreates: Array,
   latestMounts: Array,
   earliestBeforeUpdates: Array,



[15/50] incubator-weex git commit: * [html5] import perf value from perf.js

2017-07-20 Thread danz
* [html5] import perf value from perf.js


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

Branch: refs/heads/0.15-dev
Commit: 75de22ed7881204d0b2a43c75ee574ca6ed8c614
Parents: c671008
Author: erha19 
Authored: Tue Jul 11 15:53:53 2017 +0800
Committer: erha19 
Committed: Tue Jul 11 15:53:53 2017 +0800

--
 html5/test/render/vue/utils/perf.js | 34 +---
 1 file changed, 14 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/75de22ed/html5/test/render/vue/utils/perf.js
--
diff --git a/html5/test/render/vue/utils/perf.js 
b/html5/test/render/vue/utils/perf.js
index 87ee213..c3b7ac7 100644
--- a/html5/test/render/vue/utils/perf.js
+++ b/html5/test/render/vue/utils/perf.js
@@ -26,25 +26,25 @@ import {
   tagBeforeUpdate,
   tagUpdated,
   tagBegin,
-  tagEnd
+  tagEnd,
+  perf
 } from '../../../../render/vue/utils/perf'
 describe('utils', function () {
   describe('pref', function () {
-before(function () {
+before(() => {
   this.clock = sinon.useFakeTimers()
 })
-after(function () {
+after(() => {
   this.clock.restore()
 })
-it('collectStatPerf', function () {
-  const perf = window._weex_perf
+it('collectStatPerf', () => {
   const time = (new Date()).getTime()
   collectStatPerf('totalTime', time)
   expect(collectStatPerf).to.be.a('function')
   expect(perf.stat['totalTime']).to.be.equal(time)
   expect(collectStatPerf()).to.be.a('undefined')
 })
-it('tagFirstScreen', function () {
+it('tagFirstScreen', () => {
   const weexEmit = sinon.stub(window.weex, 'emit')
   expect(tagFirstScreen).to.be.a('function')
   tagFirstScreen()
@@ -56,7 +56,7 @@ describe('utils', function () {
   expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
   weexEmit.restore()
 })
-it('tagImg', function () {
+it('tagImg', () => {
   const weexEmit = sinon.stub(window.weex, 'emit')
   tagImg()
   this.clock.tick(500)
@@ -64,8 +64,7 @@ describe('utils', function () {
   expect(tagImg).to.be.a('function')
   weexEmit.restore()
 })
-it('tagBeforeCreate', function () {
-  const perf = window._weex_perf
+it('tagBeforeCreate', () => {
   tagBeforeCreate()
   this.clock.tick(25)
   const time = 
perf.earliestBeforeCreates[perf.earliestBeforeCreates.length - 1]
@@ -73,16 +72,14 @@ describe('utils', function () {
   expect(perf.earliestBeforeCreates).to.have.lengthOf(1)
   expect(tagBeforeCreate).to.be.a('function')
 })
-it('tagRootMounted', function () {
-  const perf = window._weex_perf
+it('tagRootMounted', () => {
   tagRootMounted()
   const time = perf.latestMounts[perf.latestMounts.length - 1]
   expect(time).to.be.a('number')
   expect(perf.stat['totalTime']).to.be.equal(parseInt(time))
   expect(tagRootMounted).to.be.a('function')
 })
-it('tagMounted', function () {
-  const perf = window._weex_perf
+it('tagMounted', () => {
   perf.firstAllMountedTime = 0
   tagMounted()
   this.clock.tick(25)
@@ -92,15 +89,13 @@ describe('utils', function () {
   expect(perf.createTime[perf.createTime.length - 
1]).to.have.all.keys('start', 'end', 'duration')
   expect(perf.firstAllMountedTime).to.be.above(0)
 })
-it('tagBeforeUpdate', function () {
-  const perf = window._weex_perf
+it('tagBeforeUpdate', () => {
   tagBeforeUpdate()
   this.clock.tick(25)
   expect(tagBeforeUpdate).to.be.a('function')
   expect(perf.earliestBeforeUpdates).to.have.lengthOf(1)
 })
-it('tagUpdated', function () {
-  const perf = window._weex_perf
+it('tagUpdated', () => {
   tagUpdated()
   this.clock.tick(25)
   expect(tagUpdated).to.be.a('function')
@@ -108,13 +103,12 @@ describe('utils', function () {
   expect(perf.updateTime).to.have.lengthOf(1)
   expect(perf.updateTime[perf.updateTime.length - 
1]).to.have.all.keys('start', 'end', 'duration')
 })
-it('tagBegin', function () {
+it('tagBegin', () => {
   const name = 'test'
   tagBegin(name)
   expect(tagBegin).to.be.a('function')
 })
-it('tagEnd', function () {
-  const perf = window._weex_perf
+it('tagEnd', () => {
   const name = 'test'
   tagEnd(name)
   expect(tagEnd).to.be.a('function')



[30/50] incubator-weex git commit: Merge branch '0.15-dev' of https://github.com/apache/incubator-weex into 0.15-dev

2017-07-20 Thread danz
Merge branch '0.15-dev' of https://github.com/apache/incubator-weex into 
0.15-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/b66b6263
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b66b6263
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b66b6263

Branch: refs/heads/0.15-dev
Commit: b66b62637be4a3debb8ce1412e82a4f3f9532991
Parents: f0dd9d0 3bf348d
Author: erha19 
Authored: Mon Jul 17 17:54:49 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 17:54:49 2017 +0800

--
 .../com/taobao/weex/CreateFinishListener.java   |  27 +++
 .../com/taobao/weex/UpdateFinishListener.java   |  27 +++
 .../java/com/taobao/weex/WXSDKInstance.java |  39 +
 .../com/taobao/weex/dom/WXTextDomObject.java|   4 +-
 .../com/taobao/weex/ui/component/WXSlider.java  |  28 +++
 doc/source/cn/references/modules/timer.md   |  47 +
 doc/source/references/modules/timer.md  |  59 +++
 examples/vue/hello.vue  |   2 +-
 .../vue/components/scrollable/list/index.js |   3 +-
 .../vue/components/scrollable/scroller.js   |   3 +-
 .../vue/components/scrollable/waterfall.js  |   3 +-
 .../render/vue/components/slider/slideMixin.js  |  17 +-
 html5/render/vue/core/node.js   | 172 ++-
 html5/render/vue/env/wx-env.js  |   2 +-
 html5/render/vue/mixins/base.js |  16 +-
 html5/render/vue/mixins/scrollable.js   |  18 +-
 html5/render/vue/utils/style.js |  30 +++-
 html5/test/render/vue/core/node.js  |  22 ++-
 .../WeexSDK/Sources/Bridge/WXBridgeContext.m|  33 ++--
 .../WeexSDK/Sources/Component/WXAComponent.m|   2 +-
 .../Sources/Component/WXImageComponent.m|   4 +-
 .../WeexSDK/Sources/Component/WXListComponent.m |  55 --
 .../WeexSDK/Sources/Component/WXTextComponent.m |  54 +++---
 .../Sources/Component/WXVideoComponent.m|   2 +-
 .../WeexSDK/Sources/Component/WXWebComponent.m  |   2 +-
 .../Sources/Handler/WXURLRewriteDefaultImpl.m   |   2 +-
 .../WeexSDK/Sources/Layout/WXComponent+Layout.m |   2 +-
 ios/sdk/WeexSDK/Sources/Manager/WXRuleManager.m |   2 +-
 ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m   |   2 +-
 ios/sdk/WeexSDK/Sources/Module/WXDomModule.m|   8 +-
 ios/sdk/WeexSDK/Sources/Module/WXStreamModule.m |   2 +-
 .../Sources/Protocol/WXURLRewriteProtocol.h |   2 +-
 .../Sources/View/WXComponent+ViewManagement.m   |   4 +
 package.json|   2 +-
 packages/weex-vue-render/package.json   |   8 +-
 35 files changed, 545 insertions(+), 160 deletions(-)
--




[19/50] incubator-weex git commit: + [html5] update lazyload unit test

2017-07-20 Thread danz
+ [html5] update lazyload unit test


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

Branch: refs/heads/0.15-dev
Commit: 5521172b0a2d7b3ce74fb4e7596a9778c5807825
Parents: 1bbe886
Author: erha19 
Authored: Thu Jul 13 13:17:18 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 13:17:18 2017 +0800

--
 html5/test/render/vue/utils/lazyload.js | 42 +---
 1 file changed, 25 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5521172b/html5/test/render/vue/utils/lazyload.js
--
diff --git a/html5/test/render/vue/utils/lazyload.js 
b/html5/test/render/vue/utils/lazyload.js
index 8576ffc..59c5593 100644
--- a/html5/test/render/vue/utils/lazyload.js
+++ b/html5/test/render/vue/utils/lazyload.js
@@ -25,34 +25,42 @@ describe('utils', function () {
 after(() => {
   this.clock.restore()
 })
-// it('applySrc', () => {
-
-// })
+it('applySrc', () => {
+  const {
+applySrc
+  } = lazyload
+  const node = document.createElement('figure')
+  node.setAttribute('img-src', 'http://via.placeholder.com/1x1')
+  node.setAttribute('img-placeholder', 'http://via.placeholder.com/2x2')
+  document.body.appendChild(node)
+  expect(applySrc(node, '')).to.be.a('undefined')
+  expect(node.attributes[0].name).to.be.equal('img-src')
+})
 it('fireLazyload', () => {
-//   const {
-// fireLazyload
-//   } = lazyload
-//   const node = document.createElement('figure')
-//   node.setAttribute('img-src', 'http://some-domain/image-src.jpg')
-//   node.setAttribute('img-placeholder', 
'http://some-domain/image-placeholder')
-//   document.body.appendChild(node)
-//   fireLazyload(node, true)
-//   
expect(node.style.backgroundImage).to.be.equal('url(http://some-domain/image-src.jpg)')
+  const {
+fireLazyload
+  } = lazyload
+  const node = document.createElement('figure')
+  node.setAttribute('img-src', 'http://via.placeholder.com/1x1')
+  node.setAttribute('img-placeholder', 'http://via.placeholder.com/2x2')
+  document.body.appendChild(node)
+  fireLazyload(node, true)
+  
expect(node.style.backgroundImage).to.be.equal('url(http://via.placeholder.com/1x1)')
 })
 it('getThrottleLazyload', () => {
   const {
 getThrottleLazyload
   } = lazyload
   const node = document.createElement('figure')
-  node.setAttribute('img-src', 'http://some-domain/image-src.jpg')
-  node.setAttribute('img-placeholder', 
'http://some-domain/image-placeholder')
+  node.setAttribute('img-src', 'http://via.placeholder.com/1x1')
+  node.setAttribute('img-placeholder', 'http://via.placeholder.com/2x2')
   document.body.appendChild(node)
   const throttle = getThrottleLazyload(100, node)
   expect(throttle).to.be.a('function')
   throttle()
-//   this.clock.tick(100)
-//   console.log(node.style.backgroundImage)
-//   
expect(node.style.backgroundImage).to.be.equal('url(http://localhost:9876/img-src.jpg)')
+//   this.clock.tick(100)
+//   console.log(node.style.backgroundImage)
+//   
expect(node.style.backgroundImage).to.be.equal('url(http://localhost:9876/img-src.jpg)')
 })
   })
 })



[04/50] incubator-weex git commit: * [html5] move intro config to config file for test

2017-07-20 Thread danz
* [html5] move intro config to config file for test


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

Branch: refs/heads/0.15-dev
Commit: 5addc15c86558ec8ee1e2d1c34fb52f9344c8fc6
Parents: 500a3b0
Author: erha19 
Authored: Mon Jul 10 14:31:38 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 14:31:38 2017 +0800

--
 build/config.js | 15 +--
 build/karma.vue.conf.js | 64 
 2 files changed, 35 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5addc15c/build/config.js
--
diff --git a/build/config.js b/build/config.js
index 9ad7506..4325f2b 100644
--- a/build/config.js
+++ b/build/config.js
@@ -1,3 +1,4 @@
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -83,13 +84,9 @@ const configs = {
 moduleName: 'WeexVueRender',
 entry: absolute('html5/render/vue/index.js'),
 dest: absolute('packages/weex-vue-render/dist/index.js'),
-intro:`describe('ignore inject function from postcss', function () {
-  it('ignore', function () {
-var shouldBe = 'test'
-var expected = __$styleInject('.body{}',shouldBe)
-expect(shouldBe).to.be.equal(expected)
-  })
-})`,
+banner:`
+console.log('START WEEX VUE RENDER: ${subversion['vue-render']}, Build 
${now()}.');
+window._jslib_init_start = window.performance && window.performance.now && 
window.performance.now() || +new Date();\n\n`,
 format: 'umd',
 plugins: [
   postcss(),
@@ -112,7 +109,7 @@ function getConfig (name, minify) {
 entry: opt.entry,
 dest: minify ? opt.dest.replace(/\.js$/, '.min.js') : opt.dest,
 format: opt.format,
-intro: opt.intro,
+banner: opt.banner,
 plugins: opt.plugins.concat([
   json(),
   replace({
@@ -152,4 +149,4 @@ function now () {
   return (new Date(time)).toISOString().replace('T', ' ').substring(0, 16)
 }
 
-module.exports = getConfig
+module.exports = getConfig
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5addc15c/build/karma.vue.conf.js
--
diff --git a/build/karma.vue.conf.js b/build/karma.vue.conf.js
index 0e750af..7a69d35 100644
--- a/build/karma.vue.conf.js
+++ b/build/karma.vue.conf.js
@@ -20,20 +20,16 @@ var rollupConfig = require('./config')('weex-vue-render', 
true)
 var path = require('path')
 var flow = require('rollup-plugin-flow')
 
-function absolute (pa) {
+function absolute(pa) {
   return path.resolve(__dirname, pa)
 }
-
 var removeConfigs = ['entry', 'dest', 'banner']
 var removePlugins = ['eslint', 'uglify', 'flow-remove-type']
-
 removeConfigs.forEach(cfg => {
   delete rollupConfig[cfg]
 })
-
 var plugins = rollupConfig.plugins.slice()
 rollupConfig.plugins = []
-
 for (var i = 0, l = plugins.length; i < l; i++) {
   var plg = plugins[i]
   var isRemove = false
@@ -45,57 +41,55 @@ for (var i = 0, l = plugins.length; i < l; i++) {
   isRemove = true
 }
   })
-  if (!isRemove) { rollupConfig.plugins.push(plg) }
+  if (!isRemove) {
+rollupConfig.plugins.push(plg)
+  }
 }
-
 /**
  * rollup-plugin-flow-no-whiitespace cause fatial error.
  * use rollup-plugin-flow instead, since no soucemap needed, it's acceptable 
for extra whitespaces.
  */
 rollupConfig.plugins.splice(-2, 1, flow())
-
 rollupConfig.format = 'iife'
 rollupConfig.sourceMap = 'inline'
-
+rollupConfig.intro = `describe('ignore inject function from postcss', function 
() {
+  it('ignore', function () {
+var shouldBe = 'test'
+var expected = __$styleInject('.body{}',shouldBe)
+expect(shouldBe).to.be.equal(expected)
+  })
+})`
+
 module.exports = function (config) {
   config.set({
 frameworks: ['mocha', 'sinon-chai'],
 browsers: ['PhantomJS'],
-files: [
-  '../html5/test/render/vue/utils/*.js',
-  '../html5/test/render/vue/core/*.js',
-  '../html5/test/render/vue/!(utils|core)/*.js'
-],
-exclude: [
-  '../html5/test/render/vue/helper/*.js',
-  '../html5/test/render/vue/vender/**/*.js',
-  '../html5/test/render/vue/data/**/*.js'
+files: ['../html5/test/render/vue/utils/*.js',
+  // '../html5/test/render/vue/core/*.js',
+  // '../html5/test/render/vue/!(utils|core)/*.js'
 ],
-
-// singleRun: false,
-singleRun: true,
-
+exclude: ['../html5/test/render/vue/helper/*.js', 
'../html5/test/render/vue/vender/**/*.js', 

[43/50] incubator-weex git commit: * [html5] update function interface formate

2017-07-20 Thread danz
* [html5] update function interface formate


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

Branch: refs/heads/0.15-dev
Commit: 646ce6babfdc2325b4874092c2596b998468bfb1
Parents: 8527a0e
Author: erha19 
Authored: Tue Jul 18 15:16:58 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 15:16:58 2017 +0800

--
 html5/render/vue/utils/func.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/646ce6ba/html5/render/vue/utils/func.js
--
diff --git a/html5/render/vue/utils/func.js b/html5/render/vue/utils/func.js
index 386a932..bfea8df 100644
--- a/html5/render/vue/utils/func.js
+++ b/html5/render/vue/utils/func.js
@@ -133,7 +133,7 @@ export function throttle (func: Function, wait: number, 
callLastTime: boolean) {
   let last = 0
   let lastTimer = null
   const lastTimeDuration = wait + (wait > 25 ? wait : 25) // plus half wait 
time.
-  return function (...args: Array < mixed >) {
+  return function (...args: Array ) {
 const context = this
 const time = new Date().getTime()
 if (time - last > wait) {



[35/50] incubator-weex git commit: * [html5] eslint formate for component

2017-07-20 Thread danz
* [html5] eslint formate for component


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

Branch: refs/heads/0.15-dev
Commit: a1db177ce965f3853e7f2b8ef5afa6a29c313d79
Parents: 066be09
Author: erha19 
Authored: Mon Jul 17 20:53:55 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 20:53:55 2017 +0800

--
 html5/test/render/vue/utils/component.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a1db177c/html5/test/render/vue/utils/component.js
--
diff --git a/html5/test/render/vue/utils/component.js 
b/html5/test/render/vue/utils/component.js
index 8248493..9de64b0 100644
--- a/html5/test/render/vue/utils/component.js
+++ b/html5/test/render/vue/utils/component.js
@@ -1,3 +1,4 @@
+/*global Event*/
 import { init } from '../helper/runtime'
 import div from '../../../../render/vue/components/div'
 
@@ -19,9 +20,8 @@ init('utils component', (Vue, helper) => {
 
   before(() => {
 helper.register('div', div)
-vm =helper.createVm(firstScreenAppearBundle, id)
+vm = helper.createVm(firstScreenAppearBundle, id)
   })
-  
   describe('component functions', () => {
 it('getParentScroller', () => {
   const { getParentScroller } = components
@@ -50,7 +50,7 @@ init('utils component', (Vue, helper) => {
 setTimeout(() => {
   helper.unregisterDone(id)
   done()
-},25)
+}, 25)
   })
 })
   })



[50/50] incubator-weex git commit: Merge branch '0.15-dev' of https://github.com/erha19/incubator-weex into 0.15-dev

2017-07-20 Thread danz
Merge branch '0.15-dev' of https://github.com/erha19/incubator-weex into 
0.15-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/9764e25e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9764e25e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9764e25e

Branch: refs/heads/0.15-dev
Commit: 9764e25ea1d8abdd803f6b2547f268d470d91ee0
Parents: 831cb26 2211546
Author: MrRaindrop 
Authored: Thu Jul 20 16:28:44 2017 +0800
Committer: MrRaindrop 
Committed: Thu Jul 20 16:28:44 2017 +0800

--
 build/config.js |   1 +
 build/karma.vue.conf.js |   7 +
 html5/render/vue/modules/websocket/websocket.js |   1 +
 html5/render/vue/utils/event.js |   6 +-
 html5/render/vue/utils/func.js  | 136 +++--
 html5/render/vue/utils/index.js | 104 ---
 html5/render/vue/utils/perf.js  |   3 +-
 html5/test/render/vue/modules/websocket.js  |  90 +++---
 html5/test/render/vue/utils/component.js|  50 +++-
 html5/test/render/vue/utils/event.js|  78 ++
 html5/test/render/vue/utils/func.js | 278 +--
 html5/test/render/vue/utils/lazyload.js | 106 +++
 html5/test/render/vue/utils/perf.js | 132 +
 html5/test/render/vue/utils/style.js| 157 +--
 html5/test/render/vue/utils/type.js |  49 
 html5/test/render/vue/validator/index.js|  31 ++-
 16 files changed, 981 insertions(+), 248 deletions(-)
--




[01/50] incubator-weex git commit: * [html5] improve test case

2017-07-20 Thread danz
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 831cb26d3 -> 9764e25ea


* [html5] improve test case


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

Branch: refs/heads/0.15-dev
Commit: 635d27a296ed26c93e3170965c5fbc906e4fe3a7
Parents: 59c0ef9
Author: erha19 
Authored: Sun Jul 9 20:12:25 2017 +0800
Committer: erha19 
Committed: Sun Jul 9 20:12:25 2017 +0800

--
 html5/test/render/vue/utils/pref.js | 22 --
 1 file changed, 20 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/635d27a2/html5/test/render/vue/utils/pref.js
--
diff --git a/html5/test/render/vue/utils/pref.js 
b/html5/test/render/vue/utils/pref.js
index 79a234f..3aad2b8 100644
--- a/html5/test/render/vue/utils/pref.js
+++ b/html5/test/render/vue/utils/pref.js
@@ -19,9 +19,18 @@
 import {
   collectStatPerf,
   tagFirstScreen,
-  tagImg
+  tagImg,  
+  tagBeforeCreate,
+  tagRootMounted,
+  tagMounted,
+  tagBeforeUpdate,
+  tagUpdated,
+  tagBegin,
+  tagEnd
 } from '../../../../render/vue/utils/perf'
 describe('utils', function () {
+  before(function(){
+  })
   describe('pref', function () {
 before(function () {
   this.clock = sinon.useFakeTimers()
@@ -31,17 +40,26 @@ describe('utils', function () {
 })
 it('collectStatPerf', function () {
   expect(collectStatPerf).to.be.a('function')
-  collectStatPerf('totalTime', (new Date()).getTime())
+  expect(collectStatPerf('totalTime', (new 
Date()).getTime())).to.be.a('undefined')
+  expect(collectStatPerf()).to.be.a('undefined')
 })
 it('tagFirstScreen', function () {
+  const weexEmit = sinon.stub(window.weex,'emit')
   expect(tagFirstScreen).to.be.a('function')
   tagFirstScreen()
+  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
+  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(0)
   window._first_screen_detected = false
   tagFirstScreen()
+  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(2)
+  expect(weexEmit.withArgs('firstscreenfinish').callCount).to.be.equal(1)
+  weexEmit.restore()
 })
 it('tagImg', function () {
+  const weexEmit = sinon.stub(window.weex,'emit')
   tagImg()
   this.clock.tick(500)
+  expect(weexEmit.withArgs('renderfinish').callCount).to.be.equal(1)
   expect(tagImg).to.be.a('function')
 })
   })



[07/50] incubator-weex git commit: - [html5] remove index.js on test folder

2017-07-20 Thread danz
- [html5] remove index.js on test folder


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

Branch: refs/heads/0.15-dev
Commit: c96f0e390720f844b13e869645c66d4db993970e
Parents: 0378b36
Author: erha19 
Authored: Mon Jul 10 15:04:48 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 15:04:48 2017 +0800

--
 html5/test/render/vue/utils/index.js | 157 --
 1 file changed, 157 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c96f0e39/html5/test/render/vue/utils/index.js
--
diff --git a/html5/test/render/vue/utils/index.js 
b/html5/test/render/vue/utils/index.js
deleted file mode 100644
index 80edce8..000
--- a/html5/test/render/vue/utils/index.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import * as utils from '../../../../render/vue/utils'
-describe('utils', function () {
-  describe('index', function () {
-it('cached', function () {
-  expect(utils.cached).to.be.a('function')
-})
-it('camelize', function () {
-  const {
-camelize
-  } = utils
-  expect(camelize).to.be.a('function')
-  expect(camelize('')).to.be.equal('')
-  expect(camelize('dispaly')).to.be.equal('dispaly')
-  expect(camelize('-webkit-transform')).to.be.equal('WebkitTransform')
-  expect(camelize('text-overflow')).to.be.equal('textOverflow')
-  expect(camelize('a-b-c-d')).to.be.equal('aBCD')
-})
-it('camelizeKeys', function () {
-  const {
-camelizeKeys
-  } = utils
-  const camelizeobj = {
-dispaly: 'none',
-'-webkit-transform': 'all 1s ease'
-  }
-  const shouldBe = camelizeKeys(camelizeobj)
-  const expected = {
-dispaly: 'none',
-WebkitTransform: 'all 1s ease'
-  }
-  expect(camelizeKeys).to.be.a('function')
-  expect(shouldBe).to.be.deep.equal(expected)
-})
-it('capitalize', function () {
-  const {
-capitalize
-  } = utils
-  expect(capitalize).to.be.a('function')
-  expect(capitalize('')).to.be.equal('')
-  expect(capitalize('string')).to.be.equal('String')
-  expect(capitalize('string object')).to.be.equal('String object')
-  expect(capitalize('[string object]')).to.be.equal('[string object]')
-  expect(capitalize('I have an apple')).to.be.equal('I have an apple')
-})
-it('hyphenate', function () {
-  const {
-hyphenate
-  } = utils
-  expect(hyphenate).to.be.a('function')
-  expect(hyphenate('')).to.be.equal('')
-  expect(hyphenate('dispaly')).to.be.equal('dispaly')
-  expect(hyphenate('WebkitTransform')).to.be.equal('webkit-transform')
-  expect(hyphenate('textOverflow')).to.be.equal('text-overflow')
-  expect(hyphenate('aBCD')).to.be.equal('a-b-c-d')
-})
-it('hyphenateKeys', function () {
-  const {
-hyphenateKeys
-  } = utils
-  const hyphenateobj = {
-dispaly: 'none',
-WebkitTransform: 'all 1s ease'
-  }
-  const shouldBe = hyphenateKeys(hyphenateobj)
-  const expected = {
-dispaly: 'none',
-'webkit-transform': 'all 1s ease'
-  }
-  expect(hyphenateKeys).to.be.a('function')
-  expect(shouldBe).to.be.deep.equal(expected)
-})
-it('hyphenateStyleKeys', function () {
-  const {
-hyphenateStyleKeys
-  } = utils
-  const hyphenateStyleObj = {
-dispaly: 'none',
-'webkit-transform': 'all 1s ease'
-  }
-  const shouldBe = hyphenateStyleKeys(hyphenateStyleObj)
-  const expected = {
-dispaly: 'none',
-'-webkit-transform': 'all 1s ease'
-  }
-  expect(hyphenateStyleKeys).to.be.a('function')
-  expect(shouldBe).to.be.deep.equal(expected)
-}

[49/50] incubator-weex git commit: * [html5] update code formate

2017-07-20 Thread danz
* [html5] update code formate


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

Branch: refs/heads/0.15-dev
Commit: 2211546fb2b9532aabd9fe9cb2ff276f2403cf04
Parents: 5507e9f
Author: erha19 
Authored: Thu Jul 20 11:07:48 2017 +0800
Committer: erha19 
Committed: Thu Jul 20 11:07:48 2017 +0800

--
 build/config.js| 2 +-
 html5/render/vue/utils/func.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2211546f/build/config.js
--
diff --git a/build/config.js b/build/config.js
index 4325f2b..e2de931 100644
--- a/build/config.js
+++ b/build/config.js
@@ -149,4 +149,4 @@ function now () {
   return (new Date(time)).toISOString().replace('T', ' ').substring(0, 16)
 }
 
-module.exports = getConfig
\ No newline at end of file
+module.exports = getConfig

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2211546f/html5/render/vue/utils/func.js
--
diff --git a/html5/render/vue/utils/func.js b/html5/render/vue/utils/func.js
index bfea8df..d4112c47 100644
--- a/html5/render/vue/utils/func.js
+++ b/html5/render/vue/utils/func.js
@@ -133,7 +133,7 @@ export function throttle (func: Function, wait: number, 
callLastTime: boolean) {
   let last = 0
   let lastTimer = null
   const lastTimeDuration = wait + (wait > 25 ? wait : 25) // plus half wait 
time.
-  return function (...args: Array ) {
+  return function (...args: Array) {
 const context = this
 const time = new Date().getTime()
 if (time - last > wait) {



[37/50] incubator-weex git commit: * [html5] add copy right header@notdanger

2017-07-20 Thread danz
* [html5] add copy right header@notdanger


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

Branch: refs/heads/0.15-dev
Commit: 229ba3af68f4cc77ab64ef5d0ad25efcfcf886dd
Parents: e878c2d
Author: erha19 
Authored: Tue Jul 18 11:14:28 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 11:14:28 2017 +0800

--
 html5/test/render/vue/utils/component.js | 18 ++
 1 file changed, 18 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/229ba3af/html5/test/render/vue/utils/component.js
--
diff --git a/html5/test/render/vue/utils/component.js 
b/html5/test/render/vue/utils/component.js
index a8aee77..ed6df2e 100644
--- a/html5/test/render/vue/utils/component.js
+++ b/html5/test/render/vue/utils/component.js
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License") you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 /*global Event*/
 import { init } from '../helper/runtime'
 import div from '../../../../render/vue/components/div'



[11/50] incubator-weex git commit: * [html5] update karam test config

2017-07-20 Thread danz
* [html5] update karam test config


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

Branch: refs/heads/0.15-dev
Commit: f55ef8da30dc1534d0ed9bacd361aaa0ef2eaaec
Parents: 5c1dc22
Author: erha19 
Authored: Mon Jul 10 15:18:23 2017 +0800
Committer: erha19 
Committed: Mon Jul 10 15:18:23 2017 +0800

--
 build/karma.vue.conf.js | 59 +++-
 1 file changed, 36 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f55ef8da/build/karma.vue.conf.js
--
diff --git a/build/karma.vue.conf.js b/build/karma.vue.conf.js
index 7a69d35..31dd819 100644
--- a/build/karma.vue.conf.js
+++ b/build/karma.vue.conf.js
@@ -20,16 +20,20 @@ var rollupConfig = require('./config')('weex-vue-render', 
true)
 var path = require('path')
 var flow = require('rollup-plugin-flow')
 
-function absolute(pa) {
+function absolute (pa) {
   return path.resolve(__dirname, pa)
 }
+
 var removeConfigs = ['entry', 'dest', 'banner']
 var removePlugins = ['eslint', 'uglify', 'flow-remove-type']
+
 removeConfigs.forEach(cfg => {
   delete rollupConfig[cfg]
 })
+
 var plugins = rollupConfig.plugins.slice()
 rollupConfig.plugins = []
+
 for (var i = 0, l = plugins.length; i < l; i++) {
   var plg = plugins[i]
   var isRemove = false
@@ -41,55 +45,64 @@ for (var i = 0, l = plugins.length; i < l; i++) {
   isRemove = true
 }
   })
-  if (!isRemove) {
-rollupConfig.plugins.push(plg)
-  }
+  if (!isRemove) { rollupConfig.plugins.push(plg) }
 }
+
 /**
  * rollup-plugin-flow-no-whiitespace cause fatial error.
  * use rollup-plugin-flow instead, since no soucemap needed, it's acceptable 
for extra whitespaces.
  */
 rollupConfig.plugins.splice(-2, 1, flow())
+
 rollupConfig.format = 'iife'
 rollupConfig.sourceMap = 'inline'
 rollupConfig.intro = `describe('ignore inject function from postcss', function 
() {
-  it('ignore', function () {
+it('ignore', function () {
 var shouldBe = 'test'
 var expected = __$styleInject('.body{}',shouldBe)
 expect(shouldBe).to.be.equal(expected)
   })
 })`
-
+
 module.exports = function (config) {
   config.set({
 frameworks: ['mocha', 'sinon-chai'],
 browsers: ['PhantomJS'],
-files: ['../html5/test/render/vue/utils/*.js',
-  // '../html5/test/render/vue/core/*.js',
-  // '../html5/test/render/vue/!(utils|core)/*.js'
+files: [
+  '../html5/test/render/vue/utils/*.js',
+  '../html5/test/render/vue/core/*.js',
+  '../html5/test/render/vue/!(utils|core)/*.js'
+],
+exclude: [
+  '../html5/test/render/vue/helper/*.js',
+  '../html5/test/render/vue/vender/**/*.js',
+  '../html5/test/render/vue/data/**/*.js'
 ],
-exclude: ['../html5/test/render/vue/helper/*.js', 
'../html5/test/render/vue/vender/**/*.js', 
'../html5/test/render/vue/data/**/*.js'],
-singleRun: false,
-// singleRun: true,
+
+// singleRun: false,
+singleRun: true,
+
 reporters: ['mocha', 'coverage'],
 coverageReporter: {
-  reporters: [{
-type: 'html',
-dir: absolute('../coverage'),
-subdir: 'vue-renderer'
-  }, {
-type: 'text-summary',
-dir: absolute('../coverage'),
-subdir: 'vue-renderer'
-  }]
+  reporters: [
+{ type: 'html', dir: absolute('../coverage'), subdir: 'vue-renderer' },
+{ type: 'text-summary', dir: absolute('../coverage'), subdir: 
'vue-renderer' }
+  ]
 },
-browserDisconnectTimeout: 1,
+browserDisconnectTimeout:1,
 preprocessors: {
   '../html5/test/**/*.js': ['rollup'],
   '../html5/test/**/!(components|examples|core)/*.js': ['rollup', 
'coverage']
 },
 rollupPreprocessor: rollupConfig,
-plugins: ['karma-coverage', 'karma-mocha', 'karma-mocha-reporter', 
'karma-phantomjs-launcher', 'karma-rollup-preprocessor', 'karma-sinon-chai'
+
+plugins: [
+  'karma-coverage',
+  'karma-mocha',
+  'karma-mocha-reporter',
+  'karma-phantomjs-launcher',
+  'karma-rollup-preprocessor',
+  'karma-sinon-chai'
   // 'karma-sourcemap-loader',
   // 'karma-webpack'
 ]



[42/50] incubator-weex git commit: * [html5] improve unit test case

2017-07-20 Thread danz
* [html5] improve unit test case


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

Branch: refs/heads/0.15-dev
Commit: 8527a0e5fc6423e941f4cab82f47b3c554f15830
Parents: a2e8b08
Author: erha19 
Authored: Tue Jul 18 15:16:34 2017 +0800
Committer: erha19 
Committed: Tue Jul 18 15:16:34 2017 +0800

--
 html5/test/render/vue/utils/style.js | 31 +++
 1 file changed, 15 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8527a0e5/html5/test/render/vue/utils/style.js
--
diff --git a/html5/test/render/vue/utils/style.js 
b/html5/test/render/vue/utils/style.js
index b968826..6bc1a78 100644
--- a/html5/test/render/vue/utils/style.js
+++ b/html5/test/render/vue/utils/style.js
@@ -66,7 +66,21 @@ describe('style', function () {
   })
 
   it('should normalize style object', () => {
-//
+const style = {
+  width: '200px',
+  flexDirection: 'row',
+  flex: 1,
+  fontSize: 12,
+  transform: 'translate3d(100px, 100px, 0)'
+}
+const res = normalizeStyle(style)
+console.log(res)
+expect(normalizeString('transform', 
style.transform)).to.equal(res.transform)
+expect(normalizeString('width', style.width)).to.equal(res.width)
+expect(normalizeString('flexDirection', 
style.flexDirection)).to.equal(res.flexDirection)
+expect(normalizeNumber('fontSize', style.fontSize)).to.equal(res.fontSize)
+// flex is in noUnitsNumberKeys array
+expect(style.flex).to.equal(res.flex)
   })
 
   it('should trim comment in style.', () => {
@@ -75,21 +89,6 @@ describe('style', function () {
 expect(trimComment(cssText)).to.equal(trimmed)
   })
 })
-describe('normalizeStyle', () => {
-  const style = {
-width: '200px',
-flexDirection: 'row',
-flex: 1,
-transform: 'translate3d(100px, 100px, 0)'
-  }
-  it('should switch to suitble case', () => {
-const res = normalizeStyle(style)
-expect(normalizeString('transform', 
style.transform)).to.equal(res.transform)
-expect(normalizeString('width', style.width)).to.equal(res.width)
-expect(normalizeString('flexDirection', 
style.flexDirection)).to.equal(res.flexDirection)
-expect(style.flex).to.equal(res.flex)
-  })
-})
 describe('autoPrefix', () => {
   const style = {
 width: '200px',



[23/50] incubator-weex git commit: * [html5] update webSocket formate

2017-07-20 Thread danz
* [html5] update webSocket formate


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

Branch: refs/heads/0.15-dev
Commit: 8bc53ca36f3b07033df3f6bcfbb53189327ccd39
Parents: cfcf769
Author: erha19 
Authored: Thu Jul 13 14:39:43 2017 +0800
Committer: erha19 
Committed: Thu Jul 13 14:39:43 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 31 +++--
 1 file changed, 13 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8bc53ca3/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index d5a3c0d..05a2fca 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -18,11 +18,10 @@
  */
 import websocket from '../../../../render/vue/modules/websocket/websocket'
 const TestUrl = 'ws://echo.websocket.org'
-/** @test {webSocket module} */
-describe('webSocket module', () => {
-
-  describe('extends Standard WebSocket API', () => {
-context('should inherit', () => {
+  /** @test {webSocket module} */
+describe('webSocket module', function () {
+  describe('extends Standard WebSocket API', function () {
+context('should inherit', function () {
   let ws = null
   before(() => {
 ws = websocket.WebSocket(TestUrl)
@@ -48,45 +47,41 @@ describe('webSocket module', () => {
 expect(websocket, 'should INSTANCE to be 
defined').to.have.property('INSTANCE')
   })
 })
-context('should forward native events', () => {
+context('should forward native events', function () {
   let ws = null
   before(() => {
-ws = websocket.WebSocket(TestUrl,'')
+ws = websocket.WebSocket(TestUrl, '')
   })
   after(() => {
 websocket.close()
   })
   it('open', function () {
-const open  = () => {
-}
+const open = () => {}
 websocket.onopen = open
 expect(ws.onopen).to.be.deep.equal(open)
   })
   it('close', function () {
-const close  = () => {
-}
+const close = () => {}
 websocket.onclose = close
 expect(ws.onclose).to.be.deep.equal(close)
   })
   it('error', function () {
-const error  = () => {
-}
+const error = () => {}
 websocket.onerror = error
 expect(ws.onerror).to.be.deep.equal(error)
   })
   it('message', function () {
-const message  = () => {
-}
+const message = () => {}
 websocket.onmessage = message
 expect(ws.onmessage).to.be.deep.equal(message)
   })
 })
-describe('should ignore', () => {
-  it('url is undefined', function (done) {
+describe('should ignore', function () {
+  it('url is undefined', (done) => {
 websocket.WebSocket('')
 expect(websocket.INSTANCE).to.be.null
   })
-  it('both url and protocol is defined', function (done) {
+  it('both url and protocol is defined', (done) => {
 websocket.WebSocket(TestUrl, 'ws')
 expect(websocket.INSTANCE).not.to.be.null
   })



[48/50] incubator-weex git commit: * [html5] improve validater/index.js unit test case

2017-07-20 Thread danz
* [html5] improve validater/index.js unit test case


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

Branch: refs/heads/0.15-dev
Commit: 5507e9f2e15082af28ade7ca846372beebeda8db
Parents: 3103148
Author: erha19 
Authored: Wed Jul 19 11:52:07 2017 +0800
Committer: erha19 
Committed: Wed Jul 19 11:52:07 2017 +0800

--
 html5/test/render/vue/validator/index.js | 28 ++-
 1 file changed, 23 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5507e9f2/html5/test/render/vue/validator/index.js
--
diff --git a/html5/test/render/vue/validator/index.js 
b/html5/test/render/vue/validator/index.js
index e525cf7..c5c657a 100644
--- a/html5/test/render/vue/validator/index.js
+++ b/html5/test/render/vue/validator/index.js
@@ -27,14 +27,32 @@ describe('validator', function () {
   })
 
   it('validateStyles', () => {
-const styles = {
+const textStyles = {
   position: 'absolute',
-  color: '#dd'
+  opacity: 1,
+  'font-style': 'normal',
+  'font-weight': 'bold',
+  'text-decoration': 'none',
+  'text-align': 'center',
+  'text-overflow': 'clip',
+  color: '#dd',
+  'font-size': '12px'
+}
+const divStyles = {
+  position: 'absolute',
+  'flex-direction': 'row',
+  'justify-content': 'center',
+  'align-items': 'center',
+  flex: 3,
+  width: '100px',
+  top: 0,
+  'border-top-width': '1px',
+  'border-top-style': 'solid',
+  'margin-left': '10px'
 }
-
 expect(validateStyles).to.be.a('function')
-expect(validateStyles('text', styles)).to.be.true
-expect(validateStyles('text', { opacity: 0.2 })).to.be.true
+expect(validateStyles('text', textStyles)).to.be.true
+expect(validateStyles('div', divStyles)).to.be.true
   })
 
   it('validateStyles (invalid)', () => {



[28/50] incubator-weex git commit: * [html5] imporve unit test case

2017-07-20 Thread danz
* [html5] imporve unit test case


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

Branch: refs/heads/0.15-dev
Commit: 89c66d4e4d0bf67cd0f50273cd9cfbdf946eb02e
Parents: 92bf1d3
Author: erha19 
Authored: Mon Jul 17 17:52:52 2017 +0800
Committer: erha19 
Committed: Mon Jul 17 17:52:52 2017 +0800

--
 html5/test/render/vue/utils/lazyload.js | 48 
 1 file changed, 27 insertions(+), 21 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/89c66d4e/html5/test/render/vue/utils/lazyload.js
--
diff --git a/html5/test/render/vue/utils/lazyload.js 
b/html5/test/render/vue/utils/lazyload.js
index 5f5eeaa..7fc25a7 100644
--- a/html5/test/render/vue/utils/lazyload.js
+++ b/html5/test/render/vue/utils/lazyload.js
@@ -19,49 +19,55 @@
 import * as lazyload from '../../../../render/vue/utils/lazyload'
 describe('utils', function () {
   describe('lazyload', function () {
-const validImage_transparent = 
'data:image/gif;base64,R0lGODlhAQABAIAAAP///yH5BAEALAABAAEAAAIBRAA7'
-const validImage_black = 
'data:image/gif;base64,R0lGODlhAQABAIUEBCwAAQABAAACAkQBADs='
+const validImageTransparent = 
'data:image/gif;base64,R0lGODlhAQABAIAAAP///yH5BAEALAABAAEAAAIBRAA7'
+const validImageBlack = 
'data:image/gif;base64,R0lGODlhAQABAIUEBCwAAQABAAACAkQBADs='
 const invalidImage = 'data:image/jpeg;base64,'
 before(() => {
-//   this.clock = sinon.useFakeTimers()
+  //   this.clock = sinon.useFakeTimers()
 })
 after(() => {
-//   this.clock.restore()
+  //   this.clock.restore()
 })
-it('fireLazyload', () => {
+it('fireLazyload', (done) => {
   const {
 fireLazyload
   } = lazyload
   const node = document.createElement('figure')
   const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
+  //  const IMG_REC_INDENT = 500
+  node.setAttribute('img-src', invalidImage)
+  node.setAttribute('img-placeholder', validImageBlack)
   node.style.height = '10px'
-  node.setAttribute('img-src', validImage_transparent)
-  node.setAttribute('img-placeholder', validImage_transparent)
-  document.body.appendChild(node)
+//  coverage branch if (item._src_loading)
+  node._src_loading = true
+//  coverage branch if (Array.isArray(el))
   fireLazyload([node])
-  setTimeout(() => {
-  console.log(node)
-  },200)
-  
expect(node.style.backgroundImage.replace(urlReg,'')).to.be.equal('url('+validImage_transparent+')')
-  node.setAttribute('img-src', validImage_black)
+  node._src_loading = false
   fireLazyload(node, true)
-  
expect(node.style.backgroundImage.replace(urlReg,'')).to.be.equal('url('+validImage_black+')')
-  document.body.removeChild(node)
+  setTimeout(() => {
+expect(node.style.backgroundImage.replace(urlReg, 
'')).to.be.equal('url(' + validImageBlack + ')')
+done()
+document.body.removeChild(node)
+  }, 100)
 })
-it('getThrottleLazyload', () => {
+it('getThrottleLazyload', (done) => {
   const {
 getThrottleLazyload
   } = lazyload
   const node = document.createElement('figure')
   const urlReg = /http(s)?:\/\/(\S+):(\d+)\//
-  const wait = 100,duration = wait + (wait > 25 ? wait : 25)
+  const wait = 100
   node.style.height = '10px'
-  node.setAttribute('img-src', validImage_transparent)
-  node.setAttribute('img-placeholder', validImage_transparent)
+  node.setAttribute('img-src', validImageTransparent)
+  node.setAttribute('img-placeholder', validImageBlack)
   document.body.appendChild(node)
+  window._weex_perf.renderTime.length = 3
   getThrottleLazyload(wait, node)()
-  document.body.removeChild(node)
-  
expect(node.style.backgroundImage.replace(urlReg,'')).to.be.equal('url('+validImage_transparent+')')
+  setTimeout(() => {
+expect(node.style.backgroundImage.replace(urlReg, 
'')).to.be.equal('url(' + validImageTransparent + ')')
+done()
+document.body.removeChild(node)
+  }, 100)
 })
   })
 })



[13/50] incubator-weex git commit: * [html5] merge open && close && message

2017-07-20 Thread danz
* [html5] merge open && close && message


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

Branch: refs/heads/0.15-dev
Commit: bca5422d4a7223803ef1252b542f33e1a0680be5
Parents: 57599bd
Author: erha19 
Authored: Tue Jul 11 15:51:01 2017 +0800
Committer: erha19 
Committed: Tue Jul 11 15:51:01 2017 +0800

--
 html5/test/render/vue/modules/websocket.js | 28 ++---
 1 file changed, 6 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/bca5422d/html5/test/render/vue/modules/websocket.js
--
diff --git a/html5/test/render/vue/modules/websocket.js 
b/html5/test/render/vue/modules/websocket.js
index fa6f757..1a18294 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -21,13 +21,6 @@ import websocket from 
'../../../../render/vue/modules/websocket/websocket'
 const TestUrl = 'ws://echo.websocket.org'
 /** @test {webSocket module} */
 describe('webSocket module', function () {
-  after(function (done) {
-const ws = new WebSocket(TestUrl)
-ws.addEventListener('open', function () {
-  ws.send('shutdown')
-  done()
-})
-  })
   describe('extends Standard WebSocket API', function () {
 context('should inherit', function () {
   const ws = websocket.WebSocket(TestUrl)
@@ -54,33 +47,24 @@ describe('webSocket module', function () {
 context('should forward native events', function () {
   let ws = null
   beforeEach(function () {
-ws = websocket.WebSocket(TestUrl)
+ws = websocket.WebSocket(TestUrl,'')
   })
   afterEach(function () {
 websocket.close()
   })
-  it('open', function (done) {
-websocket.onopen = function () {
-  done()
-}
-  })
-  it('close', function (done) {
+  it('open && message && close', function (done) {
 let closed = false
+const message = 'Test'
 ws.onclose = function () {
   if (!closed) {
-done()
 closed = true
   }
+  expect(closed).to.be.true
+  done()
 }
-websocket.onopen = function () {
-  websocket.close()
-}
-  })
-  it('message', function (done) {
-const message = 'Test'
 websocket.onmessage = function (e) {
   expect(e.data).to.be.equal(message)
-  done()
+  websocket.close()
 }
 websocket.onopen = function () {
   websocket.send(message)



[GitHub] incubator-weex pull request #524: 防止空指针错误

2017-07-20 Thread caojianfeng
GitHub user caojianfeng opened a pull request:

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

防止空指针错误






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

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

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

https://github.com/apache/incubator-weex/pull/524.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 #524


commit 464fc57fd19bf728d04d44c297d473beddd0ce47
Author: windcao 
Date:   2017-07-20T14:10:51Z

防止空指针错误




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #524: 防止iOS上图片重用相� �的空指针...

2017-07-20 Thread caojianfeng
Github user caojianfeng closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #516: + [ios] add tracing for weex in debug

2017-07-20 Thread acton393
Github user acton393 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/516#discussion_r128676803
  
--- Diff: ios/playground/WeexDemo/WXDemoViewController.m ---
@@ -146,6 +146,7 @@ - (void)render
 
 _instance.renderFinish = ^(UIView *view) {
  WXLogDebug(@"%@", @"Render Finish...");
+[WXTracingManager startTracing:weakSelf.instance.instanceId 
ref:nil parentRef:nil className:nil name:nil ph:WXTracingInstant 
fName:WXTRenderFinish parentId:nil];
--- End diff --

what's the 'ph', maybe it can be more clearly


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-weex pull request #516: + [ios] add tracing for weex in debug

2017-07-20 Thread acton393
Github user acton393 commented on a diff in the pull request:

https://github.com/apache/incubator-weex/pull/516#discussion_r128677053
  
--- Diff: ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h ---
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#import 
+#import "WXSDKInstance.h"
+
+#define WXTNetworkHanding  @"loadjs"
+#define WXTExecJS  @"execjs"
+#define WXTJSCall  @"jsCall"
+#define WXTRender  @"render"
+#define WXTRenderFinish  @"RenderFinish"
+
+#define WXTracingBegin @"B"
+#define WXTracingEnd   @"E"
+#define WXTracingDuration  @"D"
+#define WXTracingInstant  @"i"
+
+typedef enum : NSUInteger {
+// global
+WXTracingNetworkHanding = 0,
+WXTracingDataHanding,
+WXTracingRender
+} WXTracingTag;
+
+
+@interface WXTracingApi:NSObject
+
+@property (nonatomic, copy) NSString *name; //
+@property (nonatomic, copy) NSString *className; //
+@property (nonatomic, copy) NSString *method; //
+
+@end
+
+@interface WXTracing:NSObject
+
+@property (nonatomic, copy) NSString *ref; // compnonet id
+@property (nonatomic, copy) NSString *parentRef; // compnonet id
+@property (nonatomic, copy) NSString *className; // compnonet class name 
or module class name
+@property (nonatomic, copy) NSString *name; // register name
+@property (nonatomic, copy) NSString *ph; // phase
+@property (nonatomic) NSTimeInterval ts; // time
+@property (nonatomic) long long traceId;
+@property (nonatomic) NSTimeInterval duration;
+@property (nonatomic, copy) NSString *fName; // functionName
+@property (nonatomic, copy) NSString *iid; // instance id
+@property (nonatomic, copy) NSString *parentId;// parent event id
+-(NSDictionary *)dictionary;
+@end
+
+@interface WXTracingTask:NSObject
+
+@property (nonatomic, copy) NSString *iid;
+@property (nonatomic) long long counter;
+@property (nonatomic, copy)  NSString *tag;
+@property (nonatomic, copy)  NSString *bundleUrl;
+@property (nonatomic, strong) NSMutableArray *tracings;
+@property (nonatomic, copy) NSString *bundleJSType; //
+
+@end
+
+@interface WXTracingManager : NSObject
--- End diff --

may be more function description


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[1/2] incubator-weex git commit: * [android] parallax bugfix

2017-07-20 Thread zshshr
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 9764e25ea -> 92a1616b2


* [android] parallax bugfix


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

Branch: refs/heads/0.15-dev
Commit: 126306604543c201c3c557f0029364e76b3aa9c1
Parents: da56268
Author: zshshr 
Authored: Fri Jul 21 11:23:09 2017 +0800
Committer: zshshr 
Committed: Fri Jul 21 11:23:09 2017 +0800

--
 .../main/java/com/alibaba/weex/extend/component/WXParallax.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/12630660/android/playground/app/src/main/java/com/alibaba/weex/extend/component/WXParallax.java
--
diff --git 
a/android/playground/app/src/main/java/com/alibaba/weex/extend/component/WXParallax.java
 
b/android/playground/app/src/main/java/com/alibaba/weex/extend/component/WXParallax.java
index 7cceebc..cf248d3 100644
--- 
a/android/playground/app/src/main/java/com/alibaba/weex/extend/component/WXParallax.java
+++ 
b/android/playground/app/src/main/java/com/alibaba/weex/extend/component/WXParallax.java
@@ -22,7 +22,6 @@ import android.graphics.Color;
 import android.support.annotation.Nullable;
 import android.text.TextUtils;
 import android.view.View;
-import android.view.animation.AlphaAnimation;
 import android.view.animation.Animation;
 import android.view.animation.AnimationSet;
 import android.view.animation.RotateAnimation;
@@ -329,7 +328,8 @@ public class WXParallax extends WXDiv implements 
OnWXScrollListener, ICheckBindi
   if (fromOpacity == toOpacity) {
 return null;
   }
-  animation = new AlphaAnimation(fromOpacity, toOpacity);
+  setOpacity(toOpacity);
+//animation = new AlphaAnimation(fromOpacity, toOpacity);
 
   if (WXEnvironment.isApkDebugable()) {
 WXLogUtils.d("WXParallax", "opacity fromOpacity:" + fromOpacity + 
" toOpacity:" + toOpacity);



[2/2] incubator-weex git commit: Merge branch '0.15-dev' of http://gitlab.alibaba-inc.com/weex/weex into 0.15-dev

2017-07-20 Thread zshshr
Merge branch '0.15-dev' of http://gitlab.alibaba-inc.com/weex/weex into 0.15-dev

* '0.15-dev' of http://gitlab.alibaba-inc.com/weex/weex: (57 commits)
  * [android] fix illegal value in scroll event for list
  * [html5] update code formate
  * [html5] improve validater/index.js unit test case
  * [html5] fix copy right error
  * [html5] dispatch some event
  * [html5] fix collectStat test case
  * [html5] improve style unit test case
  * [html5] update function interface formate
  * [html5] improve unit test case
  * [html5] formate code style @notdanger
  * [html5] update style unit test case @notdanger
  * [html5] update to eslint formate @notdanger
  * [html5] improve style unit test case @notdanger
  * [html5] add copy right header@notdanger
  * [html5] fix component visible case
  * [html5] eslint formate for component
  * [html5] rebuild perf unit test code
  * [html5] improve component unit test case
  * [html5] improve lazyload unit test case
  * [html5] change code formate
  ...


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

Branch: refs/heads/0.15-dev
Commit: 92a1616b29468c3c8d2887e929749604c665f7c4
Parents: 1263066 9764e25
Author: zshshr 
Authored: Fri Jul 21 11:23:34 2017 +0800
Committer: zshshr 
Committed: Fri Jul 21 11:23:34 2017 +0800

--
 .../ui/component/list/BasicListComponent.java   |  66 ++---
 .../taobao/weex/ui/component/list/WXCell.java   |  10 -
 build/config.js |   1 +
 build/karma.vue.conf.js |   7 +
 html5/render/vue/modules/websocket/websocket.js |   1 +
 html5/render/vue/utils/event.js |   6 +-
 html5/render/vue/utils/func.js  | 136 +++--
 html5/render/vue/utils/index.js | 104 ---
 html5/render/vue/utils/perf.js  |   3 +-
 html5/test/render/vue/modules/websocket.js  |  90 +++---
 html5/test/render/vue/utils/component.js|  50 +++-
 html5/test/render/vue/utils/event.js|  78 ++
 html5/test/render/vue/utils/func.js | 278 +--
 html5/test/render/vue/utils/lazyload.js | 106 +++
 html5/test/render/vue/utils/perf.js | 132 +
 html5/test/render/vue/utils/style.js| 157 +--
 html5/test/render/vue/utils/type.js |  49 
 html5/test/render/vue/validator/index.js|  31 ++-
 18 files changed, 1011 insertions(+), 294 deletions(-)
--