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/04/13 02:32:01 UTC

[07/23] incubator-weex git commit: * [html5] rm stylesheet node which is already analyzed and saved in styleMap.

* [html5] rm stylesheet node which is already analyzed and saved in styleMap.


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

Branch: refs/heads/0.12-dev
Commit: 40f600eeeb92558c9478bc2970fa8f676c76f734
Parents: b7b81f3
Author: MrRaindrop <te...@gmail.com>
Authored: Thu Apr 6 18:21:21 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Thu Apr 6 18:21:21 2017 +0800

----------------------------------------------------------------------
 html5/render/vue/core/style.js | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/40f600ee/html5/render/vue/core/style.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/core/style.js b/html5/render/vue/core/style.js
index 1b5db77..45a4103 100644
--- a/html5/render/vue/core/style.js
+++ b/html5/render/vue/core/style.js
@@ -68,6 +68,13 @@ export function getHeadStyleMap () {
             return styleObj
           }, {})
       })
+      /**
+       * remove this styleSheet node since it's in the styleMap already. And this style
+       * should only be fetched and used from styleMap to generate the final combined
+       * component style, not from the stylesheet itself.
+       */
+      const node = styleSheet.ownerNode
+      node.parentNode.removeChild(node)
       return pre
     }, {})
   if (process.env.NODE_ENV === 'development') {