[3/5] incubator-weex git commit: * [android] clean up csslayout code

2017-06-28 Thread sospartan
* [android] clean up csslayout 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/d44f9618
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d44f9618
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d44f9618

Branch: refs/heads/android-feature-yoga
Commit: d44f9618473ec50c201f0ecaa7063546a59c6fc4
Parents: 851248c
Author: sospartan 
Authored: Mon Jun 26 17:43:49 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 11:17:25 2017 +0800

--
 .../taobao/weex/dom/BasicEditTextDomObject.java |   3 -
 .../com/taobao/weex/dom/CSSAlignConvert.java|  61 --
 .../weex/dom/CSSFlexDirectionConvert.java   |  43 -
 .../com/taobao/weex/dom/CSSJustifyConvert.java  |  43 -
 .../taobao/weex/dom/CSSPositionTypeConvert.java |  36 -
 .../com/taobao/weex/dom/CSSWrapConvert.java |  37 -
 .../taobao/weex/dom/DOMActionContextImpl.java   |   1 -
 .../com/taobao/weex/dom/ImmutableDomObject.java |   4 -
 .../java/com/taobao/weex/dom/LayoutUtility.java | 147 +++
 .../com/taobao/weex/dom/ResultDomObject.java|   2 -
 .../main/java/com/taobao/weex/dom/Spacing.java  | 245 +
 .../com/taobao/weex/dom/WXCellDomObject.java|   5 -
 .../java/com/taobao/weex/dom/WXDomObject.java   |   5 +-
 .../taobao/weex/dom/WXRecyclerDomObject.java|   1 -
 .../main/java/com/taobao/weex/dom/WXStyle.java  |  14 +-
 .../com/taobao/weex/dom/WXSwitchDomObject.java  |   4 +-
 .../com/taobao/weex/dom/WXTextDomObject.java|  10 +-
 .../java/com/taobao/weex/dom/YogaUtility.java   | 136 ---
 .../weex/dom/action/UpdateStyleAction.java  |   2 +-
 .../java/com/taobao/weex/dom/flex/CSSAlign.java |  15 -
 .../com/taobao/weex/dom/flex/CSSConstants.java  |  16 -
 .../com/taobao/weex/dom/flex/CSSDirection.java  |  13 -
 .../taobao/weex/dom/flex/CSSFlexDirection.java  |  14 -
 .../com/taobao/weex/dom/flex/CSSJustify.java|  15 -
 .../com/taobao/weex/dom/flex/CSSLayout.java |  77 --
 .../taobao/weex/dom/flex/CSSLayoutContext.java  |  19 -
 .../java/com/taobao/weex/dom/flex/CSSNode.java  | 605 
 .../taobao/weex/dom/flex/CSSPositionType.java   |  12 -
 .../java/com/taobao/weex/dom/flex/CSSStyle.java | 124 ---
 .../java/com/taobao/weex/dom/flex/CSSWrap.java  |  12 -
 .../taobao/weex/dom/flex/CachedCSSLayout.java   |  19 -
 .../com/taobao/weex/dom/flex/FloatUtil.java |  19 -
 .../com/taobao/weex/dom/flex/LayoutEngine.java  | 935 ---
 .../com/taobao/weex/dom/flex/MeasureOutput.java |  16 -
 .../java/com/taobao/weex/dom/flex/Spacing.java  | 238 -
 .../taobao/weex/ui/RenderActionContextImpl.java |  15 -
 .../taobao/weex/ui/component/WXComponent.java   |   2 +-
 .../taobao/weex/ui/component/list/WXCell.java   |   1 -
 .../weex/ui/component/list/WXListComponent.java |   2 +-
 .../weex/ui/view/border/BorderCorner.java   |   4 +-
 .../weex/ui/view/border/BorderDrawable.java |  20 +-
 .../taobao/weex/ui/view/border/BorderEdge.java  |   2 +-
 .../taobao/weex/ui/view/border/BorderStyle.java |   2 +-
 .../taobao/weex/ui/view/border/BorderUtil.java  |   2 +-
 .../view/border/BorderWidthStyleColorType.java  |   2 +-
 .../java/com/taobao/weex/utils/WXDomUtils.java  |  21 +-
 .../java/com/taobao/weex/dom/TestDomObject.java |   1 -
 .../taobao/weex/dom/WXTextDomObjectTest.java|  10 +-
 .../com/taobao/weex/ui/component/WXDivTest.java |   6 +-
 .../taobao/weex/ui/component/WXTextTest.java|   2 +-
 .../weex/ui/view/border/BorderDrawableTest.java |   2 +-
 51 files changed, 439 insertions(+), 2603 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d44f9618/android/sdk/src/main/java/com/taobao/weex/dom/BasicEditTextDomObject.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/dom/BasicEditTextDomObject.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/BasicEditTextDomObject.java
index 73103c3..95ea40a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/BasicEditTextDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/BasicEditTextDomObject.java
@@ -25,9 +25,6 @@ import com.facebook.yoga.YogaMeasureMode;
 import com.facebook.yoga.YogaMeasureOutput;
 import com.facebook.yoga.YogaNode;
 import com.taobao.weex.common.Constants;
-import com.taobao.weex.dom.flex.CSSConstants;
-import com.taobao.weex.dom.flex.CSSNode;
-import com.taobao.weex.dom.flex.MeasureOutput;
 import com.taobao.weex.ui.component.WXText;
 import com.taobao.weex.utils.TypefaceUtil;
 import com.taobao.weex.utils.WXViewUtils;

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d44f9618/android/sdk/src/main/java/com/taobao/weex/dom/CSSAlignConvert.java

[2/5] incubator-weex git commit: * [android] clean up csslayout code

