Closed Bug 1512597 Opened 5 years ago Closed 5 years ago

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

Categories

(Core :: CSS Parsing and Computation, defect)

63 Branch
Unspecified
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox-esr60 --- unaffected
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 + fixed
firefox66 + fixed

People

(Reporter: marius, Assigned: heycam)

References

Details

(Keywords: regression)

Attachments

(2 files)

Attached file svg-currentcolor.html
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.
Status: UNCONFIRMED → NEW
Component: Untriaged → SVG
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
[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
Flags: needinfo?(dglastonbury)
OS: Unspecified → All
Component: SVG → CSS Parsing and Computation
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)
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.
https://hg.mozilla.org/mozilla-central/rev/6ced915a7d2d
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Please nominate this for Beta approval when you get a chance.
Flags: needinfo?(cam)
Flags: in-testsuite+
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+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: