[wpt-sync] Sync PR 38785 - Add :visited duplicate rules to regular buckets
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38785 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38785
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
Add :visited duplicate rules to regular buckets
During RuleSet::AddRule, when adding a rule which depends on visited
link status, we add a duplicate rule (but with different a
LinkMatchType) to a special bucket for visited rules. However, this
approach does not quite work, since we depend on certain rules being
present in specific buckets in some situations. In particular, rules
which contain ::part() must be in the part bucket, because we don't
provide the relevant part names when when matching rules from other
buckets.This CL drops the special 'visited_dependent_rules_' and instead
adds the duplicate rules via FindBestRuleSetAndAdd.Note that the function StyleResolver::StyleRulesForElement (only
used for Editing) now needs to suppress :visited styles (see
SerializationTest.Link and crbug.com/938590), because we try to match
the visited-dependent rules regardless of the value of
ElementRuleCollector::inside_link_.Fixed: 1413904
Change-Id: Id360bef4f1b977107f109c4520db08f6e602a034
Reviewed-on: https://chromium-review.googlesource.com/4295376
WPT-Export-Revision: 41d8333c828361a200240e64ed555516f1e7e768
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Comment 4•2 years ago
|
||
bugherder |
Description
•