зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1186138 - Part 1: Refactor this.prop.rule to this.rule in rule-view.js r=bgrins
This commit is contained in:
Родитель
375cbf018f
Коммит
f190ebdb18
|
@ -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", "");
|
||||
|
|
Загрузка…
Ссылка в новой задаче