Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: pkg/polymer_expressions/lib/polymer_expressions.dart

Issue 26649002: Fix bug in polymer expressions where input-value bindings are incorrectly (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * A binding delegate used with Polymer elements that 6 * A binding delegate used with Polymer elements that
7 * allows for complex binding expressions, including 7 * allows for complex binding expressions, including
8 * property access, function invocation, 8 * property access, function invocation,
9 * list/map indexing, and two-way filtering. 9 * list/map indexing, and two-way filtering.
10 * 10 *
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 _value = (_converter == null) ? v : _converter(v); 117 _value = (_converter == null) ? v : _converter(v);
118 } 118 }
119 notifyChange(new PropertyChangeRecord(_VALUE)); 119 notifyChange(new PropertyChangeRecord(_VALUE));
120 } 120 }
121 121
122 get value => _value; 122 get value => _value;
123 123
124 set value(v) { 124 set value(v) {
125 try { 125 try {
126 assign(_expr, v, _scope); 126 assign(_expr, v, _scope);
127 notifyChange(new PropertyChangeRecord(_VALUE));
Siggi Cherem (dart-lang) 2013/10/09 03:25:54 to clarify: - a change in the input element will u
justinfagnani 2013/10/09 19:00:59 I think I tried removing this and ran into other i
Jennifer Messerly 2013/10/09 19:04:37 probably the right fix is: try { var oldValue =
128 } on EvalException catch (e) { 127 } on EvalException catch (e) {
129 // silently swallow binding errors 128 // silently swallow binding errors
130 } 129 }
131 } 130 }
132 131
133 getValueWorkaround(key) { 132 getValueWorkaround(key) {
134 if (key == _VALUE) return value; 133 if (key == _VALUE) return value;
135 } 134 }
136 135
137 setValueWorkaround(key, v) { 136 setValueWorkaround(key, v) {
138 if (key == _VALUE) value = v; 137 if (key == _VALUE) value = v;
139 } 138 }
140 139
141 } 140 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698