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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: pkg/polymer_expressions/lib/polymer_expressions.dart
diff --git a/pkg/polymer_expressions/lib/polymer_expressions.dart b/pkg/polymer_expressions/lib/polymer_expressions.dart
index ddb85fe667a7ff15401e582f9994c561c67f50b5..3cee82067c542d0d11497846e217746156900e14 100644
--- a/pkg/polymer_expressions/lib/polymer_expressions.dart
+++ b/pkg/polymer_expressions/lib/polymer_expressions.dart
@@ -91,8 +91,6 @@ class PolymerExpressions extends BindingDelegate {
}
class _Binding extends Object with ChangeNotifierMixin {
- static const _VALUE = const Symbol('value');
-
final Scope _scope;
final ExpressionObserver _expr;
final _converter;
@@ -113,6 +111,7 @@ class _Binding extends Object with ChangeNotifierMixin {
}
_setValue(v) {
+ var oldValue = _value;
if (v is Comprehension) {
// convert the Comprehension into a list of scopes with the loop
// variable added to the scope
@@ -125,7 +124,7 @@ class _Binding extends Object with ChangeNotifierMixin {
} else {
_value = (_converter == null) ? v : _converter(v);
}
- notifyChange(new PropertyChangeRecord(_VALUE));
+ notifyPropertyChange(#value, oldValue, _value);
}
get value => _value;
@@ -133,17 +132,8 @@ class _Binding extends Object with ChangeNotifierMixin {
set value(v) {
try {
assign(_expr, v, _scope);
- notifyChange(new PropertyChangeRecord(_VALUE));
} on EvalException catch (e) {
// silently swallow binding errors
}
}
-
- getValueWorkaround(key) {
- if (key == _VALUE) return value;
- }
-
- setValueWorkaround(key, v) {
- if (key == _VALUE) value = v;
- }
}

Powered by Google App Engine
This is Rietveld 408576698