You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ta...@apache.org on 2017/05/25 02:46:05 UTC
[23/50] incubator-weex git commit: * [html5] fix flex 1 in old
devices.
* [html5] fix flex 1 in old devices.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/d0057518
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/d0057518
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/d0057518
Branch: refs/heads/0.13-dev
Commit: d00575182d715e063d00807c09b0a6b9b49c6163
Parents: e2dd9bf
Author: MrRaindrop <te...@gmail.com>
Authored: Mon May 15 10:17:42 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Mon May 15 10:17:42 2017 +0800
----------------------------------------------------------------------
html5/render/vue/core/style.js | 6 +++---
html5/render/vue/utils/style.js | 8 +++++++-
2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0057518/html5/render/vue/core/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/core/style.js b/html5/render/vue/core/style.js
index 0003ad7..74b4c9b 100644
--- a/html5/render/vue/core/style.js
+++ b/html5/render/vue/core/style.js
@@ -22,11 +22,11 @@ import {
extend,
extendTruthy,
trimComment,
- normalizeStyle
+ normalizeStyle,
+ autoPrefix
} from '../utils'
import { tagBegin, tagEnd } from '../utils/perf'
/* istanbul ignore next */
-import addPrefix from 'inline-style-prefixer/static'
/**
* get scoped class style map from stylesheets in <head>.
@@ -204,7 +204,7 @@ export function getComponentStyle (context, extract) {
extend(style, getStyle(vnode, extract))
vnode = vnode.parent
}
- style = addPrefix(style)
+ style = autoPrefix(style)
/**
* when prefixed value is a array, it should be applied to element
* during the next tick.
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/d0057518/html5/render/vue/utils/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/utils/style.js b/html5/render/vue/utils/style.js
index 3287535..65e94f2 100644
--- a/html5/render/vue/utils/style.js
+++ b/html5/render/vue/utils/style.js
@@ -119,7 +119,13 @@ export function normalizeString (styleKey: string, styleVal: string): string {
}
export function autoPrefix (style: {}): {} {
- return addPrefix(style)
+ const prefixed = addPrefix(style)
+ // flex only added WebkitFlex. Should add WebkitBoxFlex also.
+ const flex = prefixed.flex
+ if (flex) {
+ prefixed.WebkitBoxFlex = flex
+ }
+ return prefixed
}
export function normalizeNumber (styleKey: string, styleVal: number): string {