2017-06-28 Thread sospartan
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d44f9618/android/sdk/src/main/java/com/taobao/weex/dom/flex/LayoutEngine.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/dom/flex/LayoutEngine.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/flex/LayoutEngine.java
deleted file mode 100755
index b6d6cd3..000
--- a/android/sdk/src/main/java/com/taobao/weex/dom/flex/LayoutEngine.java
+++ /dev/null
@@ -1,935 +0,0 @@
-/**
- * Copyright (c) 2014, Facebook, Inc. All rights reserved.  This source 
code is licensed under
- * the BSD-cssstyle license found in the LICENSE file in the root directory of 
this source tree. An
- * additional grant of patent rights can be found in the PATENTS file in the 
same directory.
- */
-package com.taobao.weex.dom.flex;
-
-import static com.taobao.weex.dom.flex.CSSLayout.DIMENSION_HEIGHT;
-import static com.taobao.weex.dom.flex.CSSLayout.DIMENSION_WIDTH;
-import static com.taobao.weex.dom.flex.CSSLayout.POSITION_BOTTOM;
-import static com.taobao.weex.dom.flex.CSSLayout.POSITION_LEFT;
-import static com.taobao.weex.dom.flex.CSSLayout.POSITION_RIGHT;
-import static com.taobao.weex.dom.flex.CSSLayout.POSITION_TOP;
-
-/**
- * Calculates layouts based on CSS cssstyle. See {@link 
#layoutNode(CSSLayoutContext, CSSNode,
- * float, CSSDirection)}.
- */
-@Deprecated
-public class LayoutEngine {
-
-  private static final int CSS_FLEX_DIRECTION_COLUMN =
-  CSSFlexDirection.COLUMN.ordinal();
-  private static final int CSS_FLEX_DIRECTION_COLUMN_REVERSE =
-  CSSFlexDirection.COLUMN_REVERSE.ordinal();
-  private static final int CSS_FLEX_DIRECTION_ROW =
-  CSSFlexDirection.ROW.ordinal();
-  private static final int CSS_FLEX_DIRECTION_ROW_REVERSE =
-  CSSFlexDirection.ROW_REVERSE.ordinal();
-
-  private static final int CSS_POSITION_RELATIVE = 
CSSPositionType.RELATIVE.ordinal();
-  private static final int CSS_POSITION_ABSOLUTE = 
CSSPositionType.ABSOLUTE.ordinal();
-
-  private static final int[] leading = {
-  POSITION_TOP,
-  POSITION_BOTTOM,
-  POSITION_LEFT,
-  POSITION_RIGHT,
-  };
-
-  private static final int[] trailing = {
-  POSITION_BOTTOM,
-  POSITION_TOP,
-  POSITION_RIGHT,
-  POSITION_LEFT,
-  };
-
-  private static final int[] pos = {
-  POSITION_TOP,
-  POSITION_BOTTOM,
-  POSITION_LEFT,
-  POSITION_RIGHT,
-  };
-
-  private static final int[] dim = {
-  DIMENSION_HEIGHT,
-  DIMENSION_HEIGHT,
-  DIMENSION_WIDTH,
-  DIMENSION_WIDTH,
-  };
-
-  private static final int[] leadingSpacing = {
-  Spacing.TOP,
-  Spacing.BOTTOM,
-  Spacing.START,
-  Spacing.START
-  };
-
-  private static final int[] trailingSpacing = {
-  Spacing.BOTTOM,
-  Spacing.TOP,
-  Spacing.END,
-  Spacing.END
-  };
-
-  private static float boundAxis(CSSNode node, int axis, float value) {
-float min = CSSConstants.UNDEFINED;
-float max = CSSConstants.UNDEFINED;
-
-if (axis == CSS_FLEX_DIRECTION_COLUMN ||
-axis == CSS_FLEX_DIRECTION_COLUMN_REVERSE) {
-  min = node.cssstyle.minHeight;
-  max = node.cssstyle.maxHeight;
-} else if (axis == CSS_FLEX_DIRECTION_ROW ||
-   axis == CSS_FLEX_DIRECTION_ROW_REVERSE) {
-  min = node.cssstyle.minWidth;
-  max = node.cssstyle.maxWidth;
-}
-
-float boundValue = value;
-
-if (!Float.isNaN(max) && max >= 0.0 && boundValue > max) {
-  boundValue = max;
-}
-if (!Float.isNaN(min) && min >= 0.0 && boundValue < min) {
-  boundValue = min;
-}
-
-return boundValue;
-  }
-
-  private static void setDimensionFromStyle(CSSNode node, int axis) {
-// The parent already computed us a width or height. We just skip it
-if (!Float.isNaN(node.csslayout.dimensions[dim[axis]])) {
-  return;
-}
-// We only run if there's a width or height defined
-if (Float.isNaN(node.cssstyle.dimensions[dim[axis]]) ||
-node.cssstyle.dimensions[dim[axis]] <= 0.0) {
-  return;
-}
-
-// The dimensions can never be smaller than the padding and border
-float maxLayoutDimension = Math.max(
-boundAxis(node, axis, node.cssstyle.dimensions[dim[axis]]),
-node.cssstyle.padding.getWithFallback(leadingSpacing[axis], 
leading[axis]) +
-node.cssstyle.padding.getWithFallback(trailingSpacing[axis], 
trailing[axis]) +
-node.cssstyle.border.getWithFallback(leadingSpacing[axis], 
leading[axis]) +
-node.cssstyle.border.getWithFallback(trailingSpacing[axis], 
trailing[axis]));
-node.csslayout.dimensions[dim[axis]] = maxLayoutDimension;
-  }
-
-  private static float getRelativePosition(CSSNode node, int axis) {
-float lead = node.cssstyle.position[leading[axis]];
-if (!Float.isNaN(lead)) {
-  return lead;
-}
-
-float trailingPos = node.cssstyle.position[trailing[axis]];
-return Float.isNaN(trailingPos) ? 0 : -trailingPos;
-  

[1/5] incubator-weex git commit: * [android] Upgrade css-layout to yoga

2017-06-28 Thread sospartan
Repository: incubator-weex
Updated Branches:
  refs/heads/android-feature-yoga [created] b648441fe


* [android] Upgrade css-layout  to yoga

WXDomObject now inherit YogaNode, which is wrapper for object in jni.
minSDKVersion change to 15, the yoga library required. I’ve make a PR to 
yoga, and it accepted by yoga. So yoga will change minSDKVersion to 14. After 
that, we can change it back to 14 too.
Spacing from old css-layout library will stay, because the ImmutableDomObject 
use it.
Clean css-layout code will in another seperate commit.
Some new rule:
- 'Only leaf nodes with custom measure functionsshould manually mark themselves 
as dirty
- 'Cannot add child: Nodes with measure functions cannot have children'
Measure Function in Weex are modified according these rules.
The ‘clone’ method from WXDomObject is deprecated. Use a ‘asResult’ to 
return the data object need by components.


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

Branch: refs/heads/android-feature-yoga
Commit: 851248c6d97890833ee48cfb50fa4ab66b0b3bca
Parents: 9994583
Author: sospartan 
Authored: Wed Jun 21 19:06:31 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 11:17:24 2017 +0800

--
 android/build.gradle|   2 +-
 android/commons/build.gradle|   2 +-
 android/playground/app/build.gradle |   6 +-
 android/sdk/build.gradle|   3 +-
 .../main/java/com/taobao/weex/WXSDKEngine.java  |   4 +-
 .../taobao/weex/dom/BasicEditTextDomObject.java |  15 +-
 .../com/taobao/weex/dom/CSSAlignConvert.java|   1 +
 .../weex/dom/CSSFlexDirectionConvert.java   |   1 +
 .../com/taobao/weex/dom/CSSJustifyConvert.java  |   1 +
 .../com/taobao/weex/dom/CSSWrapConvert.java |   1 +
 .../taobao/weex/dom/DOMActionContextImpl.java   |  12 +-
 .../com/taobao/weex/dom/ResultDomObject.java| 157 ++
 .../com/taobao/weex/dom/WXCellDomObject.java|  40 +++--
 .../java/com/taobao/weex/dom/WXDomObject.java   | 159 +--
 .../taobao/weex/dom/WXRecyclerDomObject.java|   2 +-
 .../main/java/com/taobao/weex/dom/WXStyle.java  |  44 ++---
 .../com/taobao/weex/dom/WXSwitchDomObject.java  |  30 +++-
 .../com/taobao/weex/dom/WXTextDomObject.java|  29 ++--
 .../java/com/taobao/weex/dom/YogaUtility.java   | 136 
 .../taobao/weex/dom/action/AddEventAction.java  |   2 +-
 .../weex/dom/action/RemoveEventAction.java  |   2 +-
 .../java/com/taobao/weex/dom/flex/CSSAlign.java |   1 +
 .../com/taobao/weex/dom/flex/CSSConstants.java  |   1 +
 .../com/taobao/weex/dom/flex/CSSDirection.java  |   1 +
 .../taobao/weex/dom/flex/CSSFlexDirection.java  |   1 +
 .../com/taobao/weex/dom/flex/CSSJustify.java|   1 +
 .../com/taobao/weex/dom/flex/CSSLayout.java |   1 +
 .../taobao/weex/dom/flex/CSSLayoutContext.java  |   1 +
 .../java/com/taobao/weex/dom/flex/CSSNode.java  |   1 +
 .../taobao/weex/dom/flex/CSSPositionType.java   |   1 +
 .../java/com/taobao/weex/dom/flex/CSSStyle.java |   1 +
 .../java/com/taobao/weex/dom/flex/CSSWrap.java  |   1 +
 .../taobao/weex/dom/flex/CachedCSSLayout.java   |   1 +
 .../com/taobao/weex/dom/flex/FloatUtil.java |   1 +
 .../com/taobao/weex/dom/flex/LayoutEngine.java  |   1 +
 .../com/taobao/weex/dom/flex/MeasureOutput.java |   1 +
 .../java/com/taobao/weex/dom/flex/Spacing.java  |   1 +
 .../taobao/weex/ui/RenderActionContextImpl.java |   3 +-
 .../com/taobao/weex/ui/WXRenderManager.java |   3 +-
 .../taobao/weex/ui/component/WXComponent.java   |   6 +-
 .../java/com/taobao/weex/dom/TestDomObject.java |  10 +-
 .../taobao/weex/dom/WXTextDomObjectTest.java|   7 +-
 android/weex_debug/build.gradle |   2 +-
 43 files changed, 553 insertions(+), 143 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/851248c6/android/build.gradle
--
diff --git a/android/build.gradle b/android/build.gradle
index 7cc3c36..194b5af 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -35,11 +35,11 @@ subprojects {
 ext {
 compileSdkVersion=23
 buildToolsVersion="23.0.3"
-minSdkVersion=14
 appMinSdkVersion=15
 targetSdkVersion=23
 supportLibVersion="23.4.0"
 fastjsonLibVersion="1.1.46.android"
+yogaLibVersion="1.5.1"
 }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/851248c6/android/commons/build.gradle

[5/5] incubator-weex git commit: * [android] use setter from current class

2017-06-28 Thread sospartan
* [android] use setter from current class


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

Branch: refs/heads/android-feature-yoga
Commit: b648441fe15dd1c8a293d949ee394a494533a701
Parents: 92f2cb5
Author: sospartan 
Authored: Thu Jun 29 11:32:10 2017 +0800
Committer: sospartan 
Committed: Thu Jun 29 11:32:10 2017 +0800

--
 .../java/com/taobao/weex/dom/WXDomObject.java   | 64 ++--
 1 file changed, 32 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b648441f/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
index 0b889ba..3727575 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXDomObject.java
@@ -490,104 +490,104 @@ public class WXDomObject extends YogaNode implements 
Cloneable,ImmutableDomObjec
   for(Map.Entry item:stylesMap.entrySet()) {
 switch (item.getKey()) {
   case Constants.Name.ALIGN_ITEMS:
-super.setAlignItems(stylesMap.getAlignItems());
+setAlignItems(stylesMap.getAlignItems());
 break;
   case Constants.Name.ALIGN_SELF:
-super.setAlignSelf(stylesMap.getAlignSelf());
+setAlignSelf(stylesMap.getAlignSelf());
 break;
   case Constants.Name.FLEX:
-super.setFlex(stylesMap.getFlex());
+setFlex(stylesMap.getFlex());
 break;
   case Constants.Name.FLEX_DIRECTION:
-super.setFlexDirection(stylesMap.getFlexDirection());
+setFlexDirection(stylesMap.getFlexDirection());
 break;
   case Constants.Name.JUSTIFY_CONTENT:
-super.setJustifyContent(stylesMap.getJustifyContent());
+setJustifyContent(stylesMap.getJustifyContent());
 break;
   case Constants.Name.FLEX_WRAP:
-super.setWrap(stylesMap.getCSSWrap());
+setWrap(stylesMap.getCSSWrap());
 break;
   case Constants.Name.MIN_WIDTH:
-
super.setMinWidth(WXViewUtils.getRealPxByWidth(stylesMap.getMinWidth(vp),vp));
+
setMinWidth(WXViewUtils.getRealPxByWidth(stylesMap.getMinWidth(vp),vp));
 break;
   case Constants.Name.MIN_HEIGHT:
-
super.setMinHeight(WXViewUtils.getRealPxByWidth(stylesMap.getMinHeight(vp),vp));
+
setMinHeight(WXViewUtils.getRealPxByWidth(stylesMap.getMinHeight(vp),vp));
 break;
   case Constants.Name.MAX_WIDTH:
-
super.setMaxWidth(WXViewUtils.getRealPxByWidth(stylesMap.getMaxWidth(vp),vp));
+
setMaxWidth(WXViewUtils.getRealPxByWidth(stylesMap.getMaxWidth(vp),vp));
 break;
   case Constants.Name.MAX_HEIGHT:
-
super.setMaxHeight(WXViewUtils.getRealPxByWidth(stylesMap.getMaxHeight(vp),vp));
+
setMaxHeight(WXViewUtils.getRealPxByWidth(stylesMap.getMaxHeight(vp),vp));
 break;
   case Constants.Name.DEFAULT_HEIGHT:
   case Constants.Name.HEIGHT:
  TODO: 21/06/2017  support percent
-
super.setHeight(WXViewUtils.getRealPxByWidth(stylesMap.containsKey(Constants.Name.HEIGHT)?stylesMap.getHeight(vp):stylesMap.getDefaultHeight(),vp));
+
setHeight(WXViewUtils.getRealPxByWidth(stylesMap.containsKey(Constants.Name.HEIGHT)?stylesMap.getHeight(vp):stylesMap.getDefaultHeight(),vp));
 break;
   case Constants.Name.WIDTH:
   case Constants.Name.DEFAULT_WIDTH:
  TODO: 21/06/2017  support percent
-
super.setWidth(WXViewUtils.getRealPxByWidth(stylesMap.containsKey(Constants.Name.WIDTH)?stylesMap.getWidth(vp):stylesMap.getDefaultWidth(),vp));
+
setWidth(WXViewUtils.getRealPxByWidth(stylesMap.containsKey(Constants.Name.WIDTH)?stylesMap.getWidth(vp):stylesMap.getDefaultWidth(),vp));
 break;
   case Constants.Name.POSITION:
-super.setPositionType(stylesMap.getPosition());
+setPositionType(stylesMap.getPosition());
 break;
   case Constants.Name.LEFT:
-super.setPosition(YogaEdge.LEFT, 
WXViewUtils.getRealPxByWidth(stylesMap.getLeft(vp),vp));
+setPosition(YogaEdge.LEFT, 

[4/5] incubator-weex git commit: * [android] disable junit test

2017-06-28 Thread sospartan
* [android] disable junit test

New YogaNode use jni, in junit it's hard to mock with tiny modification. 
Disable temporarily, fix junit by another PR.


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

Branch: refs/heads/android-feature-yoga
Commit: 92f2cb54d9654f6252af370205b1ee68e070d450
Parents: d44f961
Author: sospartan 
Authored: Tue Jun 27 13:42:26 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 11:17:25 2017 +0800

--
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/92f2cb54/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index 4c4f91c..5e0a6d3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,7 +85,7 @@ script:
   - |
 if [[ $TEST_SUITE = "android" ]]; then
   cd android
-  ./gradlew clean assembleDebug :weex_sdk:testDebugUnitTest --info 
-PdisableCov=true -Dorg.gradle.daemon=true -Dorg.gradle.parallel=true 
-Dorg.gradle.jvmargs="-Xmx512m -XX:+HeapDumpOnOutOfMemoryError" 
-Dfile.encoding=UTF-8 &&
+  ./gradlew clean assembleDebug --info -PdisableCov=true 
-Dorg.gradle.daemon=true -Dorg.gradle.parallel=true 
-Dorg.gradle.jvmargs="-Xmx512m -XX:+HeapDumpOnOutOfMemoryError" 
-Dfile.encoding=UTF-8 &&
   cd $TRAVIS_BUILD_DIR
 fi
   - |



[GitHub] incubator-weex pull request #475: Corrected some english mistakes

2017-06-28 Thread clem109
Github user clem109 closed the pull request at:

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


---
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 #475: Corrected some english mistakes

2017-06-28 Thread clem109
Github user clem109 closed the pull request at:

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


---
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: * [test] Change test case of ImageQuality.

2017-06-28 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev e4ba34646 -> 7a2337ee8


* [test] Change test case of ImageQuality.


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

Branch: refs/heads/0.15-dev
Commit: 7a2337ee84ab82c908d95c8b1a5592782c1356b5
Parents: e4ba346
Author: YorkShen 
Authored: Wed Jun 28 17:15:22 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 17:15:22 2017 +0800

--
 .../java/com/taobao/weex/dom/WXAttrTest.java | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7a2337ee/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
--
diff --git a/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java 
b/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
index 17b38b8..c122418 100644
--- a/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/dom/WXAttrTest.java
@@ -18,11 +18,18 @@
  */
 package com.taobao.weex.dom;
 
+import static com.taobao.weex.common.Constants.Name.IMAGE_QUALITY;
+import static com.taobao.weex.common.Constants.Name.SRC;
+import static com.taobao.weex.common.Constants.Name.VALUE;
+import static com.taobao.weex.common.Constants.Value.HIGH;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+
 import com.taobao.weappplus_sdk.BuildConfig;
 import com.taobao.weex.common.Constants;
 import com.taobao.weex.common.WXImageSharpen;
 import com.taobao.weex.utils.WXViewUtils;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -30,14 +37,6 @@ import org.junit.runner.RunWith;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.annotation.Config;
 
-import static com.taobao.weex.common.Constants.Name.IMAGE_QUALITY;
-import static com.taobao.weex.common.Constants.Name.SRC;
-import static com.taobao.weex.common.Constants.Name.VALUE;
-import static com.taobao.weex.common.Constants.Value.HIGH;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
-
 @RunWith(RobolectricTestRunner.class)
 @Config(constants = BuildConfig.class)
 public class WXAttrTest {
@@ -65,7 +64,7 @@ public class WXAttrTest {
 
   @Test
   public void testGetImageQuality() throws Exception {
-assertEquals(WXImageQuality.LOW,attr.getImageQuality());
+assertEquals(WXImageQuality.AUTO,attr.getImageQuality());
 
 attr.put(IMAGE_QUALITY,HIGH);
 assertEquals(WXImageQuality.HIGH,attr.getImageQuality());



[GitHub] incubator-weex pull request #478: + [android] Change the default value of im...

2017-06-28 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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/5] incubator-weex git commit: * [android] Add RAW and None for imageQuality

2017-06-28 Thread kyork
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 571b735ac -> e4ba34646


* [android] Add RAW and None for imageQuality


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

Branch: refs/heads/0.15-dev
Commit: 2c248325d808cf3780c96a2d1dafbe2cd4a86038
Parents: b549a22
Author: YorkShen 
Authored: Wed Jun 14 17:39:42 2017 +0800
Committer: YorkShen 
Committed: Mon Jun 26 17:14:46 2017 +0800

--
 .../java/com/taobao/weex/common/Constants.java  |  1 +
 .../com/taobao/weex/common/WXImageStrategy.java |  9 -
 .../main/java/com/taobao/weex/dom/WXAttr.java   | 38 
 .../com/taobao/weex/dom/WXImageQuality.java |  6 +++-
 4 files changed, 28 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2c248325/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java 
b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index f683c99..3da084c 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -199,6 +199,7 @@ public class Constants {
 String LOW = "low";
 String NORMAL = "normal";
 String HIGH = "high";
+String RAW = "raw";
 String VISIBLE = "visible";
 String HIDDEN = "hidden";
 String TEXT = "text";

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2c248325/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java 
b/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
index 74d06b0..994c99b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/WXImageStrategy.java
@@ -24,9 +24,16 @@ import java.util.Map;
 
 public class WXImageStrategy {
 
+
   /**
-   * Whether to clip image. The default value is false.
+   * Never!
+   * Never!
+   * Never!
+   * Never use this flag, ImageView has done all the job of clipping!
+   * There is no method to read this flag any more.
+   * This field will be removed when it's appropriate.
*/
+  @Deprecated
   public boolean isClipping;
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2c248325/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
index 05e1626..d143dac 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
@@ -18,23 +18,23 @@
  */
 package com.taobao.weex.dom;
 
+import static java.lang.Boolean.parseBoolean;
+
 import android.support.annotation.NonNull;
 import android.support.v4.util.ArrayMap;
 import android.text.TextUtils;
-
 import com.taobao.weex.common.Constants;
+import com.taobao.weex.common.Constants.Name;
 import com.taobao.weex.common.WXImageSharpen;
 import com.taobao.weex.ui.view.listview.WXRecyclerView;
 import com.taobao.weex.utils.WXLogUtils;
 import com.taobao.weex.utils.WXUtils;
 import com.taobao.weex.utils.WXViewUtils;
-
 import java.util.Collection;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
-import static java.lang.Boolean.parseBoolean;
-
 /**
  * store value of component attribute
  *
@@ -95,27 +95,17 @@ public class WXAttr implements Map,Cloneable {
   }
 
   public WXImageQuality getImageQuality() {
-
-Object obj = get(Constants.Name.QUALITY);
-if (obj == null) {
-  obj = get(Constants.Name.IMAGE_QUALITY);
-}
-if (obj == null) {
-  return WXImageQuality.LOW;
-}
-WXImageQuality waImageQuality = WXImageQuality.LOW;
-String imageQuality = obj.toString();
-if (imageQuality.equals(Constants.Value.ORIGINAL)) {
-  waImageQuality = WXImageQuality.ORIGINAL;
-} else if (imageQuality.equals(Constants.Value.LOW)) {
-  waImageQuality = WXImageQuality.LOW;
-} else if (imageQuality.equals(Constants.Value.NORMAL)) {
-  waImageQuality = WXImageQuality.NORMAL;
-} else if (imageQuality.equals(Constants.Value.HIGH)) {
-  waImageQuality = WXImageQuality.HIGH;
+Object obj = 

[3/5] incubator-weex git commit: * [android] Change the default value of img quality.

2017-06-28 Thread kyork
* [android] Change the default value of img quality.


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

Branch: refs/heads/0.15-dev
Commit: 5b1cf3854b3bc4bea9ec7b4a3beca634073e38df
Parents: ddc9c3d
Author: YorkShen 
Authored: Wed Jun 28 15:26:48 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 15:26:48 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java | 2 +-
 android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b1cf385/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
index d143dac..31ac09b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXAttr.java
@@ -96,7 +96,7 @@ public class WXAttr implements Map,Cloneable {
 
   public WXImageQuality getImageQuality() {
 Object obj = containsKey(Name.QUALITY) ? get(Name.QUALITY) : 
get(Name.IMAGE_QUALITY);
-WXImageQuality imageQuality = WXImageQuality.NONE;
+WXImageQuality imageQuality = WXImageQuality.AUTO;
 String value;
 if (obj != null && !TextUtils.isEmpty(value = obj.toString())) {
   try {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b1cf385/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
index e580605..6cce8f4 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
@@ -28,5 +28,5 @@ public enum WXImageQuality {
 
   HIGH,
 
-  NONE
+  AUTO
 }



[5/5] incubator-weex git commit: Merge branch 'android-imageQuality' of https://github.com/YorkShen/incubator-weex into 0.15-dev

2017-06-28 Thread kyork
Merge branch 'android-imageQuality' of 
https://github.com/YorkShen/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/e4ba3464
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e4ba3464
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e4ba3464

Branch: refs/heads/0.15-dev
Commit: e4ba34646eba77aad46d3d6e0fffb0602ea01d41
Parents: 571b735 df3f903
Author: YorkShen 
Authored: Wed Jun 28 16:47:34 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 16:47:34 2017 +0800

--
 .../com/taobao/weex/common/WXImageStrategy.java |  9 -
 .../main/java/com/taobao/weex/dom/WXAttr.java   | 38 
 .../com/taobao/weex/dom/WXImageQuality.java |  4 ++-
 3 files changed, 25 insertions(+), 26 deletions(-)
--




[2/5] incubator-weex git commit: - [android] Remove Raw from imageQuality

2017-06-28 Thread kyork
- [android] Remove Raw from imageQuality


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

Branch: refs/heads/0.15-dev
Commit: ddc9c3d18dcf4593e8e4eab76084ed9078229c0a
Parents: 2c24832
Author: YorkShen 
Authored: Tue Jun 27 15:57:20 2017 +0800
Committer: YorkShen 
Committed: Tue Jun 27 15:57:20 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java | 2 --
 1 file changed, 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ddc9c3d1/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java 
b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
index 488f84a..e580605 100644
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXImageQuality.java
@@ -28,7 +28,5 @@ public enum WXImageQuality {
 
   HIGH,
 
-  RAW,
-
   NONE
 }



[4/5] incubator-weex git commit: * [android] Remove raw

2017-06-28 Thread kyork
* [android] Remove raw


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

Branch: refs/heads/0.15-dev
Commit: df3f903417386cb1ec31ccaa42632e211625db26
Parents: 5b1cf38
Author: YorkShen 
Authored: Wed Jun 28 15:32:44 2017 +0800
Committer: YorkShen 
Committed: Wed Jun 28 15:32:44 2017 +0800

--
 android/sdk/src/main/java/com/taobao/weex/common/Constants.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/df3f9034/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java 
b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
index 3da084c..f683c99 100644
--- a/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
+++ b/android/sdk/src/main/java/com/taobao/weex/common/Constants.java
@@ -199,7 +199,6 @@ public class Constants {
 String LOW = "low";
 String NORMAL = "normal";
 String HIGH = "high";
-String RAW = "raw";
 String VISIBLE = "visible";
 String HIDDEN = "hidden";
 String TEXT = "text";



[31/37] incubator-weex git commit: Merge branch 'doc-feature-docsearch' of https://github.com/parryworld/incubator-weex into dev

2017-06-28 Thread sospartan
Merge branch 'doc-feature-docsearch' of 
https://github.com/parryworld/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/ad732d2a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/ad732d2a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/ad732d2a

Branch: refs/heads/0.15-dev
Commit: ad732d2a9526b1c9bc451bf432bee4cb1c0ebd17
Parents: b134be2 5b4c93e
Author: tancy 
Authored: Tue Jun 27 15:08:54 2017 +0800
Committer: tancy 
Committed: Tue Jun 27 15:08:54 2017 +0800

--
 doc/_config.yml |  6 +++
 doc/_config_cn.yml  |  6 +++
 doc/themes/weex/layout/_partial/head.ejs|  3 ++
 doc/themes/weex/layout/layout.ejs   | 15 +++
 doc/themes/weex/source/css/docsearch.min.css|  2 +
 .../weex/source/css/partial/search-form.scss| 44 +++-
 doc/themes/weex/source/js/docsearch.min.js  |  7 
 7 files changed, 82 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ad732d2a/doc/_config.yml
--

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/ad732d2a/doc/_config_cn.yml
--



[28/37] incubator-weex git commit: [weex-vue-render] add some features including:

2017-06-28 Thread sospartan
[weex-vue-render] add some features including:

+ [html5] add 'loadmore' event to horizontal scroller.

* [html5] fix slider's autoplay.

+ [html5] release v0.11.51 @notdanger.

* [html5] fix slider auto-play

+ [html5] support pseudo class.


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

Branch: refs/heads/0.15-dev
Commit: 456775451532bba975612e0a8bab08067ced502c
Parents: 06232f2
Author: MrRaindrop 
Authored: Fri Jun 23 14:52:50 2017 +0800
Committer: MrRaindrop 
Committed: Mon Jun 26 18:00:16 2017 +0800

--
 html5/render/vue/README.md  | 19 +-
 .../render/vue/components/slider/slideMixin.js  | 24 +++--
 html5/render/vue/core/style.js  | 31 
 html5/render/vue/mixins/scrollable.js   | 38 
 html5/render/vue/utils/style.js | 28 +++
 package.json|  2 +-
 packages/weex-vue-render/package.json   |  2 +-
 7 files changed, 108 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/45677545/html5/render/vue/README.md
--
diff --git a/html5/render/vue/README.md b/html5/render/vue/README.md
index e2f39d0..f0d3ba8 100644
--- a/html5/render/vue/README.md
+++ b/html5/render/vue/README.md
@@ -27,7 +27,24 @@ If you perfer cdn way, and use script tag to import a script 
link, just import i
 
 ## use vue-loader to bundle .vue file
 
-**NOTE: ** after `v0.11.3` there's no need to add `$processStyle` and 
`autoprefixer` in your vue-loader config anymore. The runtime render will take 
care of it once for all.
+NOTE: you should inject `$processStyle` to preprocess vnode's style in 
vue-loader's postTransformNode hook.
+
+```javascript
+vue: {
+  /**
+* important! should use postTransformNode to add $processStyle for
+* inline style prefixing.
+*/
+  compilerModules: [
+{
+  postTransformNode: el => {
+el.staticStyle = `$processStyle(${el.staticStyle})`
+el.styleBinding = `$processStyle(${el.styleBinding})`
+  }
+}
+  ],
+}
+```
 
 ## component -> dom map
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/45677545/html5/render/vue/components/slider/slideMixin.js
--
diff --git a/html5/render/vue/components/slider/slideMixin.js 
b/html5/render/vue/components/slider/slideMixin.js
index da2c848..73960e5 100644
--- a/html5/render/vue/components/slider/slideMixin.js
+++ b/html5/render/vue/components/slider/slideMixin.js
@@ -48,7 +48,6 @@ export default {
   },
 
   updated () {
-this._startAutoPlay()
 const children = this.$children
 const len = children && children.length
 if (children && len > 0) {
@@ -69,7 +68,6 @@ export default {
 
   mounted () {
 this._getWrapperSize()
-this._startAutoPlay()
 this._slideTo(this.currentIndex)
 fireLazyload(this.$el, true)
   },
@@ -79,8 +77,8 @@ export default {
   const wrapper = this.$refs.wrapper
   if (wrapper) {
 const rect = wrapper.getBoundingClientRect()
-this.wrapperWidth = rect.width
-this.wrapperHeight = rect.height
+this._wrapperWidth = rect.width
+this._wrapperHeight = rect.height
   }
 },
 
@@ -198,7 +196,7 @@ export default {
 const match = translate && 
translate.match(/translate[^(]+\(([+-\d.]+)/)
 const innerX = match && match[1] || 0
 const dist = innerX - this.innerOffset
-this.innerOffset += step * this.wrapperWidth
+this.innerOffset += step * this._wrapperWidth
 // transform the whole slides group.
 inner.style.webkitTransition = `-webkit-transform ${TRANSITION_TIME / 
1000}s ease-in-out`
 inner.style.transition = `transform ${TRANSITION_TIME / 1000}s 
ease-in-out`
@@ -341,7 +339,7 @@ export default {
   }
 
   node._inShow = true
-  const translateX = index * this.wrapperWidth - this.innerOffset
+  const translateX = index * this._wrapperWidth - this.innerOffset
   addTransform(node, {
 translate: `translate3d(${translateX}px, 0px, 0px)`
   })
@@ -439,7 +437,7 @@ export default {
   origNode._inShow = true
   const transObj = getTransformObj(clone)
   transObj.translate = transObj.translate.replace(/[+-\d.]+[pw]x/, ($0) => 
{
-return pos * this.wrapperWidth - this.innerOffset + 'px'
+return pos * this._wrapperWidth - this.innerOffset + 'px'
   })
   

[34/37] incubator-weex git commit: Merge branch '0.14-dev' of gitlab.alibaba-inc.com:weex/weex into 0.14-dev

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of gitlab.alibaba-inc.com:weex/weex into 0.14-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/24fbad2f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/24fbad2f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/24fbad2f

Branch: refs/heads/0.15-dev
Commit: 24fbad2f0e0735427c1cb2bf87f68f2a50c094ad
Parents: 5d75a6f 25a6dbd
Author: sospartan 
Authored: Wed Jun 28 10:24:00 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 10:24:00 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so  | Bin 7575352 -> 7570504 bytes
 android/sdk/libs/x86/libweexjsc.so  | Bin 12130116 -> 12121924 
bytes
 .../ui/component/list/BasicListComponent.java   |  16 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)
--




[33/37] incubator-weex git commit: Merge branch '0.14-dev-component-observer' into 0.14-dev

2017-06-28 Thread sospartan
Merge branch '0.14-dev-component-observer' into 0.14-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/5d75a6f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5d75a6f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5d75a6f2

Branch: refs/heads/0.15-dev
Commit: 5d75a6f237552b227934e18b0da23d51a7b688c6
Parents: 9e57917 a891e2d
Author: sospartan 
Authored: Wed Jun 28 10:23:38 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 10:23:38 2017 +0800

--
 .../java/com/taobao/weex/ComponentObserver.java | 50 
 .../java/com/taobao/weex/WXSDKInstance.java | 16 +++
 .../taobao/weex/ui/component/WXComponent.java   | 14 ++
 3 files changed, 80 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d75a6f2/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --cc android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 5533843,47b7f30..a8d8a60
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@@ -141,8 -141,9 +141,9 @@@ public class WXSDKInstance implements I
  
private LayoutFinishListener mLayoutFinishListener;
  
 +  private boolean mCurrentGround = false;
+   private ComponentObserver mComponentObserver;
  
 -
/**
 * If anchor is created manually(etc. define a layout xml resource ),
 * be aware do not add it to twice when {@link 
IWXRenderListener#onViewCreated(WXSDKInstance, View)}.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d75a6f2/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--



[21/37] incubator-weex git commit: + [ios] macaca update server

2017-06-28 Thread sospartan
+ [ios] macaca update server


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

Branch: refs/heads/0.15-dev
Commit: 91e6294517a110537018748f7e7910f6acde2b8a
Parents: 8ddc04b
Author: 齐山 
Authored: Sun Jun 25 14:25:31 2017 +0800
Committer: 齐山 
Committed: Sun Jun 25 14:25:31 2017 +0800

--
 test/serve.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/91e62945/test/serve.sh
--
diff --git a/test/serve.sh b/test/serve.sh
index eb2a156..a5485e2 100755
--- a/test/serve.sh
+++ b/test/serve.sh
@@ -1,4 +1,5 @@
 #!/bin/bash -eu
 npm run build:vue
 npm run build:ci &
-npm run serve:no-port -- -p $serport
\ No newline at end of file
+port="${serport:-12581}"
+npm run serve:no-port -- -p $port
\ No newline at end of file



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

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/erha19/incubator-weex into 
0.14-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/cbc2e2d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/cbc2e2d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/cbc2e2d8

Branch: refs/heads/0.15-dev
Commit: cbc2e2d89b5ecd4882968c9f4e1af252f122cdac
Parents: 43adf40 96cf5de
Author: MrRaindrop 
Authored: Mon Jun 26 17:13:24 2017 +0800
Committer: MrRaindrop 
Committed: Mon Jun 26 17:13:24 2017 +0800

--
 examples/vue/index.vue  |   1 +
 examples/vue/modules/websocket.vue  | 116 +++
 html5/render/vue/env/weex.js|   3 +
 html5/render/vue/modules/index.js   |   2 +
 html5/render/vue/modules/websocket/index.js |  26 +
 html5/render/vue/modules/websocket/websocket.js |  60 ++
 html5/test/render/vue/modules/websocket.js  |  11 ++
 7 files changed, 219 insertions(+)
--




[32/37] incubator-weex git commit: * [android] add observer for component

2017-06-28 Thread sospartan
* [android] add observer 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/a891e2d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a891e2d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a891e2d4

Branch: refs/heads/0.15-dev
Commit: a891e2d4696444e6cca23a051f611743a28b5e0b
Parents: d26c46f
Author: sospartan 
Authored: Wed Jun 14 17:04:28 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 10:18:15 2017 +0800

--
 .../java/com/taobao/weex/ComponentObserver.java | 50 
 .../java/com/taobao/weex/WXSDKInstance.java | 17 +++
 .../taobao/weex/ui/component/WXComponent.java   | 14 ++
 3 files changed, 81 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a891e2d4/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java 
b/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java
new file mode 100644
index 000..a2bcd09
--- /dev/null
+++ b/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java
@@ -0,0 +1,50 @@
+/**
+ * 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.
+ */
+package com.taobao.weex;
+
+import android.view.View;
+
+import com.taobao.weex.ui.component.WXComponent;
+
+/**
+ * Created by sospartan on 14/06/2017.
+ */
+
+public interface ComponentObserver {
+
+  /**
+   * Called after component is create.
+   * Notice: View is not created at this moment.
+   * @param component
+   */
+  void onCreate(WXComponent component);
+
+  /**
+   * Called before component destroy.
+   * @param component
+   */
+  void onPreDestory(WXComponent component);
+
+  /**
+   * Called when component's view is created
+   * @param component
+   * @param view
+   */
+  void onViewCreated(WXComponent component,View view);
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a891e2d4/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 2db6fb3..47b7f30 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -141,6 +141,8 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 
   private LayoutFinishListener mLayoutFinishListener;
 
+  private ComponentObserver mComponentObserver;
+
 
   /**
* If anchor is created manually(etc. define a layout xml resource ),
@@ -275,6 +277,21 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 mUserTrackAdapter=WXSDKManager.getInstance().getIWXUserTrackAdapter();
   }
 
+  /**
+   * Set a Observer for component.
+   * This observer will be called in each component, should not doing
+   * anything will impact render performance.
+   *
+   * @param observer
+   */
+  public void setComponentObserver(ComponentObserver observer){
+mComponentObserver = observer;
+  }
+
+  public ComponentObserver getComponentObserver(){
+return mComponentObserver;
+  }
+
   public NativeInvokeHelper getNativeInvokeHelper() {
 return mNativeInvokeHelper;
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a891e2d4/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index c0d7c7a..54f822b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -41,6 +41,7 

[12/37] incubator-weex git commit: + [html5] add unit test for webSocket module

2017-06-28 Thread sospartan
+ [html5] add unit test for webSocket module


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

Branch: refs/heads/0.15-dev
Commit: 323b836731f4d66a0b5836aa4ab82bc3cfa43b0a
Parents: dfc5d31
Author: erha19 
Authored: Fri Jun 23 16:23:24 2017 +0800
Committer: erha19 
Committed: Fri Jun 23 16:23:24 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/323b8367/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
new file mode 100644
index 000..28b5958
--- /dev/null
+++ b/html5/test/render/vue/modules/websocket.js
@@ -0,0 +1,11 @@
+import websocket from '../../../../render/vue/modules/websocket/websocket';
+describe('webSocket module', function() {
+  afterEach(function(done) {
+// Cleanup
+websocket.close();
+done();
+  });
+  it('should have connection lifecycle constants defined on the instance', () 
=> {
+
expect(websocket.WebSocket('wss://echo.websocket.org').CONNECTING).to.be.equal(0);
+  });
+});



[24/37] incubator-weex git commit: + [ios] add comment

2017-06-28 Thread sospartan
+ [ios] add comment

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

Branch: refs/heads/0.15-dev
Commit: 24474e2b09026c4b534527598fd21fccddef032e
Parents: 7ade969
Author: 齐山 
Authored: Mon Jun 26 15:44:54 2017 +0800
Committer: GitHub 
Committed: Mon Jun 26 15:44:54 2017 +0800

--
 test/scripts/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/24474e2b/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 6e1b581..fd9fa43 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -194,7 +194,7 @@ module.exports = {
 return driver.status()
 else{
 driver._isInit = true;
-return driver.initDriver().sleep(2)
+return driver.initDriver().sleep(2) //ios cannot detect at once
 }
 },
 quit:function(driver){



[10/37] incubator-weex git commit: * [ios] update doc about dom module

2017-06-28 Thread sospartan
* [ios] update doc about dom module


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

Branch: refs/heads/0.15-dev
Commit: b134be2c06d34107b79210e33c25b1a2a1a90664
Parents: 3556b9c
Author: acton393 
Authored: Fri Jun 23 11:32:17 2017 +0800
Committer: acton393 
Committed: Fri Jun 23 11:32:17 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b134be2c/doc/source/cn/references/modules/dom.md
--
diff --git a/doc/source/cn/references/modules/dom.md 
b/doc/source/cn/references/modules/dom.md
index d689606..9f0297c 100644
--- a/doc/source/cn/references/modules/dom.md
+++ b/doc/source/cn/references/modules/dom.md
@@ -274,7 +274,7 @@ domModule.addRule('fontFace', {
 
 ```
 
-[try it](http://dotwe.org/vue/d96b6f89aadd1d628111c16a30e80482)
+[try it](http://dotwe.org/vue/6ece072d0abd9a9e5718eb26bd5719f8)
 
 ## 其他
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/b134be2c/doc/source/references/modules/dom.md
--
diff --git a/doc/source/references/modules/dom.md 
b/doc/source/references/modules/dom.md
index fe39bc1..5cb354f 100644
--- a/doc/source/references/modules/dom.md
+++ b/doc/source/references/modules/dom.md
@@ -271,6 +271,6 @@ domModule.addRule('fontFace', {
 });
 
 ```
-[try it](http://dotwe.org/vue/d96b6f89aadd1d628111c16a30e80482)
+[try it](http://dotwe.org/vue/6ece072d0abd9a9e5718eb26bd5719f8)
 
 



[15/37] incubator-weex git commit: + [example] macaca modify

2017-06-28 Thread sospartan
+ [example] macaca modify


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

Branch: refs/heads/0.15-dev
Commit: 41cd8dcc53b89401fa15434a83474ed2c080d993
Parents: 49ba77f
Author: 齐山 
Authored: Sat Jun 24 18:21:03 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 18:21:03 2017 +0800

--
 test/scripts/util.js | 2 +-
 test/serve.sh| 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41cd8dcc/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 50bf9ee..6e1b581 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -194,7 +194,7 @@ module.exports = {
 return driver.status()
 else{
 driver._isInit = true;
-return driver.initDriver()
+return driver.initDriver().sleep(2)
 }
 },
 quit:function(driver){

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41cd8dcc/test/serve.sh
--
diff --git a/test/serve.sh b/test/serve.sh
index a5485e2..eb2a156 100755
--- a/test/serve.sh
+++ b/test/serve.sh
@@ -1,5 +1,4 @@
 #!/bin/bash -eu
 npm run build:vue
 npm run build:ci &
-port="${serport:-12581}"
-npm run serve:no-port -- -p $port
\ No newline at end of file
+npm run serve:no-port -- -p $serport
\ No newline at end of file



[14/37] incubator-weex git commit: + [ios] add dealloc for sliderview

2017-06-28 Thread sospartan
+ [ios] add dealloc for sliderview


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

Branch: refs/heads/0.15-dev
Commit: 43adf4012b235cd6b38727b25e790aa260106568
Parents: 49ba77f
Author: 齐山 
Authored: Fri Jun 23 17:57:10 2017 +0800
Committer: 齐山 
Committed: Fri Jun 23 17:57:10 2017 +0800

--
 ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43adf401/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
--
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m 
b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
index 690c709..7c7fbd0 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
@@ -80,6 +80,13 @@ typedef NS_ENUM(NSInteger, Direction) {
 return self;
 }
 
+- (void)dealloc
+{
+if (_scrollView) {
+_scrollView.delegate = nil;
+}
+}
+
 - (void)layoutSubviews
 {
 [super layoutSubviews];



[07/37] incubator-weex git commit: - [html5] remove hasOwnproperty key on ws

2017-06-28 Thread sospartan
- [html5] remove hasOwnproperty key on ws


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

Branch: refs/heads/0.15-dev
Commit: 5d3120288ed5bbca344401fae6d32d4a1eefa3bd
Parents: 5c86cf3
Author: erha19 
Authored: Thu Jun 22 17:15:48 2017 +0800
Committer: erha19 
Committed: Thu Jun 22 17:15:48 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d312028/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 c5cfa26..f52aa12 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -26,9 +26,6 @@ export default (function () {
   let instance = null
   const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
   const ws = {
-hasOwnProperty: function (e) {
-  return true
-},
 WebSocket: function (url, protocol) {
   if (!url) {
 return



[16/37] incubator-weex git commit: + [example] update maraca

2017-06-28 Thread sospartan
+ [example] update maraca


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

Branch: refs/heads/0.15-dev
Commit: f4b0b46fa8ef470f8d02044c4049a91fb5ccdc03
Parents: 41cd8dc
Author: 齐山 
Authored: Sat Jun 24 18:59:43 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 18:59:43 2017 +0800

--
 test/scripts/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4b0b46f/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 6e1b581..74d966e 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -125,7 +125,7 @@ module.exports = {
 return ( isRunInCI ? 60 : 10 ) * 60 * 1000;
 },
 getGETActionWaitTimeMills:function(){
-return (isRunInCI ? 120 : 5 ) * 1000;
+return (isRunInCI ? 5 : 1 ) * 1000;
 },
 diffImage, 
 createDriver:function(wd){



[01/37] incubator-weex git commit: + [html5] support placeholder-color for input. @notdanger.

2017-06-28 Thread sospartan
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 4a33ccdb6 -> 571b735ac


+ [html5] support placeholder-color for input. @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/06232f2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/06232f2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/06232f2b

Branch: refs/heads/0.15-dev
Commit: 06232f2bcdd59ffa50e7e24354b4b12e89569acd
Parents: 76ab14b
Author: MrRaindrop 
Authored: Thu Jun 22 12:05:12 2017 +0800
Committer: MrRaindrop 
Committed: Thu Jun 22 12:09:01 2017 +0800

--
 html5/render/vue/components/input.js| 52 
 .../components/scrollable/loading-indicator.js  | 11 +
 html5/render/vue/utils/style.js | 16 ++
 3 files changed, 61 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/06232f2b/html5/render/vue/components/input.js
--
diff --git a/html5/render/vue/components/input.js 
b/html5/render/vue/components/input.js
index cc8059e..1454988 100644
--- a/html5/render/vue/components/input.js
+++ b/html5/render/vue/components/input.js
@@ -23,9 +23,13 @@
  */
 import { extractComponentStyle, createEventMap } from '../core'
 import { inputCommon } from '../mixins'
-import { extend, mapFormEvents } from '../utils'
+import { extend, mapFormEvents, appendCss } from '../utils'
 // import { validateStyles } from '../validator'
 
+const ID_PREFIX_PLACEHOLDER_COLOR = 'wipt_plc_'
+const ID_PREFIX_INPUT = 'wipt_'
+let idCount = 0
+
 const _css = `
 .weex-input, .weex-textarea {
   font-size: 0.426667rem;
@@ -35,6 +39,35 @@ const _css = `
 }
 `
 
+function setPlaceholderColor (inputVm, placeholderColor) {
+  if (!placeholderColor) {
+return
+  }
+  const vendors = [
+'::-webkit-input-placeholder',
+':-moz-placeholder',
+'::-moz-placeholder',
+':-ms-input-placeholder',
+':placeholder-shown'
+  ]
+  const id = inputVm._id
+  appendCss(
+vendors.map(function (vendor, idx) {
+  return 
`#${ID_PREFIX_INPUT}${id}${vendors[idx]}{color:${placeholderColor};}`
+}).join(''),
+`${ID_PREFIX_PLACEHOLDER_COLOR}${id}`,
+true)
+}
+
+function processStyle (vm) {
+  const styles = extractComponentStyle(vm)
+  const phColor = styles.placeholderColor
+  if (phColor) {
+setPlaceholderColor(vm, phColor)
+  }
+  return styles
+}
+
 export default {
   mixins: [inputCommon],
   props: {
@@ -43,10 +76,11 @@ export default {
   default: 'text',
   validator (value) {
 return [
-  'email', 'number', 'password', 'search', 'tel', 'text', 'url'
+  'email', 'number', 'password', 'search', 'tel', 'text', 'url', 
'date',
+  'datetime', 'time'
   // unsupported type:
-  // button, checkbox, color, date, datetime, file, hidden, image,
-  // month, radio, range, reset, submit, time, week,
+  // button, checkbox, color, file, hidden, image,
+  // month, radio, range, reset, submit, week,
 ].indexOf(value) !== -1
   }
 },
@@ -65,15 +99,15 @@ export default {
   },
 
   render (createElement) {
-/* istanbul ignore next */
-// if (process.env.NODE_ENV === 'development') {
-//   validateStyles('input', this.$vnode.data && 
this.$vnode.data.staticStyle)
-// }
+if (!this._id) {
+  this._id = idCount++
+}
 const events = extend(createEventMap(this), mapFormEvents(this))
 this._renderHook()
 return createElement('html:input', {
   attrs: {
 'weex-type': 'input',
+id: `${ID_PREFIX_INPUT}${this._id}`,
 type: this.type,
 value: this.value,
 disabled: (this.disabled !== 'false' && this.disabled !== false),
@@ -87,7 +121,7 @@ export default {
   },
   on: this.createKeyboardEvent(events),
   staticClass: 'weex-input weex-el',
-  staticStyle: extractComponentStyle(this)
+  staticStyle: processStyle(this)
 })
   },
   _css

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/06232f2b/html5/render/vue/components/scrollable/loading-indicator.js
--
diff --git a/html5/render/vue/components/scrollable/loading-indicator.js 
b/html5/render/vue/components/scrollable/loading-indicator.js
index 37129fd..59f141e 100644
--- a/html5/render/vue/components/scrollable/loading-indicator.js
+++ b/html5/render/vue/components/scrollable/loading-indicator.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 import { extractComponentStyle } from '../../core'
-import { getRgb, loopArray } from '../../utils'
+import { getRgb, loopArray, 

[23/37] incubator-weex git commit: +[ios] delete mark

2017-06-28 Thread sospartan
+[ios] delete mark

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

Branch: refs/heads/0.15-dev
Commit: 7ade9691bbf15e465d8680756a3fde524cb76302
Parents: f405ffa
Author: 齐山 
Authored: Mon Jun 26 15:42:34 2017 +0800
Committer: GitHub 
Committed: Mon Jun 26 15:42:34 2017 +0800

--
 test/pages/components/textarea-maxlength.vue | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7ade9691/test/pages/components/textarea-maxlength.vue
--
diff --git a/test/pages/components/textarea-maxlength.vue 
b/test/pages/components/textarea-maxlength.vue
index 6c40601..a1a9ddc 100644
--- a/test/pages/components/textarea-maxlength.vue
+++ b/test/pages/components/textarea-maxlength.vue
@@ -16,17 +16,9 @@
   oninput (event) {
 this.value = event.value
 console.log('oninput:', event.value)
-//modal.toast({
-//  message: `oninput: ${event.value}`,
-//  duration: 0.8
-//})
   },
   onchange (event) {
 console.log('onchange:', event.value)
-//modal.toast({
-//  message: `onchange: ${event.value}`,
-//  duration: 0.8
-//})
   },
 }
   }
@@ -47,4 +39,4 @@
 border-color: #41B883;
 maxlength:10;
   }
-
\ No newline at end of file
+



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

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/MrRaindrop/incubator-weex into 
0.14-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/49ba77ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/49ba77ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/49ba77ff

Branch: refs/heads/0.15-dev
Commit: 49ba77ff11f29d7a1a704b52cf291e3f47b2ccf7
Parents: 7fc1190 06232f2
Author: tancy 
Authored: Thu Jun 22 15:16:58 2017 +0800
Committer: tancy 
Committed: Thu Jun 22 15:16:58 2017 +0800

--
 html5/render/vue/components/input.js| 52 
 .../components/scrollable/loading-indicator.js  | 11 +
 html5/render/vue/utils/style.js | 16 ++
 3 files changed, 61 insertions(+), 18 deletions(-)
--




[18/37] incubator-weex git commit: + [example] fix bug toast refect input

2017-06-28 Thread sospartan
+ [example]  fix bug toast refect  input


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

Branch: refs/heads/0.15-dev
Commit: 1a0813a653259c1b48e4ec83df6ebf655b8b917d
Parents: f60456c
Author: 齐山 
Authored: Sat Jun 24 20:15:52 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 20:15:52 2017 +0800

--
 test/pages/components/textarea-maxlength.vue | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1a0813a6/test/pages/components/textarea-maxlength.vue
--
diff --git a/test/pages/components/textarea-maxlength.vue 
b/test/pages/components/textarea-maxlength.vue
index 503a59f..6c40601 100644
--- a/test/pages/components/textarea-maxlength.vue
+++ b/test/pages/components/textarea-maxlength.vue
@@ -16,17 +16,17 @@
   oninput (event) {
 this.value = event.value
 console.log('oninput:', event.value)
-modal.toast({
-  message: `oninput: ${event.value}`,
-  duration: 0.8
-})
+//modal.toast({
+//  message: `oninput: ${event.value}`,
+//  duration: 0.8
+//})
   },
   onchange (event) {
 console.log('onchange:', event.value)
-modal.toast({
-  message: `onchange: ${event.value}`,
-  duration: 0.8
-})
+//modal.toast({
+//  message: `onchange: ${event.value}`,
+//  duration: 0.8
+//})
   },
 }
   }



[26/37] incubator-weex git commit: + [doc] integrate DocSearch into documentation pages

2017-06-28 Thread sospartan
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b4c93e9/doc/themes/weex/source/js/docsearch.min.js
--
diff --git a/doc/themes/weex/source/js/docsearch.min.js 
b/doc/themes/weex/source/js/docsearch.min.js
new file mode 100644
index 000..c166178
--- /dev/null
+++ b/doc/themes/weex/source/js/docsearch.min.js
@@ -0,0 +1,7 @@
+/*! docsearch 1.5.0 | © Algolia | github.com/algolia/docsearch */
+!function(t,e){"object"==typeof exports&&"object"==typeof 
module?module.exports=e():"function"==typeof 
define&?define([],e):"object"==typeof 
exports?exports.docsearch=e():t.docsearch=e()}(this,function(){return 
function(t){function e(r){if(n[r])return n[r].exports;var 
i=n[r]={exports:{},id:r,loaded:!1};return 
t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return 
e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use 
strict";t.exports=n(1)},function(t,e,n){"use strict";function r(t){return 
t&__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var
 
i=n(2),o=r(i),s=n(3),a=r(s),u=n(68),c=r(u),l=(0,o.default)(a.default);l.version=c.default,e.default=l,t.exports=e.default},function(t,e){"use
 strict";function n(t){var e=function(){for(var 
e=arguments.length,n=Array(e),i=0;i=0?"algolia-autocomplete-right":"algolia-autocomplete-left",o=n-r<0?"algolia-autocomplete-right":"algolia-autocomplete-left",s=(0,w.default)(".algolia-autocomplete");s.hasClass(i)||s.addClass(i),s.hasClass(o)&(o)}}],[{key:"checkArguments",value:function(e){if(!e.apiKey||!e.indexName)throw
 new Error(_);if(!t.getInputFromSelector(e.inputSelector))throw new 
Error("Error: No input element in the page matches 
"+e.inputSelector)}},{key:"getInputFromSelector",value:function(t){var 
e=(0,w.default)(t).filter("input");return 
e.length?(0,w.default)(e[0]):null}},{key:"formatHits",value:function(e){var 
n=y.default.deepClone(e),r=n.map(
 function(t){return 
t._highlightResult&&(t._highlightResult=y.default.mergeKeyWithParent(t._highlightResult,"hierarchy")),y.default.mergeKeyWithParent(t,"hierarchy")}),i=y.default.groupBy(r,"lvl0");return
 w.default.each(i,function(t,e){var 
n=y.default.groupBy(e,"lvl1"),r=y.default.flattenAndFlagFirst(n,"isSubCategoryHeader");i[t]=r}),i=y.default.flattenAndFlagFirst(i,"isCategoryHeader"),i.map(function(e){var
 

[27/37] incubator-weex git commit: + [doc] integrate DocSearch into documentation pages

2017-06-28 Thread sospartan
+ [doc] integrate DocSearch into documentation pages


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

Branch: refs/heads/0.15-dev
Commit: 5b4c93e919fadf674c26d53ad66a5d87129ef7ba
Parents: 4ef5368
Author: parryworld 
Authored: Mon Jun 26 17:48:19 2017 +0800
Committer: parryworld 
Committed: Mon Jun 26 17:48:19 2017 +0800

--
 doc/_config.yml |  6 +++
 doc/_config_cn.yml  |  6 +++
 doc/themes/weex/layout/_partial/head.ejs|  3 ++
 doc/themes/weex/layout/layout.ejs   | 15 +++
 doc/themes/weex/source/css/docsearch.min.css|  2 +
 .../weex/source/css/partial/search-form.scss| 44 +++-
 doc/themes/weex/source/js/docsearch.min.js  |  7 
 7 files changed, 82 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b4c93e9/doc/_config.yml
--
diff --git a/doc/_config.yml b/doc/_config.yml
index 22a35f7..29827e5 100644
--- a/doc/_config.yml
+++ b/doc/_config.yml
@@ -121,6 +121,12 @@ autoprefixer:
   browsers:
 - 'last 5 versions'
 
+# docsearch
+docsearch:
+  enable: true
+  en: weex
+  cn: weex_cn
+
 alias:
   doc/index.html: index.html
   doc/guide.html: guide/index.html

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b4c93e9/doc/_config_cn.yml
--
diff --git a/doc/_config_cn.yml b/doc/_config_cn.yml
index 910d08d..9666d17 100644
--- a/doc/_config_cn.yml
+++ b/doc/_config_cn.yml
@@ -119,6 +119,12 @@ autoprefixer:
   browsers:
 - 'last 5 versions'
 
+# docsearch
+docsearch:
+  enable: true
+  en: weex_io
+  cn: weex_io_cn
+
 alias:
   doc/index.html: index.html
   doc/guide.html: guide/index.html

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b4c93e9/doc/themes/weex/layout/_partial/head.ejs
--
diff --git a/doc/themes/weex/layout/_partial/head.ejs 
b/doc/themes/weex/layout/_partial/head.ejs
index e3f7962..ccb76f8 100644
--- a/doc/themes/weex/layout/_partial/head.ejs
+++ b/doc/themes/weex/layout/_partial/head.ejs
@@ -31,6 +31,9 @@
   <% if (config.highlight.enable){ %>
 
   <% } %>
+  <% if (config.docsearch.enable){ %>
+<%- css('css/docsearch.min') %>
+  <% } %>
   <%- css('css/style') %>
   <%- css('css/swiper.min') %>
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b4c93e9/doc/themes/weex/layout/layout.ejs
--
diff --git a/doc/themes/weex/layout/layout.ejs 
b/doc/themes/weex/layout/layout.ejs
index 0355047..9e5ee1f 100644
--- a/doc/themes/weex/layout/layout.ejs
+++ b/doc/themes/weex/layout/layout.ejs
@@ -13,5 +13,20 @@
   <%- partial('_partial/after-footer') %>
   <%- 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 %>
+<%- js('js/docsearch.min.js') %>
+
+docsearch({
+  appId: '2BE9FVK6FX',
+  apiKey: '4879a7b2e4f3a664bd3b219340657475',
+  indexName: "<%= index_name %>",
+  inputSelector: '#search-input-header',
+  algoliaOptions: {
+hitsPerPage: 10
+  }
+});
+
+  <% } %>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5b4c93e9/doc/themes/weex/source/css/docsearch.min.css
--
diff --git a/doc/themes/weex/source/css/docsearch.min.css 
b/doc/themes/weex/source/css/docsearch.min.css
new file mode 100644
index 000..b16031e
--- /dev/null
+++ b/doc/themes/weex/source/css/docsearch.min.css
@@ -0,0 +1,2 @@
+@charset "UTF-8";
+/*! docsearch 1.5.0 | © Algolia | github.com/algolia/docsearch 
*/.aa-dropdown-menu{background-color:#fff;border:1px solid 
#333;border-radius:4px;font-size:16px;margin:6px 0 
0;padding:4px;text-align:left}.algolia-docsearch-suggestion{color:#333;cursor:pointer;overflow:hidden}.algolia-docsearch-suggestion__secondary{border-top:1px
 solid 
#3a3a3a}.algolia-docsearch-suggestion--category-header{display:none;background:#3c4658;color:#fff;font-weight:600;padding:5px
 10px;text-align:left}.algolia-docsearch-suggestion__main 
.algolia-docsearch-suggestion--category-header{display:block}.algolia-docsearch-suggestion--highlight{padding:0;color:#0064e1;background:none;font-weight:600}.algolia-docsearch-suggestion--category-header
 

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

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/MrRaindrop/incubator-weex into 
0.14-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/9e57917b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9e57917b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9e57917b

Branch: refs/heads/0.15-dev
Commit: 9e57917b91e079fdde54ac53f818d0168cebeeb9
Parents: cfe4659 4567754
Author: tancy 
Authored: Tue Jun 27 15:04:21 2017 +0800
Committer: tancy 
Committed: Tue Jun 27 15:04:21 2017 +0800

--
 html5/render/vue/README.md  | 19 +-
 .../render/vue/components/slider/slideMixin.js  | 24 +++--
 html5/render/vue/core/style.js  | 31 
 html5/render/vue/mixins/scrollable.js   | 38 
 html5/render/vue/utils/style.js | 28 +++
 package.json|  2 +-
 packages/weex-vue-render/package.json   |  2 +-
 7 files changed, 108 insertions(+), 36 deletions(-)
--




[22/37] incubator-weex git commit: + [ios] update text method

2017-06-28 Thread sospartan
+ [ios] update text method


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

Branch: refs/heads/0.15-dev
Commit: f405ffa98d3a15c748783fe5dd7e395c00cab0ff
Parents: 91e6294
Author: 齐山 
Authored: Sun Jun 25 14:32:15 2017 +0800
Committer: 齐山 
Committed: Sun Jun 25 14:32:15 2017 +0800

--
 test/scripts/components/textarea-maxlength.test.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f405ffa9/test/scripts/components/textarea-maxlength.test.js
--
diff --git a/test/scripts/components/textarea-maxlength.test.js 
b/test/scripts/components/textarea-maxlength.test.js
index 01c873f..c3c583d 100644
--- a/test/scripts/components/textarea-maxlength.test.js
+++ b/test/scripts/components/textarea-maxlength.test.js
@@ -48,7 +48,7 @@ describe('@ignore-android textarea maxlength vue test2 ', 
function () {
   .elementById('status')
   .text()
   .then((text)=>{
-console.log(text())
+console.log(text)
 assert.equal(text,'1234')
  })
   })



[19/37] incubator-weex git commit: + [example] update logic

2017-06-28 Thread sospartan
+ [example] update logic


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

Branch: refs/heads/0.15-dev
Commit: 8ddc04bc3860b6c33eec27ce447e071439aea0b1
Parents: 1a0813a
Author: 齐山 
Authored: Sat Jun 24 20:43:08 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 20:43:08 2017 +0800

--
 test/scripts/components/textarea-maxlength.test.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8ddc04bc/test/scripts/components/textarea-maxlength.test.js
--
diff --git a/test/scripts/components/textarea-maxlength.test.js 
b/test/scripts/components/textarea-maxlength.test.js
index 7473d3d..01c873f 100644
--- a/test/scripts/components/textarea-maxlength.test.js
+++ b/test/scripts/components/textarea-maxlength.test.js
@@ -43,11 +43,13 @@ describe('@ignore-android textarea maxlength vue test2 ', 
function () {
 return driver
   .elementById('textarea')
   .sendKeys('12345678')
-  .sleep(2000)
+  .sleep(3000)
+  .source()
   .elementById('status')
   .text()
   .then((text)=>{
-  assert.equal(text,'1234')
+console.log(text())
+assert.equal(text,'1234')
  })
   })
 



[03/37] incubator-weex git commit: + [html5] add webSocket api for web platform @notdanger

2017-06-28 Thread sospartan
+ [html5] add webSocket api for web platform @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/9df3655d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9df3655d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9df3655d

Branch: refs/heads/0.15-dev
Commit: 9df3655d5e42bb335c09aa21d29fe03979175894
Parents: 9994583
Author: erha19 <759339...@qq.com>
Authored: Thu Jun 22 11:57:45 2017 +0800
Committer: erha19 <759339...@qq.com>
Committed: Thu Jun 22 14:41:50 2017 +0800

--
 html5/render/vue/env/weex.js|  3 +
 html5/render/vue/modules/index.js   |  2 +
 html5/render/vue/modules/websocket/index.js | 26 
 html5/render/vue/modules/websocket/websocket.js | 66 
 4 files changed, 97 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/html5/render/vue/env/weex.js
--
diff --git a/html5/render/vue/env/weex.js b/html5/render/vue/env/weex.js
index e5ae94b..9b804cb 100644
--- a/html5/render/vue/env/weex.js
+++ b/html5/render/vue/env/weex.js
@@ -78,6 +78,9 @@ const weex = {
 if (!weexModules[name]) {
   weexModules[name] = {}
 }
+if (!!meta && meta.mountType === 'full') {
+  weexModules[name] = module
+}
 for (const key in module) {
   if (module.hasOwnProperty(key)) {
 weexModules[name][key] = utils.bind(module[key], this)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/html5/render/vue/modules/index.js
--
diff --git a/html5/render/vue/modules/index.js 
b/html5/render/vue/modules/index.js
index 4237f9d..27f0592 100644
--- a/html5/render/vue/modules/index.js
+++ b/html5/render/vue/modules/index.js
@@ -33,6 +33,7 @@ import globalEvent from './globalEvent'
 import modal from './modal'
 import navigator from './navigator'
 import webview from './webview'
+import websocket from './websocket'
 
 const legacyModules = {
   event,
@@ -57,6 +58,7 @@ export default {
   weex.install(legacyModules[k])
 }
 weex.install(modal)
+weex.install(websocket)
 for (const k in modules) {
   weex.registerModule(k, modules[k])
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/html5/render/vue/modules/websocket/index.js
--
diff --git a/html5/render/vue/modules/websocket/index.js 
b/html5/render/vue/modules/websocket/index.js
new file mode 100644
index 000..273ed58
--- /dev/null
+++ b/html5/render/vue/modules/websocket/index.js
@@ -0,0 +1,26 @@
+/*
+ * 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 websocket from './websocket'
+
+// TODO: rewrite the module meta
+export default {
+  init: function (Weex) {
+Weex.registerModule('webSocket', websocket, { mountType: 'full' })
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/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
new file mode 100644
index 000..c5cfa26
--- /dev/null
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -0,0 +1,66 @@
+/*
+ * 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
+ 

[13/37] incubator-weex git commit: * [html5] fix websocket module dange code

2017-06-28 Thread sospartan
* [html5] fix websocket module dange 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/e6b55f7c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e6b55f7c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e6b55f7c

Branch: refs/heads/0.15-dev
Commit: e6b55f7c3bde474a75dfc9757b2e5f0b0b180d93
Parents: 323b836
Author: erha19 
Authored: Fri Jun 23 17:34:44 2017 +0800
Committer: erha19 
Committed: Fri Jun 23 17:34:44 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e6b55f7c/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 b430789..743dc1d 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -19,35 +19,36 @@
 /**
  * websocket module
  */
-export default (function() {
+export default (function () {
   const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
   const ws = {
 INSTANCE: null,
-WebSocket: function(url, protocol) {
+WebSocket: function (url, protocol) {
   if (!url) {
 return
   }
   if (!protocol) {
 ws.INSTANCE = new WebSocket(url)
-  } else {
+  }
+  else {
 ws.INSTANCE = new WebSocket(url, protocol)
   }
   return ws.INSTANCE
 },
-send: function(messages) {
+send: function (messages) {
   ws.INSTANCE && ws.INSTANCE.send(messages)
 },
-close: function() {
+close: function () {
   ws.INSTANCE && ws.INSTANCE.close()
 }
   }
   for (const i in registerListeners) {
 if (registerListeners.hasOwnProperty(i)) {
   Object.defineProperty(ws, registerListeners[i], {
-get: function() {
+get: function () {
   return ws.INSTANCE && ws.INSTANCE[registerListeners[i]]
 },
-set: function(fn) {
+set: function (fn) {
   if (ws.INSTANCE) {
 ws.INSTANCE[registerListeners[i]] = fn
   }
@@ -56,4 +57,4 @@ export default (function() {
 }
   }
   return ws
-})()
\ No newline at end of file
+})()



[17/37] incubator-weex git commit: + [example] revert to before

2017-06-28 Thread sospartan
+ [example] revert to before


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

Branch: refs/heads/0.15-dev
Commit: f60456cbce41d2c00a98d6b7ea0f7fd6a01e78a5
Parents: f4b0b46
Author: 齐山 
Authored: Sat Jun 24 19:05:45 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 19:05:45 2017 +0800

--
 test/scripts/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f60456cb/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 74d966e..6e1b581 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -125,7 +125,7 @@ module.exports = {
 return ( isRunInCI ? 60 : 10 ) * 60 * 1000;
 },
 getGETActionWaitTimeMills:function(){
-return (isRunInCI ? 5 : 1 ) * 1000;
+return (isRunInCI ? 120 : 5 ) * 1000;
 },
 diffImage, 
 createDriver:function(wd){



[35/37] incubator-weex git commit: * [doc] update article style

2017-06-28 Thread sospartan
* [doc] update article 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/2510206f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/2510206f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/2510206f

Branch: refs/heads/0.15-dev
Commit: 2510206f443d9f7984fa532e6c5a6c867354fc1c
Parents: ad732d2
Author: tancy 
Authored: Wed Jun 28 10:42:29 2017 +0800
Committer: tancy 
Committed: Wed Jun 28 10:42:29 2017 +0800

--
 doc/themes/weex/source/css/common.scss| 14 ++
 doc/themes/weex/source/css/media-queries.scss |  2 +-
 doc/themes/weex/source/css/partial/highlight.scss |  7 ---
 doc/themes/weex/source/css/variable.scss  |  4 ++--
 4 files changed, 17 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2510206f/doc/themes/weex/source/css/common.scss
--
diff --git a/doc/themes/weex/source/css/common.scss 
b/doc/themes/weex/source/css/common.scss
index 47a1fe9..10c25cf 100644
--- a/doc/themes/weex/source/css/common.scss
+++ b/doc/themes/weex/source/css/common.scss
@@ -18,9 +18,12 @@ html, body {
 
 body {
   background: $bg-gray;
-  font-family: -apple-system,BlinkMacSystemFont,"Segoe 
UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue","PingFang 
SC","Helvetica Neue",Arial,STHeiti,"Microsoft YaHei","Source Han Sans SC","Noto 
Sans CJK SC","Source Han Sans CN","Noto Sans SC","Noto Sans CJK 
TC",SimSun,sans-serif;
+  // font-family: Exo,'-apple-system','Open 
Sans',HelveticaNeue-Light,'Helvetica Neue Light','Helvetica Neue','Hiragino 
Sans GB','Microsoft YaHei',Helvetica,Arial,sans-serif;
+  font-family: Lato, "Microsoft Jhenghei", "Hiragino Sans GB", "Microsoft 
YaHei", sans-serif,'-apple-system','Open Sans',HelveticaNeue-Light,'Helvetica 
Neue Light';
+  // font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 
'WenQuanYi Micro Hei',sans-serif;
+  // font-size:62.5%;max-height:100%;
   font-size: 14px;
-  line-height: 1.4;
+  line-height: 120%;
   color: $text-light-black;
   -webkit-tap-highlight-color: transparent;
 }
@@ -72,11 +75,14 @@ img {
   vertical-align:middle;
 }
 
-h1,h2,h3,h4,h5,h6,p {
+p {
   font-weight: normal;
   margin: 0 0 1em;
 }
-
+h1,h2,h3,h4,h5,h6{
+  font-weight: bold;
+  margin: 0 0 1em;
+}
 h1 {
   font-size: 2em;
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2510206f/doc/themes/weex/source/css/media-queries.scss
--
diff --git a/doc/themes/weex/source/css/media-queries.scss 
b/doc/themes/weex/source/css/media-queries.scss
index f461e84..f31a880 100644
--- a/doc/themes/weex/source/css/media-queries.scss
+++ b/doc/themes/weex/source/css/media-queries.scss
@@ -7,7 +7,7 @@
**/
   body {
 user-select: none;
-font-size: 13px;
+font-size: 14px;
   }
 
   #header {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2510206f/doc/themes/weex/source/css/partial/highlight.scss
--
diff --git a/doc/themes/weex/source/css/partial/highlight.scss 
b/doc/themes/weex/source/css/partial/highlight.scss
index 521357a..cf9e25c 100644
--- a/doc/themes/weex/source/css/partial/highlight.scss
+++ b/doc/themes/weex/source/css/partial/highlight.scss
@@ -1,13 +1,14 @@
 code, pre {
-  font-family: Source Code Pro,Monaco,Menlo,Consolas,monospace;
+  // font-family: Source Code Pro,Monaco,Menlo,Consolas,monospace;
   color: #abb2bf;
   font-size: 14px;
 }
 
 code {
-  color: #e06c75;
-  background: #eaeaea;
+  color: #c7254e;
+  background: #f9f2f4;
   padding: 0 5px;
+  border-radius: 5px;
 }
 
 pre {

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2510206f/doc/themes/weex/source/css/variable.scss
--
diff --git a/doc/themes/weex/source/css/variable.scss 
b/doc/themes/weex/source/css/variable.scss
index 7586c0b..50e35cd 100644
--- a/doc/themes/weex/source/css/variable.scss
+++ b/doc/themes/weex/source/css/variable.scss
@@ -2,7 +2,7 @@
 * Variable
 ***/
 
-$text-light-black: #363539;
+$text-light-black: #333;
 $text-black: #333;
 $text-white: #fff;
 $text-gray: #999;
@@ -10,7 +10,7 @@ $text-blue: #00BDFF;
 $bg-blue: $text-blue;
 $bg-light-blue: #23CEFD;
 $bg-white: #fff;
-$bg-gray: #f5f5f5;
+$bg-gray: #fafafa;
 $border-light: #ddd;
 $border-blue: $text-blue;
 $border-gray: #999ba4;



[11/37] incubator-weex git commit: - [html5] remove some useless code in websocket module

2017-06-28 Thread sospartan
- [html5] remove some useless code in websocket module


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

Branch: refs/heads/0.15-dev
Commit: dfc5d31b2efd44729dfe1ba3a6b22598c800f5ad
Parents: 5d31202
Author: erha19 
Authored: Fri Jun 23 16:22:50 2017 +0800
Committer: erha19 
Committed: Fri Jun 23 16:22:50 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dfc5d31b/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 f52aa12..b430789 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -16,48 +16,44 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 /**
  * websocket module
  */
-// let instance = null
-
-export default (function () {
-  let instance = null
+export default (function() {
   const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
   const ws = {
-WebSocket: function (url, protocol) {
+INSTANCE: null,
+WebSocket: function(url, protocol) {
   if (!url) {
 return
   }
   if (!protocol) {
-instance = new WebSocket(url)
+ws.INSTANCE = new WebSocket(url)
+  } else {
+ws.INSTANCE = new WebSocket(url, protocol)
   }
-  else {
-instance = new WebSocket(url, protocol)
-  }
-  return instance
+  return ws.INSTANCE
 },
-send: function (messages) {
-  instance && instance.send(messages)
+send: function(messages) {
+  ws.INSTANCE && ws.INSTANCE.send(messages)
 },
-close: function () {
-  instance && instance.close()
+close: function() {
+  ws.INSTANCE && ws.INSTANCE.close()
 }
   }
   for (const i in registerListeners) {
 if (registerListeners.hasOwnProperty(i)) {
   Object.defineProperty(ws, registerListeners[i], {
-get: function () {
-  return instance && instance[registerListeners[i]]
+get: function() {
+  return ws.INSTANCE && ws.INSTANCE[registerListeners[i]]
 },
-set: function (fn) {
-  if (instance) {
-instance[registerListeners[i]] = fn
+set: function(fn) {
+  if (ws.INSTANCE) {
+ws.INSTANCE[registerListeners[i]] = fn
   }
 }
   })
 }
   }
   return ws
-})()
+})()
\ No newline at end of file



[06/37] incubator-weex git commit: Merge branch '0.14-dev' of https://github.com/apache/incubator-weex into 0.14-dev

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/apache/incubator-weex into 
0.14-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/5c86cf3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5c86cf3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5c86cf3c

Branch: refs/heads/0.15-dev
Commit: 5c86cf3cbedc5988a7b50ae3d967bac03764d104
Parents: d0a5e4d 49ba77f
Author: erha19 
Authored: Thu Jun 22 15:23:20 2017 +0800
Committer: erha19 
Committed: Thu Jun 22 15:23:20 2017 +0800

--
 .../ui/component/AbstractEditComponent.java |  14 +-
 .../com/taobao/weex/ui/component/Textarea.java  |   6 +
 .../taobao/weex/ui/component/WXComponent.java   |   2 +-
 .../com/taobao/weex/ui/view/WXEditText.java |   9 +-
 html5/render/vue/components/index.js|   4 +-
 html5/render/vue/components/input.js|  52 +--
 .../components/scrollable/loading-indicator.js  | 145 +--
 .../render/vue/components/scrollable/loading.js |   4 +-
 .../render/vue/components/scrollable/refresh.js |   4 +-
 html5/render/vue/mixins/style.js|  11 +-
 html5/render/vue/styles/base.css|  56 ---
 html5/render/vue/utils/func.js  |  30 
 html5/render/vue/utils/style.js |  49 +++
 13 files changed, 292 insertions(+), 94 deletions(-)
--




[02/37] incubator-weex git commit: * [android] revert dom interface for fix crash

2017-06-28 Thread sospartan
* [android] revert dom interface for fix crash


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

Branch: refs/heads/0.15-dev
Commit: 9f087ec3aea4a431eaa53b8f4de8e2e604ad066c
Parents: 7b26ee5
Author: zshshr 
Authored: Thu Jun 22 14:08:39 2017 +0800
Committer: zshshr 
Committed: Thu Jun 22 14:08:39 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 7575352 -> 7570504 bytes
 android/sdk/libs/x86/libweexjsc.so | Bin 12130116 -> 12121924 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9f087ec3/android/sdk/libs/armeabi/libweexjsc.so
--
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
index a180660..41b1ee8 100755
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and 
b/android/sdk/libs/armeabi/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9f087ec3/android/sdk/libs/x86/libweexjsc.so
--
diff --git a/android/sdk/libs/x86/libweexjsc.so 
b/android/sdk/libs/x86/libweexjsc.so
index 9626c3c..c45672a 100755
Binary files a/android/sdk/libs/x86/libweexjsc.so and 
b/android/sdk/libs/x86/libweexjsc.so differ



[37/37] incubator-weex git commit: Merge branch 'dev' into 0.15-dev

2017-06-28 Thread sospartan
Merge branch 'dev' 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/571b735a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/571b735a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/571b735a

Branch: refs/heads/0.15-dev
Commit: 571b735acc7d78c0d3598e94c6418e072de1736b
Parents: 4a33ccd 44e959a
Author: sospartan 
Authored: Wed Jun 28 16:45:31 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 16:45:31 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 ++-
 doc/_config.yml |   6 +
 doc/_config_cn.yml  |   6 +
 doc/source/cn/references/components/text.md |  64 +-
 doc/source/cn/references/modules/dom.md |   2 +-
 doc/source/references/components/text.md|  69 ++-
 doc/source/references/modules/dom.md|   2 +-
 doc/themes/weex/layout/_partial/head.ejs|   3 +
 doc/themes/weex/layout/layout.ejs   |  15 +++
 doc/themes/weex/source/css/common.scss  |  14 ++-
 doc/themes/weex/source/css/docsearch.min.css|   2 +
 doc/themes/weex/source/css/media-queries.scss   |   2 +-
 .../weex/source/css/partial/highlight.scss  |   7 +-
 .../weex/source/css/partial/search-form.scss|  44 ++-
 doc/themes/weex/source/css/variable.scss|   4 +-
 doc/themes/weex/source/js/docsearch.min.js  |   7 ++
 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 ++
 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 +-
 40 files changed, 652 insertions(+), 151 deletions(-)
--




[04/37] incubator-weex git commit: + [html5] add example for webSocket

2017-06-28 Thread sospartan
+ [html5] add example for webSocket


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

Branch: refs/heads/0.15-dev
Commit: d0a5e4d1f8195623e021b25dd8f19163b6320c2f
Parents: 9df3655
Author: erha19 <759339...@qq.com>
Authored: Thu Jun 22 14:52:21 2017 +0800
Committer: erha19 <759339...@qq.com>
Committed: Thu Jun 22 14:52:21 2017 +0800

--
 examples/vue/index.vue |   1 +
 examples/vue/modules/websocket.vue | 116 
 2 files changed, 117 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0a5e4d1/examples/vue/index.vue
--
diff --git a/examples/vue/index.vue b/examples/vue/index.vue
index 69d867d..ebea3ad 100644
--- a/examples/vue/index.vue
+++ b/examples/vue/index.vue
@@ -34,6 +34,7 @@
   // module
   {name: root + '/modules/instance-api', title: 'Instance API'},
   {name: root + '/modules/modal', title: 'Modal'},
+  {name: root + '/modules/webSocket', title: 'WebSocket'},
   {name: root + '/modules/stream', title: 'Stream'},
   {name: root + '/modules/storage',title:'Storage'},
   // {name: 'module/clipboard', title: 'Clipboard'}, // 0.8 , 
developing

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0a5e4d1/examples/vue/modules/websocket.vue
--
diff --git a/examples/vue/modules/websocket.vue 
b/examples/vue/modules/websocket.vue
new file mode 100644
index 000..72d7ea1
--- /dev/null
+++ b/examples/vue/modules/websocket.vue
@@ -0,0 +1,116 @@
+
+  
+
+  
+websocket
+  
+  
+  
+connect
+send
+close
+  
+  
+method = close
+  
+  {{closeinfo}}
+  
+method = send
+  
+  {{sendinfo}}
+  
+method = onopen
+  
+  {{onopeninfo}}
+  
+method = onmessage
+  
+  {{onmessage}}
+  
+method = onclose
+  
+  {{oncloseinfo}}
+  
+method = onerror
+  
+  {{onerrorinfo}}
+
+  
+
+
+
+  .input {
+font-size: 40px;
+height: 80px;
+width: 600px;
+  }
+  
+  .button {
+font-size: 36px;
+width: 150px;
+color: #41B883;
+text-align: center;
+padding-top: 25px;
+padding-bottom: 25px;
+border-width: 2px;
+border-style: solid;
+margin-right: 20px;
+border-color: rgb(162, 217, 192);
+background-color: rgba(162, 217, 192, 0.2);
+  }
+
+
+
+  var websocket = weex.requireModule('webSocket')
+  export default {
+data() {
+  return {
+connectinfo: '',
+sendinfo: '',
+onopeninfo: '',
+onmessage: '',
+oncloseinfo: '',
+onerrorinfo: '',
+closeinfo: '',
+txtInput: '',
+navBarHeight: 88,
+title: 'Navigator',
+dir: 'examples',
+baseURL: ''
+  }
+},
+methods: {
+  connect: function() {
+websocket.WebSocket('ws://echo.websocket.org', '');
+var self = this;
+self.onopeninfo = 'connecting...'
+websocket.onopen = function(e) {
+  self.onopeninfo = 'websocket open';
+}
+websocket.onmessage = function(e) {
+  self.onmessage = e.data;
+}
+websocket.onerror = function(e) {
+  self.onerrorinfo = e.data;
+}
+websocket.onclose = function(e) {
+  self.onopeninfo = '';
+  self.oncloseinfo = e.code;
+}
+  },
+  send: function(e) {
+var input = this.$refs.input;
+input.blur();
+websocket.send(this.txtInput);
+this.sendinfo = this.txtInput;
+  },
+  oninput: function(event) {
+this.txtInput = event.value;
+  },
+  close: function(e) {
+this.closeinfo = 'close connect';
+websocket.close();
+  },
+},
+  }
+
\ No newline at end of file



[08/37] incubator-weex git commit: * [andriod] catch ConcurrentModificationException

2017-06-28 Thread sospartan
* [andriod]  catch ConcurrentModificationException


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

Branch: refs/heads/0.15-dev
Commit: 25a6dbd17822b5f2cd97ff8bf67cca0b455a06c5
Parents: 9f087ec
Author: zshshr 
Authored: Thu Jun 22 22:53:39 2017 +0800
Committer: zshshr 
Committed: Thu Jun 22 22:53:39 2017 +0800

--
 .../weex/ui/component/list/BasicListComponent.java  | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/25a6dbd1/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 4f897f3..306be55 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
@@ -330,16 +330,20 @@ public abstract class BasicListComponent listeners = 
getInstance().getWXScrollListeners();
 if (listeners != null && listeners.size() > 0) {
-  for (OnWXScrollListener listener : listeners) {
-if (listener != null) {
-  if(listener instanceof ICheckBindingScroller){
-if(((ICheckBindingScroller) 
listener).isNeedScroller(getRef(),null)){
+  try {
+for (OnWXScrollListener listener : listeners) {
+  if (listener != null) {
+if (listener instanceof ICheckBindingScroller) {
+  if (((ICheckBindingScroller) 
listener).isNeedScroller(getRef(), null)) {
+listener.onScrolled(recyclerView, dx, dy);
+  }
+} else {
   listener.onScrolled(recyclerView, dx, dy);
 }
-  }else {
-listener.onScrolled(recyclerView, dx, dy);
   }
 }
+  } catch (Exception e) {
+e.printStackTrace();
   }
 }
   }



[29/37] incubator-weex git commit: Merge branch '0.14-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-bugfix-mamaca-0.14-dev-0624

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of 
https://git-wip-us.apache.org/repos/asf/incubator-weex into 
ios-bugfix-mamaca-0.14-dev-0624


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

Branch: refs/heads/0.15-dev
Commit: cfe4659af6fe7fe7c64903329b80ebf1bda504b3
Parents: 24474e2 cbc2e2d
Author: 齐山 
Authored: Tue Jun 27 14:01:05 2017 +0800
Committer: 齐山 
Committed: Tue Jun 27 14:01:05 2017 +0800

--
 examples/vue/index.vue  |   1 +
 examples/vue/modules/websocket.vue  | 116 +++
 html5/render/vue/env/weex.js|   3 +
 html5/render/vue/modules/index.js   |   2 +
 html5/render/vue/modules/websocket/index.js |  26 +
 html5/render/vue/modules/websocket/websocket.js |  60 ++
 html5/test/render/vue/modules/websocket.js  |  11 ++
 .../Sources/Component/WXCycleSliderComponent.m  |   7 ++
 8 files changed, 226 insertions(+)
--




[36/37] incubator-weex git commit: Merge branch '0.14-dev' into dev

2017-06-28 Thread sospartan
Merge branch '0.14-dev' 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/44e959a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/44e959a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/44e959a4

Branch: refs/heads/0.15-dev
Commit: 44e959a418737511c3215fcabb5a121cecc3f7f1
Parents: 2510206 24fbad2
Author: sospartan 
Authored: Wed Jun 28 16:44:48 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 16:44:48 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(-)
--




[20/37] incubator-weex git commit: * [html5] fix lint error in webSocket test code

2017-06-28 Thread sospartan
 * [html5] fix lint error in webSocket 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/96cf5de6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/96cf5de6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/96cf5de6

Branch: refs/heads/0.15-dev
Commit: 96cf5de6399ed8ad741e5d8eeac06feee0c3430e
Parents: e6b55f7
Author: erha19 
Authored: Sat Jun 24 21:20:19 2017 +0800
Committer: erha19 
Committed: Sat Jun 24 21:20:19 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/96cf5de6/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 28b5958..f3534ef 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -1,11 +1,11 @@
-import websocket from '../../../../render/vue/modules/websocket/websocket';
-describe('webSocket module', function() {
-  afterEach(function(done) {
+import websocket from '../../../../render/vue/modules/websocket/websocket'
+describe('webSocket module', function () {
+  afterEach(function (done) {
 // Cleanup
-websocket.close();
-done();
-  });
+websocket.close()
+done()
+  })
   it('should have connection lifecycle constants defined on the instance', () 
=> {
-
expect(websocket.WebSocket('wss://echo.websocket.org').CONNECTING).to.be.equal(0);
-  });
-});
+
expect(websocket.WebSocket('wss://echo.websocket.org').CONNECTING).to.be.equal(0)
+  })
+})



[02/30] incubator-weex git commit: * [android] revert dom interface for fix crash

2017-06-28 Thread sospartan
* [android] revert dom interface for fix crash


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

Branch: refs/heads/dev
Commit: 9f087ec3aea4a431eaa53b8f4de8e2e604ad066c
Parents: 7b26ee5
Author: zshshr 
Authored: Thu Jun 22 14:08:39 2017 +0800
Committer: zshshr 
Committed: Thu Jun 22 14:08:39 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so | Bin 7575352 -> 7570504 bytes
 android/sdk/libs/x86/libweexjsc.so | Bin 12130116 -> 12121924 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9f087ec3/android/sdk/libs/armeabi/libweexjsc.so
--
diff --git a/android/sdk/libs/armeabi/libweexjsc.so 
b/android/sdk/libs/armeabi/libweexjsc.so
index a180660..41b1ee8 100755
Binary files a/android/sdk/libs/armeabi/libweexjsc.so and 
b/android/sdk/libs/armeabi/libweexjsc.so differ

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9f087ec3/android/sdk/libs/x86/libweexjsc.so
--
diff --git a/android/sdk/libs/x86/libweexjsc.so 
b/android/sdk/libs/x86/libweexjsc.so
index 9626c3c..c45672a 100755
Binary files a/android/sdk/libs/x86/libweexjsc.so and 
b/android/sdk/libs/x86/libweexjsc.so differ



[15/30] incubator-weex git commit: + [example] revert to before

2017-06-28 Thread sospartan
+ [example] revert to before


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

Branch: refs/heads/dev
Commit: f60456cbce41d2c00a98d6b7ea0f7fd6a01e78a5
Parents: f4b0b46
Author: 齐山 
Authored: Sat Jun 24 19:05:45 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 19:05:45 2017 +0800

--
 test/scripts/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f60456cb/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 74d966e..6e1b581 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -125,7 +125,7 @@ module.exports = {
 return ( isRunInCI ? 60 : 10 ) * 60 * 1000;
 },
 getGETActionWaitTimeMills:function(){
-return (isRunInCI ? 5 : 1 ) * 1000;
+return (isRunInCI ? 120 : 5 ) * 1000;
 },
 diffImage, 
 createDriver:function(wd){



[19/30] incubator-weex git commit: + [ios] macaca update server

2017-06-28 Thread sospartan
+ [ios] macaca update server


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

Branch: refs/heads/dev
Commit: 91e6294517a110537018748f7e7910f6acde2b8a
Parents: 8ddc04b
Author: 齐山 
Authored: Sun Jun 25 14:25:31 2017 +0800
Committer: 齐山 
Committed: Sun Jun 25 14:25:31 2017 +0800

--
 test/serve.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/91e62945/test/serve.sh
--
diff --git a/test/serve.sh b/test/serve.sh
index eb2a156..a5485e2 100755
--- a/test/serve.sh
+++ b/test/serve.sh
@@ -1,4 +1,5 @@
 #!/bin/bash -eu
 npm run build:vue
 npm run build:ci &
-npm run serve:no-port -- -p $serport
\ No newline at end of file
+port="${serport:-12581}"
+npm run serve:no-port -- -p $port
\ No newline at end of file



[17/30] incubator-weex git commit: + [example] update logic

2017-06-28 Thread sospartan
+ [example] update logic


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

Branch: refs/heads/dev
Commit: 8ddc04bc3860b6c33eec27ce447e071439aea0b1
Parents: 1a0813a
Author: 齐山 
Authored: Sat Jun 24 20:43:08 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 20:43:08 2017 +0800

--
 test/scripts/components/textarea-maxlength.test.js | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8ddc04bc/test/scripts/components/textarea-maxlength.test.js
--
diff --git a/test/scripts/components/textarea-maxlength.test.js 
b/test/scripts/components/textarea-maxlength.test.js
index 7473d3d..01c873f 100644
--- a/test/scripts/components/textarea-maxlength.test.js
+++ b/test/scripts/components/textarea-maxlength.test.js
@@ -43,11 +43,13 @@ describe('@ignore-android textarea maxlength vue test2 ', 
function () {
 return driver
   .elementById('textarea')
   .sendKeys('12345678')
-  .sleep(2000)
+  .sleep(3000)
+  .source()
   .elementById('status')
   .text()
   .then((text)=>{
-  assert.equal(text,'1234')
+console.log(text())
+assert.equal(text,'1234')
  })
   })
 



[24/30] incubator-weex git commit: [weex-vue-render] add some features including:

2017-06-28 Thread sospartan
[weex-vue-render] add some features including:

+ [html5] add 'loadmore' event to horizontal scroller.

* [html5] fix slider's autoplay.

+ [html5] release v0.11.51 @notdanger.

* [html5] fix slider auto-play

+ [html5] support pseudo class.


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

Branch: refs/heads/dev
Commit: 456775451532bba975612e0a8bab08067ced502c
Parents: 06232f2
Author: MrRaindrop 
Authored: Fri Jun 23 14:52:50 2017 +0800
Committer: MrRaindrop 
Committed: Mon Jun 26 18:00:16 2017 +0800

--
 html5/render/vue/README.md  | 19 +-
 .../render/vue/components/slider/slideMixin.js  | 24 +++--
 html5/render/vue/core/style.js  | 31 
 html5/render/vue/mixins/scrollable.js   | 38 
 html5/render/vue/utils/style.js | 28 +++
 package.json|  2 +-
 packages/weex-vue-render/package.json   |  2 +-
 7 files changed, 108 insertions(+), 36 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/45677545/html5/render/vue/README.md
--
diff --git a/html5/render/vue/README.md b/html5/render/vue/README.md
index e2f39d0..f0d3ba8 100644
--- a/html5/render/vue/README.md
+++ b/html5/render/vue/README.md
@@ -27,7 +27,24 @@ If you perfer cdn way, and use script tag to import a script 
link, just import i
 
 ## use vue-loader to bundle .vue file
 
-**NOTE: ** after `v0.11.3` there's no need to add `$processStyle` and 
`autoprefixer` in your vue-loader config anymore. The runtime render will take 
care of it once for all.
+NOTE: you should inject `$processStyle` to preprocess vnode's style in 
vue-loader's postTransformNode hook.
+
+```javascript
+vue: {
+  /**
+* important! should use postTransformNode to add $processStyle for
+* inline style prefixing.
+*/
+  compilerModules: [
+{
+  postTransformNode: el => {
+el.staticStyle = `$processStyle(${el.staticStyle})`
+el.styleBinding = `$processStyle(${el.styleBinding})`
+  }
+}
+  ],
+}
+```
 
 ## component -> dom map
 

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/45677545/html5/render/vue/components/slider/slideMixin.js
--
diff --git a/html5/render/vue/components/slider/slideMixin.js 
b/html5/render/vue/components/slider/slideMixin.js
index da2c848..73960e5 100644
--- a/html5/render/vue/components/slider/slideMixin.js
+++ b/html5/render/vue/components/slider/slideMixin.js
@@ -48,7 +48,6 @@ export default {
   },
 
   updated () {
-this._startAutoPlay()
 const children = this.$children
 const len = children && children.length
 if (children && len > 0) {
@@ -69,7 +68,6 @@ export default {
 
   mounted () {
 this._getWrapperSize()
-this._startAutoPlay()
 this._slideTo(this.currentIndex)
 fireLazyload(this.$el, true)
   },
@@ -79,8 +77,8 @@ export default {
   const wrapper = this.$refs.wrapper
   if (wrapper) {
 const rect = wrapper.getBoundingClientRect()
-this.wrapperWidth = rect.width
-this.wrapperHeight = rect.height
+this._wrapperWidth = rect.width
+this._wrapperHeight = rect.height
   }
 },
 
@@ -198,7 +196,7 @@ export default {
 const match = translate && 
translate.match(/translate[^(]+\(([+-\d.]+)/)
 const innerX = match && match[1] || 0
 const dist = innerX - this.innerOffset
-this.innerOffset += step * this.wrapperWidth
+this.innerOffset += step * this._wrapperWidth
 // transform the whole slides group.
 inner.style.webkitTransition = `-webkit-transform ${TRANSITION_TIME / 
1000}s ease-in-out`
 inner.style.transition = `transform ${TRANSITION_TIME / 1000}s 
ease-in-out`
@@ -341,7 +339,7 @@ export default {
   }
 
   node._inShow = true
-  const translateX = index * this.wrapperWidth - this.innerOffset
+  const translateX = index * this._wrapperWidth - this.innerOffset
   addTransform(node, {
 translate: `translate3d(${translateX}px, 0px, 0px)`
   })
@@ -439,7 +437,7 @@ export default {
   origNode._inShow = true
   const transObj = getTransformObj(clone)
   transObj.translate = transObj.translate.replace(/[+-\d.]+[pw]x/, ($0) => 
{
-return pos * this.wrapperWidth - this.innerOffset + 'px'
+return pos * this._wrapperWidth - this.innerOffset + 'px'
   })
   

[07/30] incubator-weex git commit: - [html5] remove hasOwnproperty key on ws

2017-06-28 Thread sospartan
- [html5] remove hasOwnproperty key on ws


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

Branch: refs/heads/dev
Commit: 5d3120288ed5bbca344401fae6d32d4a1eefa3bd
Parents: 5c86cf3
Author: erha19 
Authored: Thu Jun 22 17:15:48 2017 +0800
Committer: erha19 
Committed: Thu Jun 22 17:15:48 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d312028/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 c5cfa26..f52aa12 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -26,9 +26,6 @@ export default (function () {
   let instance = null
   const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
   const ws = {
-hasOwnProperty: function (e) {
-  return true
-},
 WebSocket: function (url, protocol) {
   if (!url) {
 return



[20/30] incubator-weex git commit: + [ios] update text method

2017-06-28 Thread sospartan
+ [ios] update text method


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

Branch: refs/heads/dev
Commit: f405ffa98d3a15c748783fe5dd7e395c00cab0ff
Parents: 91e6294
Author: 齐山 
Authored: Sun Jun 25 14:32:15 2017 +0800
Committer: 齐山 
Committed: Sun Jun 25 14:32:15 2017 +0800

--
 test/scripts/components/textarea-maxlength.test.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f405ffa9/test/scripts/components/textarea-maxlength.test.js
--
diff --git a/test/scripts/components/textarea-maxlength.test.js 
b/test/scripts/components/textarea-maxlength.test.js
index 01c873f..c3c583d 100644
--- a/test/scripts/components/textarea-maxlength.test.js
+++ b/test/scripts/components/textarea-maxlength.test.js
@@ -48,7 +48,7 @@ describe('@ignore-android textarea maxlength vue test2 ', 
function () {
   .elementById('status')
   .text()
   .then((text)=>{
-console.log(text())
+console.log(text)
 assert.equal(text,'1234')
  })
   })



[25/30] incubator-weex git commit: Merge branch '0.14-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-bugfix-mamaca-0.14-dev-0624

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of 
https://git-wip-us.apache.org/repos/asf/incubator-weex into 
ios-bugfix-mamaca-0.14-dev-0624


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

Branch: refs/heads/dev
Commit: cfe4659af6fe7fe7c64903329b80ebf1bda504b3
Parents: 24474e2 cbc2e2d
Author: 齐山 
Authored: Tue Jun 27 14:01:05 2017 +0800
Committer: 齐山 
Committed: Tue Jun 27 14:01:05 2017 +0800

--
 examples/vue/index.vue  |   1 +
 examples/vue/modules/websocket.vue  | 116 +++
 html5/render/vue/env/weex.js|   3 +
 html5/render/vue/modules/index.js   |   2 +
 html5/render/vue/modules/websocket/index.js |  26 +
 html5/render/vue/modules/websocket/websocket.js |  60 ++
 html5/test/render/vue/modules/websocket.js  |  11 ++
 .../Sources/Component/WXCycleSliderComponent.m  |   7 ++
 8 files changed, 226 insertions(+)
--




[09/30] incubator-weex git commit: - [html5] remove some useless code in websocket module

2017-06-28 Thread sospartan
- [html5] remove some useless code in websocket module


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

Branch: refs/heads/dev
Commit: dfc5d31b2efd44729dfe1ba3a6b22598c800f5ad
Parents: 5d31202
Author: erha19 
Authored: Fri Jun 23 16:22:50 2017 +0800
Committer: erha19 
Committed: Fri Jun 23 16:22:50 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/dfc5d31b/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 f52aa12..b430789 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -16,48 +16,44 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 /**
  * websocket module
  */
-// let instance = null
-
-export default (function () {
-  let instance = null
+export default (function() {
   const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
   const ws = {
-WebSocket: function (url, protocol) {
+INSTANCE: null,
+WebSocket: function(url, protocol) {
   if (!url) {
 return
   }
   if (!protocol) {
-instance = new WebSocket(url)
+ws.INSTANCE = new WebSocket(url)
+  } else {
+ws.INSTANCE = new WebSocket(url, protocol)
   }
-  else {
-instance = new WebSocket(url, protocol)
-  }
-  return instance
+  return ws.INSTANCE
 },
-send: function (messages) {
-  instance && instance.send(messages)
+send: function(messages) {
+  ws.INSTANCE && ws.INSTANCE.send(messages)
 },
-close: function () {
-  instance && instance.close()
+close: function() {
+  ws.INSTANCE && ws.INSTANCE.close()
 }
   }
   for (const i in registerListeners) {
 if (registerListeners.hasOwnProperty(i)) {
   Object.defineProperty(ws, registerListeners[i], {
-get: function () {
-  return instance && instance[registerListeners[i]]
+get: function() {
+  return ws.INSTANCE && ws.INSTANCE[registerListeners[i]]
 },
-set: function (fn) {
-  if (instance) {
-instance[registerListeners[i]] = fn
+set: function(fn) {
+  if (ws.INSTANCE) {
+ws.INSTANCE[registerListeners[i]] = fn
   }
 }
   })
 }
   }
   return ws
-})()
+})()
\ No newline at end of file



[21/30] incubator-weex git commit: +[ios] delete mark

2017-06-28 Thread sospartan
+[ios] delete mark

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

Branch: refs/heads/dev
Commit: 7ade9691bbf15e465d8680756a3fde524cb76302
Parents: f405ffa
Author: 齐山 
Authored: Mon Jun 26 15:42:34 2017 +0800
Committer: GitHub 
Committed: Mon Jun 26 15:42:34 2017 +0800

--
 test/pages/components/textarea-maxlength.vue | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/7ade9691/test/pages/components/textarea-maxlength.vue
--
diff --git a/test/pages/components/textarea-maxlength.vue 
b/test/pages/components/textarea-maxlength.vue
index 6c40601..a1a9ddc 100644
--- a/test/pages/components/textarea-maxlength.vue
+++ b/test/pages/components/textarea-maxlength.vue
@@ -16,17 +16,9 @@
   oninput (event) {
 this.value = event.value
 console.log('oninput:', event.value)
-//modal.toast({
-//  message: `oninput: ${event.value}`,
-//  duration: 0.8
-//})
   },
   onchange (event) {
 console.log('onchange:', event.value)
-//modal.toast({
-//  message: `onchange: ${event.value}`,
-//  duration: 0.8
-//})
   },
 }
   }
@@ -47,4 +39,4 @@
 border-color: #41B883;
 maxlength:10;
   }
-
\ No newline at end of file
+



[16/30] incubator-weex git commit: + [example] fix bug toast refect input

2017-06-28 Thread sospartan
+ [example]  fix bug toast refect  input


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

Branch: refs/heads/dev
Commit: 1a0813a653259c1b48e4ec83df6ebf655b8b917d
Parents: f60456c
Author: 齐山 
Authored: Sat Jun 24 20:15:52 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 20:15:52 2017 +0800

--
 test/pages/components/textarea-maxlength.vue | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/1a0813a6/test/pages/components/textarea-maxlength.vue
--
diff --git a/test/pages/components/textarea-maxlength.vue 
b/test/pages/components/textarea-maxlength.vue
index 503a59f..6c40601 100644
--- a/test/pages/components/textarea-maxlength.vue
+++ b/test/pages/components/textarea-maxlength.vue
@@ -16,17 +16,17 @@
   oninput (event) {
 this.value = event.value
 console.log('oninput:', event.value)
-modal.toast({
-  message: `oninput: ${event.value}`,
-  duration: 0.8
-})
+//modal.toast({
+//  message: `oninput: ${event.value}`,
+//  duration: 0.8
+//})
   },
   onchange (event) {
 console.log('onchange:', event.value)
-modal.toast({
-  message: `onchange: ${event.value}`,
-  duration: 0.8
-})
+//modal.toast({
+//  message: `onchange: ${event.value}`,
+//  duration: 0.8
+//})
   },
 }
   }



[12/30] incubator-weex git commit: + [ios] add dealloc for sliderview

2017-06-28 Thread sospartan
+ [ios] add dealloc for sliderview


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

Branch: refs/heads/dev
Commit: 43adf4012b235cd6b38727b25e790aa260106568
Parents: 49ba77f
Author: 齐山 
Authored: Fri Jun 23 17:57:10 2017 +0800
Committer: 齐山 
Committed: Fri Jun 23 17:57:10 2017 +0800

--
 ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/43adf401/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
--
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m 
b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
index 690c709..7c7fbd0 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXCycleSliderComponent.m
@@ -80,6 +80,13 @@ typedef NS_ENUM(NSInteger, Direction) {
 return self;
 }
 
+- (void)dealloc
+{
+if (_scrollView) {
+_scrollView.delegate = nil;
+}
+}
+
 - (void)layoutSubviews
 {
 [super layoutSubviews];



[08/30] incubator-weex git commit: * [andriod] catch ConcurrentModificationException

2017-06-28 Thread sospartan
* [andriod]  catch ConcurrentModificationException


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

Branch: refs/heads/dev
Commit: 25a6dbd17822b5f2cd97ff8bf67cca0b455a06c5
Parents: 9f087ec
Author: zshshr 
Authored: Thu Jun 22 22:53:39 2017 +0800
Committer: zshshr 
Committed: Thu Jun 22 22:53:39 2017 +0800

--
 .../weex/ui/component/list/BasicListComponent.java  | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/25a6dbd1/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 4f897f3..306be55 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
@@ -330,16 +330,20 @@ public abstract class BasicListComponent listeners = 
getInstance().getWXScrollListeners();
 if (listeners != null && listeners.size() > 0) {
-  for (OnWXScrollListener listener : listeners) {
-if (listener != null) {
-  if(listener instanceof ICheckBindingScroller){
-if(((ICheckBindingScroller) 
listener).isNeedScroller(getRef(),null)){
+  try {
+for (OnWXScrollListener listener : listeners) {
+  if (listener != null) {
+if (listener instanceof ICheckBindingScroller) {
+  if (((ICheckBindingScroller) 
listener).isNeedScroller(getRef(), null)) {
+listener.onScrolled(recyclerView, dx, dy);
+  }
+} else {
   listener.onScrolled(recyclerView, dx, dy);
 }
-  }else {
-listener.onScrolled(recyclerView, dx, dy);
   }
 }
+  } catch (Exception e) {
+e.printStackTrace();
   }
 }
   }



[10/30] incubator-weex git commit: + [html5] add unit test for webSocket module

2017-06-28 Thread sospartan
+ [html5] add unit test for webSocket module


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

Branch: refs/heads/dev
Commit: 323b836731f4d66a0b5836aa4ab82bc3cfa43b0a
Parents: dfc5d31
Author: erha19 
Authored: Fri Jun 23 16:23:24 2017 +0800
Committer: erha19 
Committed: Fri Jun 23 16:23:24 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/323b8367/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
new file mode 100644
index 000..28b5958
--- /dev/null
+++ b/html5/test/render/vue/modules/websocket.js
@@ -0,0 +1,11 @@
+import websocket from '../../../../render/vue/modules/websocket/websocket';
+describe('webSocket module', function() {
+  afterEach(function(done) {
+// Cleanup
+websocket.close();
+done();
+  });
+  it('should have connection lifecycle constants defined on the instance', () 
=> {
+
expect(websocket.WebSocket('wss://echo.websocket.org').CONNECTING).to.be.equal(0);
+  });
+});



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

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/MrRaindrop/incubator-weex into 
0.14-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/49ba77ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/49ba77ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/49ba77ff

Branch: refs/heads/dev
Commit: 49ba77ff11f29d7a1a704b52cf291e3f47b2ccf7
Parents: 7fc1190 06232f2
Author: tancy 
Authored: Thu Jun 22 15:16:58 2017 +0800
Committer: tancy 
Committed: Thu Jun 22 15:16:58 2017 +0800

--
 html5/render/vue/components/input.js| 52 
 .../components/scrollable/loading-indicator.js  | 11 +
 html5/render/vue/utils/style.js | 16 ++
 3 files changed, 61 insertions(+), 18 deletions(-)
--




[11/30] incubator-weex git commit: * [html5] fix websocket module dange code

2017-06-28 Thread sospartan
* [html5] fix websocket module dange 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/e6b55f7c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e6b55f7c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e6b55f7c

Branch: refs/heads/dev
Commit: e6b55f7c3bde474a75dfc9757b2e5f0b0b180d93
Parents: 323b836
Author: erha19 
Authored: Fri Jun 23 17:34:44 2017 +0800
Committer: erha19 
Committed: Fri Jun 23 17:34:44 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e6b55f7c/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 b430789..743dc1d 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -19,35 +19,36 @@
 /**
  * websocket module
  */
-export default (function() {
+export default (function () {
   const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
   const ws = {
 INSTANCE: null,
-WebSocket: function(url, protocol) {
+WebSocket: function (url, protocol) {
   if (!url) {
 return
   }
   if (!protocol) {
 ws.INSTANCE = new WebSocket(url)
-  } else {
+  }
+  else {
 ws.INSTANCE = new WebSocket(url, protocol)
   }
   return ws.INSTANCE
 },
-send: function(messages) {
+send: function (messages) {
   ws.INSTANCE && ws.INSTANCE.send(messages)
 },
-close: function() {
+close: function () {
   ws.INSTANCE && ws.INSTANCE.close()
 }
   }
   for (const i in registerListeners) {
 if (registerListeners.hasOwnProperty(i)) {
   Object.defineProperty(ws, registerListeners[i], {
-get: function() {
+get: function () {
   return ws.INSTANCE && ws.INSTANCE[registerListeners[i]]
 },
-set: function(fn) {
+set: function (fn) {
   if (ws.INSTANCE) {
 ws.INSTANCE[registerListeners[i]] = fn
   }
@@ -56,4 +57,4 @@ export default (function() {
 }
   }
   return ws
-})()
\ No newline at end of file
+})()



[27/30] incubator-weex git commit: * [android] add observer for component

2017-06-28 Thread sospartan
* [android] add observer 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/a891e2d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a891e2d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a891e2d4

Branch: refs/heads/dev
Commit: a891e2d4696444e6cca23a051f611743a28b5e0b
Parents: d26c46f
Author: sospartan 
Authored: Wed Jun 14 17:04:28 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 10:18:15 2017 +0800

--
 .../java/com/taobao/weex/ComponentObserver.java | 50 
 .../java/com/taobao/weex/WXSDKInstance.java | 17 +++
 .../taobao/weex/ui/component/WXComponent.java   | 14 ++
 3 files changed, 81 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a891e2d4/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java 
b/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java
new file mode 100644
index 000..a2bcd09
--- /dev/null
+++ b/android/sdk/src/main/java/com/taobao/weex/ComponentObserver.java
@@ -0,0 +1,50 @@
+/**
+ * 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.
+ */
+package com.taobao.weex;
+
+import android.view.View;
+
+import com.taobao.weex.ui.component.WXComponent;
+
+/**
+ * Created by sospartan on 14/06/2017.
+ */
+
+public interface ComponentObserver {
+
+  /**
+   * Called after component is create.
+   * Notice: View is not created at this moment.
+   * @param component
+   */
+  void onCreate(WXComponent component);
+
+  /**
+   * Called before component destroy.
+   * @param component
+   */
+  void onPreDestory(WXComponent component);
+
+  /**
+   * Called when component's view is created
+   * @param component
+   * @param view
+   */
+  void onViewCreated(WXComponent component,View view);
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a891e2d4/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --git a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java 
b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 2db6fb3..47b7f30 100644
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@ -141,6 +141,8 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 
   private LayoutFinishListener mLayoutFinishListener;
 
+  private ComponentObserver mComponentObserver;
+
 
   /**
* If anchor is created manually(etc. define a layout xml resource ),
@@ -275,6 +277,21 @@ public class WXSDKInstance implements 
IWXActivityStateListener,DomContext, View.
 mUserTrackAdapter=WXSDKManager.getInstance().getIWXUserTrackAdapter();
   }
 
+  /**
+   * Set a Observer for component.
+   * This observer will be called in each component, should not doing
+   * anything will impact render performance.
+   *
+   * @param observer
+   */
+  public void setComponentObserver(ComponentObserver observer){
+mComponentObserver = observer;
+  }
+
+  public ComponentObserver getComponentObserver(){
+return mComponentObserver;
+  }
+
   public NativeInvokeHelper getNativeInvokeHelper() {
 return mNativeInvokeHelper;
   }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a891e2d4/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--
diff --git 
a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java 
b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index c0d7c7a..54f822b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -41,6 +41,7 @@ 

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

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/apache/incubator-weex into 
0.14-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/5c86cf3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5c86cf3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5c86cf3c

Branch: refs/heads/dev
Commit: 5c86cf3cbedc5988a7b50ae3d967bac03764d104
Parents: d0a5e4d 49ba77f
Author: erha19 
Authored: Thu Jun 22 15:23:20 2017 +0800
Committer: erha19 
Committed: Thu Jun 22 15:23:20 2017 +0800

--
 .../ui/component/AbstractEditComponent.java |  14 +-
 .../com/taobao/weex/ui/component/Textarea.java  |   6 +
 .../taobao/weex/ui/component/WXComponent.java   |   2 +-
 .../com/taobao/weex/ui/view/WXEditText.java |   9 +-
 html5/render/vue/components/index.js|   4 +-
 html5/render/vue/components/input.js|  52 +--
 .../components/scrollable/loading-indicator.js  | 145 +--
 .../render/vue/components/scrollable/loading.js |   4 +-
 .../render/vue/components/scrollable/refresh.js |   4 +-
 html5/render/vue/mixins/style.js|  11 +-
 html5/render/vue/styles/base.css|  56 ---
 html5/render/vue/utils/func.js  |  30 
 html5/render/vue/utils/style.js |  49 +++
 13 files changed, 292 insertions(+), 94 deletions(-)
--




[22/30] incubator-weex git commit: + [ios] add comment

2017-06-28 Thread sospartan
+ [ios] add comment

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

Branch: refs/heads/dev
Commit: 24474e2b09026c4b534527598fd21fccddef032e
Parents: 7ade969
Author: 齐山 
Authored: Mon Jun 26 15:44:54 2017 +0800
Committer: GitHub 
Committed: Mon Jun 26 15:44:54 2017 +0800

--
 test/scripts/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/24474e2b/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 6e1b581..fd9fa43 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -194,7 +194,7 @@ module.exports = {
 return driver.status()
 else{
 driver._isInit = true;
-return driver.initDriver().sleep(2)
+return driver.initDriver().sleep(2) //ios cannot detect at once
 }
 },
 quit:function(driver){



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

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/MrRaindrop/incubator-weex into 
0.14-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/9e57917b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9e57917b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9e57917b

Branch: refs/heads/dev
Commit: 9e57917b91e079fdde54ac53f818d0168cebeeb9
Parents: cfe4659 4567754
Author: tancy 
Authored: Tue Jun 27 15:04:21 2017 +0800
Committer: tancy 
Committed: Tue Jun 27 15:04:21 2017 +0800

--
 html5/render/vue/README.md  | 19 +-
 .../render/vue/components/slider/slideMixin.js  | 24 +++--
 html5/render/vue/core/style.js  | 31 
 html5/render/vue/mixins/scrollable.js   | 38 
 html5/render/vue/utils/style.js | 28 +++
 package.json|  2 +-
 packages/weex-vue-render/package.json   |  2 +-
 7 files changed, 108 insertions(+), 36 deletions(-)
--




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

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of https://github.com/erha19/incubator-weex into 
0.14-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/cbc2e2d8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/cbc2e2d8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/cbc2e2d8

Branch: refs/heads/dev
Commit: cbc2e2d89b5ecd4882968c9f4e1af252f122cdac
Parents: 43adf40 96cf5de
Author: MrRaindrop 
Authored: Mon Jun 26 17:13:24 2017 +0800
Committer: MrRaindrop 
Committed: Mon Jun 26 17:13:24 2017 +0800

--
 examples/vue/index.vue  |   1 +
 examples/vue/modules/websocket.vue  | 116 +++
 html5/render/vue/env/weex.js|   3 +
 html5/render/vue/modules/index.js   |   2 +
 html5/render/vue/modules/websocket/index.js |  26 +
 html5/render/vue/modules/websocket/websocket.js |  60 ++
 html5/test/render/vue/modules/websocket.js  |  11 ++
 7 files changed, 219 insertions(+)
--




[13/30] incubator-weex git commit: + [example] macaca modify

2017-06-28 Thread sospartan
+ [example] macaca modify


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

Branch: refs/heads/dev
Commit: 41cd8dcc53b89401fa15434a83474ed2c080d993
Parents: 49ba77f
Author: 齐山 
Authored: Sat Jun 24 18:21:03 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 18:21:03 2017 +0800

--
 test/scripts/util.js | 2 +-
 test/serve.sh| 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41cd8dcc/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 50bf9ee..6e1b581 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -194,7 +194,7 @@ module.exports = {
 return driver.status()
 else{
 driver._isInit = true;
-return driver.initDriver()
+return driver.initDriver().sleep(2)
 }
 },
 quit:function(driver){

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/41cd8dcc/test/serve.sh
--
diff --git a/test/serve.sh b/test/serve.sh
index a5485e2..eb2a156 100755
--- a/test/serve.sh
+++ b/test/serve.sh
@@ -1,5 +1,4 @@
 #!/bin/bash -eu
 npm run build:vue
 npm run build:ci &
-port="${serport:-12581}"
-npm run serve:no-port -- -p $port
\ No newline at end of file
+npm run serve:no-port -- -p $serport
\ No newline at end of file



[30/30] incubator-weex git commit: Merge branch '0.14-dev' into dev

2017-06-28 Thread sospartan
Merge branch '0.14-dev' 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/44e959a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/44e959a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/44e959a4

Branch: refs/heads/dev
Commit: 44e959a418737511c3215fcabb5a121cecc3f7f1
Parents: 2510206 24fbad2
Author: sospartan 
Authored: Wed Jun 28 16:44:48 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 16:44:48 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(-)
--




[03/30] incubator-weex git commit: + [html5] add webSocket api for web platform @notdanger

2017-06-28 Thread sospartan
+ [html5] add webSocket api for web platform @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/9df3655d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/9df3655d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/9df3655d

Branch: refs/heads/dev
Commit: 9df3655d5e42bb335c09aa21d29fe03979175894
Parents: 9994583
Author: erha19 <759339...@qq.com>
Authored: Thu Jun 22 11:57:45 2017 +0800
Committer: erha19 <759339...@qq.com>
Committed: Thu Jun 22 14:41:50 2017 +0800

--
 html5/render/vue/env/weex.js|  3 +
 html5/render/vue/modules/index.js   |  2 +
 html5/render/vue/modules/websocket/index.js | 26 
 html5/render/vue/modules/websocket/websocket.js | 66 
 4 files changed, 97 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/html5/render/vue/env/weex.js
--
diff --git a/html5/render/vue/env/weex.js b/html5/render/vue/env/weex.js
index e5ae94b..9b804cb 100644
--- a/html5/render/vue/env/weex.js
+++ b/html5/render/vue/env/weex.js
@@ -78,6 +78,9 @@ const weex = {
 if (!weexModules[name]) {
   weexModules[name] = {}
 }
+if (!!meta && meta.mountType === 'full') {
+  weexModules[name] = module
+}
 for (const key in module) {
   if (module.hasOwnProperty(key)) {
 weexModules[name][key] = utils.bind(module[key], this)

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/html5/render/vue/modules/index.js
--
diff --git a/html5/render/vue/modules/index.js 
b/html5/render/vue/modules/index.js
index 4237f9d..27f0592 100644
--- a/html5/render/vue/modules/index.js
+++ b/html5/render/vue/modules/index.js
@@ -33,6 +33,7 @@ import globalEvent from './globalEvent'
 import modal from './modal'
 import navigator from './navigator'
 import webview from './webview'
+import websocket from './websocket'
 
 const legacyModules = {
   event,
@@ -57,6 +58,7 @@ export default {
   weex.install(legacyModules[k])
 }
 weex.install(modal)
+weex.install(websocket)
 for (const k in modules) {
   weex.registerModule(k, modules[k])
 }

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/html5/render/vue/modules/websocket/index.js
--
diff --git a/html5/render/vue/modules/websocket/index.js 
b/html5/render/vue/modules/websocket/index.js
new file mode 100644
index 000..273ed58
--- /dev/null
+++ b/html5/render/vue/modules/websocket/index.js
@@ -0,0 +1,26 @@
+/*
+ * 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 websocket from './websocket'
+
+// TODO: rewrite the module meta
+export default {
+  init: function (Weex) {
+Weex.registerModule('webSocket', websocket, { mountType: 'full' })
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9df3655d/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
new file mode 100644
index 000..c5cfa26
--- /dev/null
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -0,0 +1,66 @@
+/*
+ * 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
+ * 

[29/30] incubator-weex git commit: Merge branch '0.14-dev' of gitlab.alibaba-inc.com:weex/weex into 0.14-dev

2017-06-28 Thread sospartan
Merge branch '0.14-dev' of gitlab.alibaba-inc.com:weex/weex into 0.14-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/24fbad2f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/24fbad2f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/24fbad2f

Branch: refs/heads/dev
Commit: 24fbad2f0e0735427c1cb2bf87f68f2a50c094ad
Parents: 5d75a6f 25a6dbd
Author: sospartan 
Authored: Wed Jun 28 10:24:00 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 10:24:00 2017 +0800

--
 android/sdk/libs/armeabi/libweexjsc.so  | Bin 7575352 -> 7570504 bytes
 android/sdk/libs/x86/libweexjsc.so  | Bin 12130116 -> 12121924 
bytes
 .../ui/component/list/BasicListComponent.java   |  16 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)
--




[01/30] incubator-weex git commit: + [html5] support placeholder-color for input. @notdanger.

2017-06-28 Thread sospartan
Repository: incubator-weex
Updated Branches:
  refs/heads/dev 2510206f4 -> 44e959a41


+ [html5] support placeholder-color for input. @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/06232f2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/06232f2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/06232f2b

Branch: refs/heads/dev
Commit: 06232f2bcdd59ffa50e7e24354b4b12e89569acd
Parents: 76ab14b
Author: MrRaindrop 
Authored: Thu Jun 22 12:05:12 2017 +0800
Committer: MrRaindrop 
Committed: Thu Jun 22 12:09:01 2017 +0800

--
 html5/render/vue/components/input.js| 52 
 .../components/scrollable/loading-indicator.js  | 11 +
 html5/render/vue/utils/style.js | 16 ++
 3 files changed, 61 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/06232f2b/html5/render/vue/components/input.js
--
diff --git a/html5/render/vue/components/input.js 
b/html5/render/vue/components/input.js
index cc8059e..1454988 100644
--- a/html5/render/vue/components/input.js
+++ b/html5/render/vue/components/input.js
@@ -23,9 +23,13 @@
  */
 import { extractComponentStyle, createEventMap } from '../core'
 import { inputCommon } from '../mixins'
-import { extend, mapFormEvents } from '../utils'
+import { extend, mapFormEvents, appendCss } from '../utils'
 // import { validateStyles } from '../validator'
 
+const ID_PREFIX_PLACEHOLDER_COLOR = 'wipt_plc_'
+const ID_PREFIX_INPUT = 'wipt_'
+let idCount = 0
+
 const _css = `
 .weex-input, .weex-textarea {
   font-size: 0.426667rem;
@@ -35,6 +39,35 @@ const _css = `
 }
 `
 
+function setPlaceholderColor (inputVm, placeholderColor) {
+  if (!placeholderColor) {
+return
+  }
+  const vendors = [
+'::-webkit-input-placeholder',
+':-moz-placeholder',
+'::-moz-placeholder',
+':-ms-input-placeholder',
+':placeholder-shown'
+  ]
+  const id = inputVm._id
+  appendCss(
+vendors.map(function (vendor, idx) {
+  return 
`#${ID_PREFIX_INPUT}${id}${vendors[idx]}{color:${placeholderColor};}`
+}).join(''),
+`${ID_PREFIX_PLACEHOLDER_COLOR}${id}`,
+true)
+}
+
+function processStyle (vm) {
+  const styles = extractComponentStyle(vm)
+  const phColor = styles.placeholderColor
+  if (phColor) {
+setPlaceholderColor(vm, phColor)
+  }
+  return styles
+}
+
 export default {
   mixins: [inputCommon],
   props: {
@@ -43,10 +76,11 @@ export default {
   default: 'text',
   validator (value) {
 return [
-  'email', 'number', 'password', 'search', 'tel', 'text', 'url'
+  'email', 'number', 'password', 'search', 'tel', 'text', 'url', 
'date',
+  'datetime', 'time'
   // unsupported type:
-  // button, checkbox, color, date, datetime, file, hidden, image,
-  // month, radio, range, reset, submit, time, week,
+  // button, checkbox, color, file, hidden, image,
+  // month, radio, range, reset, submit, week,
 ].indexOf(value) !== -1
   }
 },
@@ -65,15 +99,15 @@ export default {
   },
 
   render (createElement) {
-/* istanbul ignore next */
-// if (process.env.NODE_ENV === 'development') {
-//   validateStyles('input', this.$vnode.data && 
this.$vnode.data.staticStyle)
-// }
+if (!this._id) {
+  this._id = idCount++
+}
 const events = extend(createEventMap(this), mapFormEvents(this))
 this._renderHook()
 return createElement('html:input', {
   attrs: {
 'weex-type': 'input',
+id: `${ID_PREFIX_INPUT}${this._id}`,
 type: this.type,
 value: this.value,
 disabled: (this.disabled !== 'false' && this.disabled !== false),
@@ -87,7 +121,7 @@ export default {
   },
   on: this.createKeyboardEvent(events),
   staticClass: 'weex-input weex-el',
-  staticStyle: extractComponentStyle(this)
+  staticStyle: processStyle(this)
 })
   },
   _css

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/06232f2b/html5/render/vue/components/scrollable/loading-indicator.js
--
diff --git a/html5/render/vue/components/scrollable/loading-indicator.js 
b/html5/render/vue/components/scrollable/loading-indicator.js
index 37129fd..59f141e 100644
--- a/html5/render/vue/components/scrollable/loading-indicator.js
+++ b/html5/render/vue/components/scrollable/loading-indicator.js
@@ -17,7 +17,7 @@
  * under the License.
  */
 import { extractComponentStyle } from '../../core'
-import { getRgb, loopArray } from '../../utils'
+import { getRgb, loopArray, getStyleSheetById } from 

[14/30] incubator-weex git commit: + [example] update maraca

2017-06-28 Thread sospartan
+ [example] update maraca


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

Branch: refs/heads/dev
Commit: f4b0b46fa8ef470f8d02044c4049a91fb5ccdc03
Parents: 41cd8dc
Author: 齐山 
Authored: Sat Jun 24 18:59:43 2017 +0800
Committer: 齐山 
Committed: Sat Jun 24 18:59:43 2017 +0800

--
 test/scripts/util.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f4b0b46f/test/scripts/util.js
--
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 6e1b581..74d966e 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -125,7 +125,7 @@ module.exports = {
 return ( isRunInCI ? 60 : 10 ) * 60 * 1000;
 },
 getGETActionWaitTimeMills:function(){
-return (isRunInCI ? 120 : 5 ) * 1000;
+return (isRunInCI ? 5 : 1 ) * 1000;
 },
 diffImage, 
 createDriver:function(wd){



[04/30] incubator-weex git commit: + [html5] add example for webSocket

2017-06-28 Thread sospartan
+ [html5] add example for webSocket


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

Branch: refs/heads/dev
Commit: d0a5e4d1f8195623e021b25dd8f19163b6320c2f
Parents: 9df3655
Author: erha19 <759339...@qq.com>
Authored: Thu Jun 22 14:52:21 2017 +0800
Committer: erha19 <759339...@qq.com>
Committed: Thu Jun 22 14:52:21 2017 +0800

--
 examples/vue/index.vue |   1 +
 examples/vue/modules/websocket.vue | 116 
 2 files changed, 117 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0a5e4d1/examples/vue/index.vue
--
diff --git a/examples/vue/index.vue b/examples/vue/index.vue
index 69d867d..ebea3ad 100644
--- a/examples/vue/index.vue
+++ b/examples/vue/index.vue
@@ -34,6 +34,7 @@
   // module
   {name: root + '/modules/instance-api', title: 'Instance API'},
   {name: root + '/modules/modal', title: 'Modal'},
+  {name: root + '/modules/webSocket', title: 'WebSocket'},
   {name: root + '/modules/stream', title: 'Stream'},
   {name: root + '/modules/storage',title:'Storage'},
   // {name: 'module/clipboard', title: 'Clipboard'}, // 0.8 , 
developing

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0a5e4d1/examples/vue/modules/websocket.vue
--
diff --git a/examples/vue/modules/websocket.vue 
b/examples/vue/modules/websocket.vue
new file mode 100644
index 000..72d7ea1
--- /dev/null
+++ b/examples/vue/modules/websocket.vue
@@ -0,0 +1,116 @@
+
+  
+
+  
+websocket
+  
+  
+  
+connect
+send
+close
+  
+  
+method = close
+  
+  {{closeinfo}}
+  
+method = send
+  
+  {{sendinfo}}
+  
+method = onopen
+  
+  {{onopeninfo}}
+  
+method = onmessage
+  
+  {{onmessage}}
+  
+method = onclose
+  
+  {{oncloseinfo}}
+  
+method = onerror
+  
+  {{onerrorinfo}}
+
+  
+
+
+
+  .input {
+font-size: 40px;
+height: 80px;
+width: 600px;
+  }
+  
+  .button {
+font-size: 36px;
+width: 150px;
+color: #41B883;
+text-align: center;
+padding-top: 25px;
+padding-bottom: 25px;
+border-width: 2px;
+border-style: solid;
+margin-right: 20px;
+border-color: rgb(162, 217, 192);
+background-color: rgba(162, 217, 192, 0.2);
+  }
+
+
+
+  var websocket = weex.requireModule('webSocket')
+  export default {
+data() {
+  return {
+connectinfo: '',
+sendinfo: '',
+onopeninfo: '',
+onmessage: '',
+oncloseinfo: '',
+onerrorinfo: '',
+closeinfo: '',
+txtInput: '',
+navBarHeight: 88,
+title: 'Navigator',
+dir: 'examples',
+baseURL: ''
+  }
+},
+methods: {
+  connect: function() {
+websocket.WebSocket('ws://echo.websocket.org', '');
+var self = this;
+self.onopeninfo = 'connecting...'
+websocket.onopen = function(e) {
+  self.onopeninfo = 'websocket open';
+}
+websocket.onmessage = function(e) {
+  self.onmessage = e.data;
+}
+websocket.onerror = function(e) {
+  self.onerrorinfo = e.data;
+}
+websocket.onclose = function(e) {
+  self.onopeninfo = '';
+  self.oncloseinfo = e.code;
+}
+  },
+  send: function(e) {
+var input = this.$refs.input;
+input.blur();
+websocket.send(this.txtInput);
+this.sendinfo = this.txtInput;
+  },
+  oninput: function(event) {
+this.txtInput = event.value;
+  },
+  close: function(e) {
+this.closeinfo = 'close connect';
+websocket.close();
+  },
+},
+  }
+
\ No newline at end of file



[18/30] incubator-weex git commit: * [html5] fix lint error in webSocket test code

2017-06-28 Thread sospartan
 * [html5] fix lint error in webSocket 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/96cf5de6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/96cf5de6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/96cf5de6

Branch: refs/heads/dev
Commit: 96cf5de6399ed8ad741e5d8eeac06feee0c3430e
Parents: e6b55f7
Author: erha19 
Authored: Sat Jun 24 21:20:19 2017 +0800
Committer: erha19 
Committed: Sat Jun 24 21:20:19 2017 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/96cf5de6/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 28b5958..f3534ef 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -1,11 +1,11 @@
-import websocket from '../../../../render/vue/modules/websocket/websocket';
-describe('webSocket module', function() {
-  afterEach(function(done) {
+import websocket from '../../../../render/vue/modules/websocket/websocket'
+describe('webSocket module', function () {
+  afterEach(function (done) {
 // Cleanup
-websocket.close();
-done();
-  });
+websocket.close()
+done()
+  })
   it('should have connection lifecycle constants defined on the instance', () 
=> {
-
expect(websocket.WebSocket('wss://echo.websocket.org').CONNECTING).to.be.equal(0);
-  });
-});
+
expect(websocket.WebSocket('wss://echo.websocket.org').CONNECTING).to.be.equal(0)
+  })
+})



[28/30] incubator-weex git commit: Merge branch '0.14-dev-component-observer' into 0.14-dev

2017-06-28 Thread sospartan
Merge branch '0.14-dev-component-observer' into 0.14-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/5d75a6f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/5d75a6f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/5d75a6f2

Branch: refs/heads/dev
Commit: 5d75a6f237552b227934e18b0da23d51a7b688c6
Parents: 9e57917 a891e2d
Author: sospartan 
Authored: Wed Jun 28 10:23:38 2017 +0800
Committer: sospartan 
Committed: Wed Jun 28 10:23:38 2017 +0800

--
 .../java/com/taobao/weex/ComponentObserver.java | 50 
 .../java/com/taobao/weex/WXSDKInstance.java | 16 +++
 .../taobao/weex/ui/component/WXComponent.java   | 14 ++
 3 files changed, 80 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d75a6f2/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
--
diff --cc android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
index 5533843,47b7f30..a8d8a60
--- a/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
+++ b/android/sdk/src/main/java/com/taobao/weex/WXSDKInstance.java
@@@ -141,8 -141,9 +141,9 @@@ public class WXSDKInstance implements I
  
private LayoutFinishListener mLayoutFinishListener;
  
 +  private boolean mCurrentGround = false;
+   private ComponentObserver mComponentObserver;
  
 -
/**
 * If anchor is created manually(etc. define a layout xml resource ),
 * be aware do not add it to twice when {@link 
IWXRenderListener#onViewCreated(WXSDKInstance, View)}.

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/5d75a6f2/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
--



[GitHub] incubator-weex issue #478: + [android] Change the default behavior of imageQ...

2017-06-28 Thread YorkShen
Github user YorkShen commented on the issue:

https://github.com/apache/incubator-weex/pull/478
  
No JIRA issue needed.


---
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 #478: + [android] Change the default behavior of imageQ...

2017-06-28 Thread weex-bot
Github user weex-bot commented on the issue:

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




  

  
  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. 

  




  

  
  Messages

  
  
  :book:
  According to the blame info, we recommended @luics , @sospartan 
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.
---


[GitHub] incubator-weex pull request #478: + [android] Change the default behavior of...

2017-06-28 Thread YorkShen
GitHub user YorkShen opened a pull request:

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

+ [android] Change the default behavior of imageQuality



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

$ git pull https://github.com/YorkShen/incubator-weex android-imageQuality

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

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


commit 2c248325d808cf3780c96a2d1dafbe2cd4a86038
Author: YorkShen 
Date:   2017-06-14T09:39:42Z

* [android] Add RAW and None for imageQuality

commit ddc9c3d18dcf4593e8e4eab76084ed9078229c0a
Author: YorkShen 
Date:   2017-06-27T07:57:20Z

- [android] Remove Raw from imageQuality

commit 5b1cf3854b3bc4bea9ec7b4a3beca634073e38df
Author: YorkShen 
Date:   2017-06-28T07:26:48Z

* [android] Change the default value of img quality.

commit df3f903417386cb1ec31ccaa42632e211625db26
Author: YorkShen 
Date:   2017-06-28T07:32:44Z

* [android] Remove raw




---
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: * [ios] try to fix text crash when draw it

2017-06-28 Thread acton393
Repository: incubator-weex
Updated Branches:
  refs/heads/0.15-dev 43bd95bb3 -> 4a33ccdb6


* [ios] try to fix text crash when draw it


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

Branch: refs/heads/0.15-dev
Commit: 4a33ccdb6c979fd9e9bccf9d7c3ff3dd5148dfdf
Parents: 43bd95b
Author: acton393 
Authored: Wed Jun 28 14:52:55 2017 +0800
Committer: acton393 
Committed: Wed Jun 28 14:52:55 2017 +0800

--
 ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4a33ccdb/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
--
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m 
b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
index 43976bd..6cbe8e0 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXTextComponent.m
@@ -640,8 +640,12 @@ do {\
 if (_coreTextFrameRef) {
 CFRelease(_coreTextFrameRef);
 }
-_coreTextFrameRef = CTFramesetterCreateFrame([self ctFramesetterRef], 
CFRangeMake(0, 0), cgPath, NULL);
+_coreTextFrameRef = CTFramesetterCreateFrame([self ctFramesetterRef], 
CFRangeMake(0, attributedStringCopy.length), cgPath, NULL);
 CFArrayRef ctLines = NULL;
+if (NULL == _coreTextFrameRef) {
+// try to protect crash from frame is NULL
+return;
+}
 ctLines = CTFrameGetLines(_coreTextFrameRef);
 CFIndex lineCount = CFArrayGetCount(ctLines);
 NSMutableArray * mutableLines = [NSMutableArray new];
@@ -853,6 +857,10 @@ do {\
 CGPathRelease(path);
 
 CFArrayRef lines = NULL;
+if (NULL == frameRef) {
+//try to protect unexpected crash.
+return suggestSize;
+}
 lines = CTFrameGetLines(frameRef);
 CFIndex lineCount = CFArrayGetCount(lines);
 CGFloat ascent = 0;



[GitHub] incubator-weex pull request #477: + [Android] Add "pseudoRef" and "itemClick...

2017-06-28 Thread YorkShen
Github user YorkShen closed the pull request at:

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


---
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.
---