[wpt-sync] Sync PR 38881 - Reland "Add :visited duplicate rules to regular buckets"
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 38881 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/38881
Details from upstream follow.
Anders Hartvoll Ruud <andruud@chromium.org> wrote:
Reland "Add :visited duplicate rules to regular buckets"
This is a reland of commit dc5c40463c0b59bea1ed85c27f9b9d95a234ed9a
The reland includes a fix to EasySelectorCheckerTest.
Original change's description:
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. Calling
FindBestRuleSetAndAdd on the duplicate RuleData could incorrectly
mark the selector as "covered by bucketing", so a BucketCoverage
parameter is added to suppress this behavior.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/c/chromium/src/+/4295376
Auto-Submit: Anders Hartvoll Ruud \<andruud@chromium.org>
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1113519}Change-Id: I5854a106982ecf347eb36257648115b42664d788
Reviewed-on: https://chromium-review.googlesource.com/4315913
WPT-Export-Revision: 93228862be7d2e6e765998e45761b8fd606186ef
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
Comment 5•2 years ago
|
||
bugherder |
Description
•