Bug 1499049 - (Part 6) Support !important in changed CSS property values; r=pbro
Depends on D8722 Include the "!importat" priority flag when tracking changes to CSS declarations. Differential Revision: https://phabricator.services.mozilla.com/D8967
This commit is contained in:
@@ -875,6 +875,7 @@ RuleRewriter.prototype = {
|
||||
setPropertyEnabled: function(index, name, isEnabled) {
|
||||
this.completeInitialization(index);
|
||||
const decl = this.decl;
|
||||
const priority = decl.priority;
|
||||
let copyOffset = decl.offsets[1];
|
||||
if (isEnabled) {
|
||||
// Enable it. First see if the comment start can be deleted.
|
||||
@@ -918,9 +919,9 @@ RuleRewriter.prototype = {
|
||||
this.completeCopying(copyOffset);
|
||||
|
||||
if (isEnabled) {
|
||||
this.modifications.push({ type: "set", index, name, value: decl.value });
|
||||
this.modifications.push({ type: "set", index, name, value: decl.value, priority });
|
||||
} else {
|
||||
this.modifications.push({ type: "remove", index, name });
|
||||
this.modifications.push({ type: "remove", index, name, priority });
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user