|
@@ -264,8 +264,9 @@ this.matchedRules = this.matchedRules || (() => {
|
|
|
mediaInfo.medias.forEach(childMediaInfo => computeCascade(childMediaInfo, [mediaInfo, ...parentMediaInfo], mediaAllInfo, workStylesheet));
|
|
mediaInfo.medias.forEach(childMediaInfo => computeCascade(childMediaInfo, [mediaInfo, ...parentMediaInfo], mediaAllInfo, workStylesheet));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function getDeclarationsInfo(elementInfo, workStylesheet/*, element */) {
|
|
|
|
|
|
|
+ function getDeclarationsInfo(elementInfo, workStylesheet/*, element*/) {
|
|
|
const declarationsInfo = new Map();
|
|
const declarationsInfo = new Map();
|
|
|
|
|
+ const processedProperties = new Set();
|
|
|
elementInfo.forEach(selectorInfo => {
|
|
elementInfo.forEach(selectorInfo => {
|
|
|
let declarations;
|
|
let declarations;
|
|
|
if (selectorInfo.styleInfo) {
|
|
if (selectorInfo.styleInfo) {
|
|
@@ -273,13 +274,12 @@ this.matchedRules = this.matchedRules || (() => {
|
|
|
} else {
|
|
} else {
|
|
|
declarations = selectorInfo.ruleInfo.ruleData.block.children;
|
|
declarations = selectorInfo.ruleInfo.ruleData.block.children;
|
|
|
}
|
|
}
|
|
|
- processDeclarations(declarationsInfo, declarations, selectorInfo, workStylesheet);
|
|
|
|
|
|
|
+ processDeclarations(declarationsInfo, declarations, selectorInfo, processedProperties, workStylesheet);
|
|
|
});
|
|
});
|
|
|
return declarationsInfo;
|
|
return declarationsInfo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function processDeclarations(declarationsInfo, declarations, selectorInfo, workStylesheet) {
|
|
|
|
|
- const processedProperties = new Set();
|
|
|
|
|
|
|
+ function processDeclarations(declarationsInfo, declarations, selectorInfo, processedProperties, workStylesheet) {
|
|
|
for (let declaration = declarations.tail; declaration; declaration = declaration.prev) {
|
|
for (let declaration = declarations.tail; declaration; declaration = declaration.prev) {
|
|
|
const declarationData = declaration.data;
|
|
const declarationData = declaration.data;
|
|
|
const declarationText = cssTree.generate(declarationData);
|
|
const declarationText = cssTree.generate(declarationData);
|