From 526fa3c545fffcb1379793b353b0ebd1eea408a9 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Thu, 3 Dec 2015 12:05:12 -0800 Subject: [PATCH] Ensure literals are excluded from parent props. Fixes #3128. Fixes #3121. --- src/standard/annotations.html | 11 ++++++++--- src/standard/effectBuilder.html | 4 ++-- test/unit/templatizer-elements.html | 4 +++- test/unit/templatizer.html | 5 +++++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/standard/annotations.html b/src/standard/annotations.html index 8f95261d3d..28ce066420 100644 --- a/src/standard/annotations.html +++ b/src/standard/annotations.html @@ -130,8 +130,8 @@ this._notes = this._template._content._notes; } else { this._notes = Polymer.Annotations.parseAnnotations(this._template); + this._processAnnotations(this._notes); } - this._processAnnotations(this._notes); Polymer.Annotations.prepElement = null; } }, @@ -188,10 +188,15 @@ if (p.signature) { var args = p.signature.args; for (var kk=0; kk 0; if (a.structured) { diff --git a/test/unit/templatizer-elements.html b/test/unit/templatizer-elements.html index 395787a633..e56e46687a 100644 --- a/test/unit/templatizer-elements.html +++ b/test/unit/templatizer-elements.html @@ -11,6 +11,7 @@ obj="{{obj}}" obj-prop="{{obj.prop}}" conflict="{{outerInnerConflict.prop}}" + computed-from-literal="{{computeFromLiteral(33, prop)}}" > @@ -238,7 +239,8 @@ ], outerObjChanged: function() {}, objAChanged: function() {}, - objBChanged: function() {} + objBChanged: function() {}, + computeFromLiteral: function() {} }); diff --git a/test/unit/templatizer.html b/test/unit/templatizer.html index 0ba1481ed3..a2538b26cc 100644 --- a/test/unit/templatizer.html +++ b/test/unit/templatizer.html @@ -250,6 +250,11 @@ assert.equal(childA.conflict, 'bar'); }); + test('ensure literals are not forwarded to templates', function() { + assert.notOk(host._propertyEffects[33]); + assert.notOk(Object.getOwnPropertyDescriptor(Object.getPrototypeOf(host), 33)); + }); + });