Closed Bug 1359073 Opened 3 years ago Closed 2 years ago

Replace the use of chrome://global/skin/filters.svg#fill with context paint

Categories

(Firefox :: Theme, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: jwatt, Unassigned)

References

Details

(Keywords: meta, perf)

Right now we have a bunch of places that "set the color" of icons by applying an feComposite filter effect ( via chrome://global/skin/filters.svg#fill ) to the element that embeds the icon:

  https://dxr.mozilla.org/mozilla-central/search?q=filters.svg%23fill

Using a filter to change the color of icons is not going to perform well, and nowadays we have the ability to pass colors into SVG icon files as "context paint":

  https://bugzilla.mozilla.org/show_bug.cgi?id=1058040

We should get rid of the filter in favor of using context paint.
I am not entirely sure how we want to break this down, but the ultimate goal is to have a single icon location with reusable icons. This will make it easier to maintain consistency, reduce duplication and add new assets.

The work in bug 1347543 has started this process with the toolbar icons.
Depends on: 1365976
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/14682de7bf28
Use SVG context paint instead of an feComposite filter to color the gear.svg icon. r=dao
https://hg.mozilla.org/mozilla-central/rev/14682de7bf28
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
(In reply to Pulsebot from comment #2)
> Pushed by jwatt@jwatt.org:
> https://hg.mozilla.org/integration/mozilla-inbound/rev/14682de7bf28
> Use SVG context paint instead of an feComposite filter to color the gear.svg
> icon. r=dao

Drat. I used the wrong bug number. It should have been blocking bug, bug 1365976. Not really a major issues in this case since the commit is a sub-part of fixing this bug, so probably not worth backing out and relanding with the correct bug number.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 1368411
Depends on: 1368412
Depends on: 1368414
Depends on: 1368417
Depends on: 1368425
Depends on: 1368428
Depends on: 1369245
Depends on: 1367565
We decided to wontfix bug 1372990 since that file is going away with the Photon rewrite, but adding it to the blockers for completeness.
Depends on: 1372990
Status: REOPENED → RESOLVED
Closed: 3 years ago2 years ago
Resolution: --- → FIXED
Keywords: meta
You need to log in before you can comment on or make changes to this bug.