|
@@ -194,7 +194,12 @@ this.RulesMatcher = this.RulesMatcher || (() => {
|
|
|
} else {
|
|
} else {
|
|
|
const styleInfo = elementStyleInfo.selectorInfo.styleInfo;
|
|
const styleInfo = elementStyleInfo.selectorInfo.styleInfo;
|
|
|
const cssStyle = styleInfo.cssStyle;
|
|
const cssStyle = styleInfo.cssStyle;
|
|
|
- mediaAllInfo.styles.set(cssStyle, styleInfo);
|
|
|
|
|
|
|
+ let styleInfos = mediaAllInfo.matchedStyles.get(cssStyle);
|
|
|
|
|
+ if (!styleInfos) {
|
|
|
|
|
+ styleInfos = [];
|
|
|
|
|
+ mediaAllInfo.matchedStyles.set(cssStyle, styleInfos);
|
|
|
|
|
+ }
|
|
|
|
|
+ styleInfos.push(styleInfo);
|
|
|
const styleValue = styleInfo.style.get(styleName);
|
|
const styleValue = styleInfo.style.get(styleName);
|
|
|
if (!styleValue) {
|
|
if (!styleValue) {
|
|
|
styleInfo.style.set(styleName, elementStyleInfo.styleValue);
|
|
styleInfo.style.set(styleName, elementStyleInfo.styleValue);
|
|
@@ -234,7 +239,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
|
|
|
function createMediaInfo(media) {
|
|
function createMediaInfo(media) {
|
|
|
const mediaInfo = { media: media, elements: new Map(), pseudos: new Map(), medias: new Map(), rules: new Map(), pseudoSelectors: new Set() };
|
|
const mediaInfo = { media: media, elements: new Map(), pseudos: new Map(), medias: new Map(), rules: new Map(), pseudoSelectors: new Set() };
|
|
|
if (media == MEDIA_ALL) {
|
|
if (media == MEDIA_ALL) {
|
|
|
- mediaInfo.styles = new Map();
|
|
|
|
|
|
|
+ mediaInfo.matchedStyles = new Map();
|
|
|
}
|
|
}
|
|
|
return mediaInfo;
|
|
return mediaInfo;
|
|
|
}
|
|
}
|