From ab62e4172806d4741c80ed1206a5b4ef6d552fb9 Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Wed, 30 Oct 2013 14:48:24 -0700 Subject: [PATCH] Enter a description of the change. discard optimization to use cloneNode deep in some cases R=arv BUG= Review URL: https://codereview.appspot.com/20030043 --- src/TemplateBinding.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/TemplateBinding.js b/src/TemplateBinding.js index 86ad2e2..22cba89 100644 --- a/src/TemplateBinding.js +++ b/src/TemplateBinding.js @@ -530,8 +530,7 @@ content.bindingMap_ = map; } - var instance = map.hasSubTemplate ? - deepCloneIgnoreTemplateContent(content) : content.cloneNode(true); + var instance = deepCloneIgnoreTemplateContent(content); addMapBindings(instance, map, model, delegate, bound); // TODO(rafaelw): We can do this more lazily, but setting a sentinel @@ -810,7 +809,6 @@ node.isTemplate_ = true; map = map || []; map.templateRef = node; - map.hasSubTemplate = true; } var child = node.firstChild, index = 0; @@ -822,8 +820,6 @@ map = map || []; map.children = map.children || {}; map.children[index] = childMap; - if (childMap.hasSubTemplate) - map.hasSubTemplate = true; } return map;