Backed out changeset 4d427be40f81 (bug 1096490) for breaking m-oth tests on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2015-01-15 15:12:13 +01:00
Родитель 88883a192b
Коммит 59e9267c2f
2 изменённых файлов: 8 добавлений и 30 удалений

Просмотреть файл

@ -163,11 +163,6 @@ ElementStyle.prototype = {
},
destroy: function() {
if (this.destroyed) {
return;
}
this.destroyed = true;
this.dummyElement = null;
this.dummyElementPromise.then(dummyElement => {
dummyElement.remove();
@ -198,10 +193,6 @@ ElementStyle.prototype = {
matchedSelectors: true,
filter: this.showUserAgentStyles ? "ua" : undefined,
}).then(entries => {
if (this.destroyed) {
return;
}
// Make sure the dummy element has been created before continuing...
return this.dummyElementPromise.then(() => {
if (this.populated != populated) {
@ -1044,7 +1035,7 @@ TextProperty.prototype = {
setValue: function(aValue, aPriority, force=false) {
let store = this.rule.elementStyle.store;
if (this.editor && aValue !== this.editor.committed.value || force) {
if (aValue !== this.editor.committed.value || force) {
store.userProperties.setProperty(this.rule.style, this.name, aValue);
}
@ -1533,8 +1524,8 @@ CssRuleView.prototype = {
this.element.parentNode.removeChild(this.element);
}
if (this._elementStyle) {
this._elementStyle.destroy();
if (this.elementStyle) {
this.elementStyle.destroy();
}
this.popup.destroy();
@ -1584,23 +1575,14 @@ CssRuleView.prototype = {
return;
}
// Repopulate the element style once the current modifications are done.
let promises = [];
for (let rule of this._elementStyle.rules) {
if (rule._applyingModifications) {
promises.push(rule._applyingModifications);
}
}
return promise.all(promises).then(() => {
return this._populate(true);
});
// Repopulate the element style.
this._populate(true);
},
_populate: function(clearRules = false) {
let elementStyle = this._elementStyle;
return this._elementStyle.populate().then(() => {
if (this._elementStyle != elementStyle || this.isDestroyed) {
if (this._elementStyle != elementStyle) {
return;
}
@ -1646,11 +1628,7 @@ CssRuleView.prototype = {
clear: function() {
this._clearRules();
this._viewedElement = null;
if (this._elementStyle) {
this._elementStyle.destroy();
this._elementStyle = null;
}
this._elementStyle = null;
},
/**

Просмотреть файл

@ -7,7 +7,7 @@
let { Cu } = require("chrome");
let DevToolsUtils = require("devtools/toolkit/DevToolsUtils");
let Services = require("Services");
let promise = require("promise");
let promise = require("devtools/toolkit/deprecated-sync-thenables");
let {Class} = require("sdk/core/heritage");
let {EventTarget} = require("sdk/event/target");
let events = require("sdk/event/core");