diff --git a/browser/devtools/styleinspector/rule-view.js b/browser/devtools/styleinspector/rule-view.js index 34dbe7bc80fe..a0d50c02f845 100644 --- a/browser/devtools/styleinspector/rule-view.js +++ b/browser/devtools/styleinspector/rule-view.js @@ -2854,6 +2854,13 @@ TextPropertyEditor.prototype = { this.ruleView.tooltips.isEditing) || this.popup.isOpen; }, + /** + * Get the rule to the current text property + */ + get rule() { + return this.prop.rule; + }, + /** * Create the property editor's DOM. */ @@ -3004,7 +3011,7 @@ TextPropertyEditor.prototype = { * @return {string} the stylesheet's href. */ get sheetHref() { - let domRule = this.prop.rule.domRule; + let domRule = this.rule.domRule; if (domRule) { return domRule.href || domRule.nodeHref; } @@ -3068,14 +3075,14 @@ TextPropertyEditor.prototype = { // Combine the property's value and priority into one string for // the value. - let store = this.prop.rule.elementStyle.store; - let val = store.userProperties.getProperty(this.prop.rule.style, name, + let store = this.rule.elementStyle.store; + let val = store.userProperties.getProperty(this.rule.style, name, this.prop.value); if (this.prop.priority) { val += " !" + this.prop.priority; } - let propDirty = store.userProperties.contains(this.prop.rule.style, name); + let propDirty = store.userProperties.contains(this.rule.style, name); if (propDirty) { this.element.setAttribute("dirty", "");