You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/03/14 04:00:08 UTC

[4/5] incubator-weex git commit: Merge branch '0.11-bugfix-chuyi' of http://github.com/Rowandjj/incubator-weex into 0.11-dev This closes #99

Merge branch '0.11-bugfix-chuyi' of http://github.com/Rowandjj/incubator-weex into 0.11-dev
This closes #99


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

Branch: refs/heads/0.11-dev
Commit: 9598679f3af7365c670bc22609e719ec77c9d1f1
Parents: 4fc5514 df001bb
Author: sospartan <so...@gmail.com>
Authored: Tue Mar 14 11:57:02 2017 +0800
Committer: sospartan <so...@gmail.com>
Committed: Tue Mar 14 11:57:02 2017 +0800

----------------------------------------------------------------------
 .../com/taobao/weex/common/WXImageStrategy.java |  2 +-
 .../main/java/com/taobao/weex/dom/WXStyle.java  | 25 ++------
 .../com/taobao/weex/ui/component/WXImage.java   | 61 ++++++++++++++++++--
 .../java/com/taobao/weex/dom/WXStyleTest.java   | 23 +-------
 .../taobao/weex/utils/FunctionParserTest.java   | 11 ++--
 5 files changed, 71 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/9598679f/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
----------------------------------------------------------------------
diff --cc android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
index 9c189ce,d9db03f..f51b185
--- a/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
+++ b/android/sdk/src/main/java/com/taobao/weex/dom/WXStyle.java
@@@ -241,29 -242,15 +242,15 @@@ public class WXStyle implements Map<Str
  
  
    public WXStyle(){
 -    map = new ArrayMap<>();
 +    mStyles = new ArrayMap<>();
    }
  
-   public int getBlur() {
-     try {
-       if(get(Constants.Name.FILTER) == null) {
-         return 0;
-       }
-       String value = get(Constants.Name.FILTER).toString().trim();
-       int start = value.indexOf("blur(");
-       int end = value.indexOf("px)");
-       if(end == -1) {
-         end = value.indexOf(")");
-       }
-       if(start == 0 && start < end) {
-         int blur = Integer.parseInt(value.substring(5,end));
-         //unlike css blur filter(https://developer.mozilla.org/en-US/docs/Web/CSS/filter),in weex
-         //we specify the blur radius in [0,10] to improve performance and avoid potential oom issue.
-         return Math.min(10,Math.max(0,blur));
-       }
-     }catch (NumberFormatException e) {
+   @Nullable
+   public String getBlur() {
+     if(get(Constants.Name.FILTER) == null) {
+       return null;
      }
-     return 0;
+     return get(Constants.Name.FILTER).toString().trim();
    }
  
    /*