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

Unified Diff: third_party/polymer/v0_8/components-chromium/polymer/src/lib/bind/effects-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 7 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: third_party/polymer/v0_8/components-chromium/polymer/src/lib/bind/effects-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/polymer/src/lib/bind/effects-extracted.js b/third_party/polymer/v0_8/components-chromium/polymer/src/lib/bind/effects-extracted.js
deleted file mode 100644
index d106015680f2147d9049085153c06d62dbf8b92c..0000000000000000000000000000000000000000
--- a/third_party/polymer/v0_8/components-chromium/polymer/src/lib/bind/effects-extracted.js
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
- Polymer.Base.extend(Polymer.Bind, {
-
- _shouldAddListener: function(effect) {
- return effect.name &&
- effect.mode === '{' &&
- !effect.negate &&
- effect.kind != 'attribute'
- ;
- },
-
- annotationEffect: function(source, value, effect) {
- if (source != effect.value) {
- value = this.getPathValue(effect.value);
- this._data[effect.value] = value;
- }
- var calc = effect.negate ? !value : value;
- return this._applyEffectValue(calc, effect);
- },
-
- reflectEffect: function(source) {
- this.reflectPropertyToAttribute(source);
- },
-
- notifyEffect: function(source) {
- this._notifyChange(source);
- },
-
- // Raw effect for extension; effect.function is an actual function
- functionEffect: function(source, value, effect, old) {
- effect.function.call(this, source, value, effect, old);
- },
-
- observerEffect: function(source, value, effect, old) {
- this[effect.method](value, old);
- },
-
- complexObserverEffect: function(source, value, effect) {
- var args = Polymer.Bind._marshalArgs(this._data, effect, source, value);
- if (args) {
- this[effect.method].apply(this, args);
- }
- },
-
- computeEffect: function(source, value, effect) {
- var args = Polymer.Bind._marshalArgs(this._data, effect, source, value);
- if (args) {
- this[effect.property] = this[effect.method].apply(this, args);
- }
- },
-
- annotatedComputationEffect: function(source, value, effect) {
- var args = Polymer.Bind._marshalArgs(this._data, effect, source, value);
- if (args) {
- var computedHost = this._rootDataHost || this;
- var computedvalue =
- computedHost[effect.method].apply(computedHost, args);
- this._applyEffectValue(computedvalue, effect);
- }
- },
-
- // path & value are used to fill in wildcard descriptor when effect is
- // being called as a result of a path notification
- _marshalArgs: function(model, effect, path, value) {
- var values = [];
- var args = effect.args;
- for (var i=0, l=args.length; i<l; i++) {
- var arg = args[i];
- var name = arg.name;
- var v = arg.structured ?
- Polymer.Base.getPathValue(name, model) : model[name];
- if (v === undefined) {
- return;
- }
- if (arg.wildcard) {
- // Only send the actual path changed info if the change that
- // caused the observer to run matched the wildcard
- var baseChanged = (name.indexOf(path + '.') === 0);
- var matches = (effect.arg.name.indexOf(name) === 0 && !baseChanged);
- values[i] = {
- path: matches ? path : name,
- value: matches ? value : v,
- base: v
- };
- } else {
- values[i] = v;
- }
- }
- return values;
- }
-
- });
-

Powered by Google App Engine
This is Rietveld 408576698