diff --git a/devtools/client/styleeditor/StyleSheetEditor.jsm b/devtools/client/styleeditor/StyleSheetEditor.jsm index 1d1339447d54..4354b1e1225d 100644 --- a/devtools/client/styleeditor/StyleSheetEditor.jsm +++ b/devtools/client/styleeditor/StyleSheetEditor.jsm @@ -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); },