Commit e038edab authored by jan.koester's avatar jan.koester
Browse files

test

parent 7902d123
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -187,17 +187,20 @@ namespace libhtmlpp {
         *  ("*") -- guessing their state is worse than not matching at all.
         *  A bare tag left with no class/id/attribute qualifier of its own
         *  after a combinator (space/">"/"+"/"~") is stripped off (e.g.
         *  "[data-x]>div" reduces to a bare "div") is normally rejected too
         *  -- on its own it would otherwise match every element of that tag
         *  in the whole document -- UNLESS @p ancestors is supplied AND
         *  every one of this rule's ancestor compounds was genuinely
         *  verified against a real candidate ancestor rather than vacuously
         *  satisfied (see ancestorChainSatisfies): a rule like
         *  "header.site-nav > div" is safe to trust for a bare "div" once
         *  its ancestor requirement is a real, checked constraint and not
         *  just "ancestors exist" (a qualified compound like "div.foo" is
         *  always specific enough to check on its own and never triggers
         *  this rejection either way). An attribute-selector condition
         *  "[data-x]>div" reduces to a bare "div") is ALWAYS rejected for
         *  the target compound, even when @p ancestors is supplied and its
         *  own ancestor requirement is genuinely verified: on a real
         *  component-library/page-builder site a generic ancestor condition
         *  (e.g. "[data-atom][data-atom=header]") can be common enough to
         *  make a bare-tag child of it a near-blanket match in practice, and
         *  combined with this file's specificity ordering (see
         *  computeSpecificity) that let one real page-builder's own layout
         *  plumbing rule silently outrank much more specific,
         *  content-driven rules -- confirmed by an actual regression this
         *  guard's removal caused, not just theoretical risk. A qualified
         *  compound like "div.foo" is always specific enough to check on
         *  its own and never triggers this rejection. An attribute-selector
         *  condition
         *  ("[href=...]") on the target compound is checked against @p
         *  collectApproximateMatches's @p targetAttributes when supplied --
         *  otherwise (or for an ancestor compound with no attributes