SVG fill: currentColor is incorrect if parent is an a:visited element

RESOLVED FIXED in Firefox 65

Status

()

RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: marius, Assigned: heycam)

Tracking

({regression})

63 Branch
mozilla66
Unspecified
All
regression
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox-esr60 unaffected, firefox63 wontfix, firefox64 wontfix, firefox65+ fixed, firefox66+ fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

4 months ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.0 Chrome/69.0.3497.128 Safari/537.36

Steps to reproduce:

When using an svg element inside a link element with the css property of fill: currentColor, the color is not actually respected if the link has been visited.

For a test case please see the attached file.

Once the link gets clicked, the color should change to follow the color of the link text.


Actual results:

Even if the link is visited the svg fill color is kept to the base color of an <a/> element.


Expected results:

The svg fill color should change if the link has been visited to the color of a:visited css rule.

Updated

4 months ago
Status: UNCONFIRMED → NEW
status-firefox63: --- → verified
status-firefox64: --- → wontfix
status-firefox65: --- → affected
status-firefox-esr60: --- → unaffected
Component: Untriaged → SVG
Ever confirmed: true
Keywords: regression
Product: Firefox → Core

Comment 1

4 months ago
[Tracking Requested - why for this release]:

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=82322f1fcb1fc0161f7be2ba41bd62d049d5e4fa&tochange=7d7fe1b01693a2da11a604dc3e54afaab7f344fd

Regressed by:Bug 1467622

@:kamidphish,
Your bunch of patch seems to cause the regression. Can you please look into this?
Blocks: 1467622
status-firefox63: verified → wontfix
tracking-firefox65: --- → ?
Flags: needinfo?(dglastonbury)
OS: Unspecified → All

Updated

4 months ago
Component: SVG → CSS Parsing and Computation
tracking-firefox65: ? → +
(Assignee)

Updated

3 months ago
Flags: needinfo?(cam)
I'm busy on WebRender, so I've asked :heycam if he has spare cycles to look into the issue for me.
Flags: needinfo?(dglastonbury)
Assignee: nobody → cam
Flags: needinfo?(xidorn+moz)
Thanks, heycam!
Flags: needinfo?(xidorn+moz)

Comment 7

3 months ago
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ced915a7d2d
Resolve currentcolor in fill and stroke against visited-dependent color r=xidorn
It might be nice to also have a test that unvisited links use the unvisited color.

Comment 9

3 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6ced915a7d2d
Status: NEW → RESOLVED
Last Resolved: 3 months ago
status-firefox66: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Please nominate this for Beta approval when you get a chance.
tracking-firefox66: --- → +
Flags: needinfo?(cam)
Flags: in-testsuite+
(Assignee)

Comment 11

3 months ago
Comment on attachment 9031777 [details]
Bug 1512597 - Resolve currentcolor in fill and stroke against visited-dependent color

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1467622

User impact if declined: Incorrect styling in certain SVG documents using :visited styles

Is this code covered by automated tests?: Yes

Has the fix been verified in Nightly?: Yes

Needs manual test from QE?: No

If yes, steps to reproduce: 

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Very small change, with tests.

String changes made/needed:
Flags: needinfo?(cam)
Attachment #9031777 - Flags: approval-mozilla-beta?
Comment on attachment 9031777 [details]
Bug 1512597 - Resolve currentcolor in fill and stroke against visited-dependent color

[Triage Comment]
Fixes incorrect styling in certain SVG documents using :visited styles. Approved for 65.0b8.
Attachment #9031777 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment 13

3 months ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-beta/rev/3911d8355cbb
status-firefox65: affected → fixed
You need to log in before you can comment on or make changes to this bug.