Closed Bug 1635658 Opened 5 years ago Closed 5 years ago

Map on covid19india.org renders with incorrect colors with WR enabled

Categories

(Core :: Graphics: WebRender, defect)

67 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla78
Tracking Status
firefox-esr68 --- disabled
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- verified
firefox78 --- verified

People

(Reporter: yoasif, Assigned: tnikkel)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(3 files)

Initially reported on: https://www.reddit.com/r/firefox/comments/ge53s9/firefox_preview_messed_up_colors/

Steps to reproduce:

  1. Ensure WR is enabled.
    1.5 Ensure that the OS color mode is "dark" (or use the color control on the bottom left of the site is is set to dark)
  2. Visit www.covid19india.org

What happens:

The map of India that appears has a pink hue.

Expected result:

A more brownish hue.

2:40.91 INFO: Got as far as we can go bisecting nightlies...
2:40.91 INFO: Last good revision: 49b2a4c8be018f92d050512f9646cb3004ec1bec (2019-02-25)
2:40.91 INFO: First bad revision: 8c60d3a2fcc499bac3e232d666ff4491143085e6 (2019-02-26)
2:40.91 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=49b2a4c8be018f92d050512f9646cb3004ec1bec&tochange=8c60d3a2fcc499bac3e232d666ff4491143085e6

The problem is that the filter values in feColorMatrix is not applied when WebRender is enabled. See reduced test case.

Blocks: 1505871
Has Regression Range: --- → yes
Has STR: --- → yes

:yoasif, since this bug is a regression, could you fill (if possible) the regressed_by field?
For more information, please visit auto_nag documentation.

Flags: needinfo?(yoasif)
No longer blocks: 1505871
Flags: needinfo?(yoasif)
Regressed by: 1505871
Flags: needinfo?(tnikkel)
Assignee: nobody → tnikkel
Flags: needinfo?(tnikkel)
Blocks: 1417699

The brightness, contrast, and invert css filters are represented as component transfer filters when they required to be represented as an svg filter (ie when an element has a combination of CSS and SVG filters specified).

https://hg.mozilla.org/mozilla-central/rev/4f3360c4f104 (bug 1417699) used the value SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN for the function type in the G and B channels to specify that the R channel function should be used. As we know from https://hg.mozilla.org/mozilla-central/rev/a1ff0af83ad2 (bug 1605223) SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN is the value we get if the function is not specified, and by spec that is to be interpreted as the identity function.

To fix this use a special function type that is not exposed to content, SVG_FECOMPONENTTRANSFER_SAME_AS_R, when we want to do this optimization. And then teach the webrender filter code to understand it.

Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a8f2a1a231c Fix how CSS filters render with webrender that are represented as component transfer when they are required to be represented as SVG filters. r=mstange
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

Comment on attachment 9146396 [details]
Bug 1635658. Fix how CSS filters render with webrender that are represented as component transfer when they are required to be represented as SVG filters. r?mstange

Beta/Release Uplift Approval Request

  • User impact if declined: css filters combined with svg filters produces wrong color
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • 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): small well understood fix
  • String changes made/needed:
Attachment #9146396 - Flags: approval-mozilla-beta?

Toimothy, it seems we regressed it in 67, is there a pressing reason to uplift the fix in 77 and not let it ride the 78 train to give it more bake time on nightly?

Flags: needinfo?(tnikkel)

(In reply to Pascal Chevrel:pascalc from comment #8)

Toimothy, it seems we regressed it in 67, is there a pressing reason to uplift the fix in 77 and not let it ride the 78 train to give it more bake time on nightly?

No pressing reason, the reason I asked for uplift was because of the duplicate bug filed yesterday (bug 1637056), figured we could get this fix to users a little quicker.

Flags: needinfo?(tnikkel)

Comment on attachment 9146396 [details]
Bug 1635658. Fix how CSS filters render with webrender that are represented as component transfer when they are required to be represented as SVG filters. r?mstange

Low risk patch and affects enough people to have 2 bug reports, uplift approved for beta 6, thanks.

Attachment #9146396 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Verified-fixed on Nightly 78.0a1(20200515093304) and Beta 77.0b6(20200514211331) on win10 x64.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: