зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1146935 - StyleEditor: Respect the transition preference when a linked CSS file has changed on disk. r=bgrins
This should fix intermittent browser_styleeditor_sourcemap_watching.js which was disabling transitions to avoid races between the transition finishing and the 'style-applied' event to be sent from the server. --HG-- extra : transplant_source : %1B%AB1%F3%23%28%85%0DZLe%9B%9E-%EEH%F54m%99
This commit is contained in:
Родитель
5443426946
Коммит
62bdd4961b
|
@ -190,6 +190,15 @@ StyleSheetEditor.prototype = {
|
|||
return this._friendlyName;
|
||||
},
|
||||
|
||||
/**
|
||||
* Check if transitions are enabled for style changes.
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
get transitionsEnabled() {
|
||||
return Services.prefs.getBoolPref(TRANSITION_PREF);
|
||||
},
|
||||
|
||||
/**
|
||||
* If this is an original source, get the path of the CSS file it generated.
|
||||
*/
|
||||
|
@ -495,9 +504,7 @@ StyleSheetEditor.prototype = {
|
|||
this._state.text = this.sourceEditor.getText();
|
||||
}
|
||||
|
||||
let transitionsEnabled = Services.prefs.getBoolPref(TRANSITION_PREF);
|
||||
|
||||
this.styleSheet.update(this._state.text, transitionsEnabled)
|
||||
this.styleSheet.update(this._state.text, this.transitionsEnabled)
|
||||
.then(null, Cu.reportError);
|
||||
},
|
||||
|
||||
|
@ -683,7 +690,7 @@ StyleSheetEditor.prototype = {
|
|||
let text = decoder.decode(array);
|
||||
|
||||
let relatedSheet = this.styleSheet.relatedStyleSheet;
|
||||
relatedSheet.update(text, true);
|
||||
relatedSheet.update(text, this.transitionsEnabled);
|
||||
}, this.markLinkedFileBroken);
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче