Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1618150 [wpt PR 21983] - Perform kNotInsideLink-related adjustmen…
…ts in ElementRuleCollector, a=testonly Automatic update from web-platform-tests Perform kNotInsideLink-related adjustments in ElementRuleCollector The link_match_type stored on the MatchedProperties object is only relevant and correct if we're inside a link, hence we need to override the effective link_match_type at some point. Previously, we would do this apply-time, and not as part of the rule- collection. This CL instead proposes that ElementRuleCollector take the link-status into account, and perform the adjustment before storing the link_match_type on MatchedProperties, such that no further adjustments are required later. This fixes a bug in the CSSCascade path, where we would incorrectly not apply anything for selectors such as *:not(:link):not(:visited), even for elements that are not inside links. (See AddLinkFilter in cascade_expansion.cc. We would switch on the value 0, and then enter the default case, causing a filter to be added on kProperty, which causes all properties to be rejected. This is correct for elements that are inside links, but not for elements that aren't). Bug: 1055715 Change-Id: I2b63de41753fb0fa7b637a4be5bd009c2f165fcf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2072223 Reviewed-by: Rune Lillesveen <futharkchromium.org> Commit-Queue: Anders Hartvoll Ruud <andruudchromium.org> Cr-Commit-Position: refs/heads/master{#744631} -- wpt-commits: 06114b9ab7eb85376ce6a1982fb850ba8c5c60ef wpt-pr: 21983 UltraBlame original commit: 84b018a46e90f3047afd8c896a8fdd407d10bc4a
- Loading branch information