Skip to content

Commit

Permalink
Merge pull request #4571 from Polymer/4550-remove-disable-upgrade
Browse files Browse the repository at this point in the history
Removes the `disable-upgrade` feature from Polymer 2.0.
  • Loading branch information
Steve Orvell authored Apr 28, 2017
2 parents c46c577 + 972b2ba commit a284d77
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 281 deletions.
20 changes: 2 additions & 18 deletions lib/mixins/element-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@

let caseMap = Polymer.CaseMap;

const DISABLED = 'disable-upgrade';

/**
* Returns the `properties` object specifically on `klass`. Use for:
* (1) super chain mixes togther to make `propertiesForClass` which is
Expand Down Expand Up @@ -453,8 +451,6 @@
proto._bindTemplate(template);
}

function flushPropertiesStub() {}

/**
* @polymerMixinClass
* @unrestricted
Expand All @@ -472,7 +468,7 @@
*/
static get observedAttributes() {
if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) {
let list = [DISABLED];
let list = [];
let properties = propertiesForClass(this);
for (let prop in properties) {
list.push(Polymer.CaseMap.camelToDashCase(prop));
Expand Down Expand Up @@ -720,19 +716,7 @@
* @override
*/
attributeChangedCallback(name, old, value) {
// process `disable-upgrade` specially:
// First we see `disable-upgrade` added and disable `_flushProperties`,
// then when it's removed, restore regular flushing and flush.
// This should only be allowed before "readying".
if (name === DISABLED && !this.__dataInitialized) {
if (value !== null) {
this.__flushProperties = this._flushProperties;
this._flushProperties = flushPropertiesStub;
} else {
this._flushProperties = this.__flushProperties;
this._flushProperties();
}
} else if (old !== value) {
if (old !== value) {
let property = caseMap.dashToCamelCase(name);
let type = propertiesForClass(this.constructor)[property].type;
if (!this._hasReadOnlyEffect(property)) {
Expand Down
5 changes: 0 additions & 5 deletions lib/mixins/template-stamp.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@
*/
class TemplateStamp extends superClass {

_initializeProperties() {
super._initializeProperties();
this.$ = null;
}

/**
* Scans a template to produce template metadata.
*
Expand Down
3 changes: 1 addition & 2 deletions test/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
'unit/logging.html',
'unit/mixin-utils.html',
'unit/mixin-behaviors.html',
'unit/render-status.html',
'unit/disable-upgrade.html'
'unit/render-status.html'
];

// http://eddmann.com/posts/cartesian-product-in-javascript/
Expand Down
98 changes: 0 additions & 98 deletions test/smoke/disable-upgrade.html

This file was deleted.

158 changes: 0 additions & 158 deletions test/unit/disable-upgrade.html

This file was deleted.

0 comments on commit a284d77

Please sign in to comment.