Commit 4f161132 authored by jan.koester's avatar jan.koester
Browse files

test

parent c773feff
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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]);
@@ -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(),
@@ -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()) {