Loading src/css.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1060,6 +1060,7 @@ void libhtmlpp::CSSStyleSheet::_rebuildCompoundCache() const { branch.tag = compound.tag; branch.classes = compound.classes; branch.id = compound.id; branch.attrConditions = parseAttributeConditions(chain.back()); branch.hadCombinator = hadCombinator; for (size_t i = 0; i + 1 < chain.size(); ++i) { std::string aSel = stripAttributeSelectors(chain[i]); Loading Loading @@ -1087,7 +1088,8 @@ void libhtmlpp::CSSStyleSheet::collectApproximateMatches( std::map<std::string,std::string> &props, std::string &mediaRules, std::set<std::string> &seenMediaBlocks, const std::vector<AncestorFrame> *ancestors) const const std::vector<AncestorFrame> *ancestors, const std::map<std::string,std::string> *targetAttributes) const { std::string tagLower = tag; std::transform(tagLower.begin(), tagLower.end(), tagLower.begin(), Loading Loading @@ -1132,7 +1134,9 @@ void libhtmlpp::CSSStyleSheet::collectApproximateMatches( compound.tag = branch.tag; compound.classes = branch.classes; compound.id = branch.id; if (!compoundMatches(compound, branch.hadCombinator, tagLower, classes, id)) continue; compound.attrConditions = branch.attrConditions; if (!compoundMatches(compound, branch.hadCombinator, tagLower, classes, id, targetAttributes)) continue; bool usedUnverifiableAncestor = false; if (ancestors && !branch.ancestorCompounds.empty()) { Loading Loading
src/css.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1060,6 +1060,7 @@ void libhtmlpp::CSSStyleSheet::_rebuildCompoundCache() const { branch.tag = compound.tag; branch.classes = compound.classes; branch.id = compound.id; branch.attrConditions = parseAttributeConditions(chain.back()); branch.hadCombinator = hadCombinator; for (size_t i = 0; i + 1 < chain.size(); ++i) { std::string aSel = stripAttributeSelectors(chain[i]); Loading Loading @@ -1087,7 +1088,8 @@ void libhtmlpp::CSSStyleSheet::collectApproximateMatches( std::map<std::string,std::string> &props, std::string &mediaRules, std::set<std::string> &seenMediaBlocks, const std::vector<AncestorFrame> *ancestors) const const std::vector<AncestorFrame> *ancestors, const std::map<std::string,std::string> *targetAttributes) const { std::string tagLower = tag; std::transform(tagLower.begin(), tagLower.end(), tagLower.begin(), Loading Loading @@ -1132,7 +1134,9 @@ void libhtmlpp::CSSStyleSheet::collectApproximateMatches( compound.tag = branch.tag; compound.classes = branch.classes; compound.id = branch.id; if (!compoundMatches(compound, branch.hadCombinator, tagLower, classes, id)) continue; compound.attrConditions = branch.attrConditions; if (!compoundMatches(compound, branch.hadCombinator, tagLower, classes, id, targetAttributes)) continue; bool usedUnverifiableAncestor = false; if (ancestors && !branch.ancestorCompounds.empty()) { Loading