Bug 920509 - [app manager] Don't use hiddenDOMWindow in styles.js. r=dcamp

This commit is contained in:
Paul Rouget 2013-09-27 14:41:30 -04:00
Родитель 1f8f1190e4
Коммит 650189ea89
1 изменённых файлов: 9 добавлений и 2 удалений

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

@ -715,8 +715,15 @@ var StyleRuleActor = protocol.ActorClass({
// Use a fresh element for each call to this function to prevent side effects
// that pop up based on property values that were already set on the element.
let tempElement = Services.appShell.hiddenDOMWindow.
document.createElement("div");
let document;
if (this.rawNode) {
document = this.rawNode.ownerDocument;
} else {
document = this.rawRule.parentStyleSheet.ownerNode.ownerDocument;
}
let tempElement = document.createElement("div");
for (let mod of modifications) {
if (mod.type === "set") {