[:is/:where] Drop pseudo_id when matching nested complex selectors
If the pseudo_id is set, the SelectorChecker::MatchSelector call for each subselector will fail completely because the dynamic_pseudo of the inner result will not match context.pseudo_id. This check does not make sense to perform for nested complex selectors, since pseudo elements are not valid in nested complex selectors. Hence, we can just set the pseudo_id to kPseudoIdNone at the :is/:where boundary. This fixes a bug where selectors such as ":is(.a .b)::before" would never match. This CL also adds a basic test for pseudo classes. (Not related to the fix). Bug: 568705 Change-Id: I119265836ac0f1b77868537c7685690300c265fd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466278Reviewed-by:Rune Lillesveen <futhark@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#816500}
Showing
Please register or sign in to comment