This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Commit 4f0da8d
Bug 1949162 [wpt PR 50797] - [CSS][SVG] Fix inheritance for all :visited styles, a=testonly
Automatic update from web-platform-tests
[CSS][SVG] Fix inheritance for all :visited styles
This CL fixes the failure in the WPT color-inherit-link-visited.svg
[1]
The WebKit commit [2]
introduces logic and tests to ensure that elements inside a link
inherit a computed color from another element.
This change was intended to cover both CSS and SVG elements.
However, in Chromium, the WPT for SVG started failing.
The issue occurred because we only expand visited properties when
inside a visited link. Consequently, the visited properties did not
inherit values from their unvisited counterparts. The WPT failure is
related to the `internal-visited-fill` property, but similar issues
can arise with other CSS properties like
`internal-visited-text-emphasis-color`.
This CL resolves the WPT failure and the broader problem of visited
properties not inheriting unvisited values. In this CL we apply the
unvisited values to the visited properties during the initial style
calculation of the visited link element.
This CL also includes new WPTs for all the inherited visited
properties for which we are applying unvisited values before
`ExpandCascade`.
[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/svg/styling/color-inherit-link-visited.svg?q=color-inherit-link-visited&ss=chromium%2Fchromium%2Fsrc
[2] WebKit/WebKit@f93d710
Note: Even with this change there will be a bug corresponding to
explicit inheritance (of non-inherited visited properties).
Bug: 388400236, 40356084
Change-Id: I36dd328e6b9435e3baf1baab71867f8de7efd263
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6137310
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Divyansh Mangal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1421874}
--
wpt-commits: 5b541e93134dffb74649d01ccfc17377db79e0e1
wpt-pr: 507971 parent e3e08be commit 4f0da8d
File tree
10 files changed
+147
-0
lines changed- testing/web-platform/tests
- css/selectors
- svg/styling
10 files changed
+147
-0
lines changedLines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading
0 commit comments