Open Bug 1546133 Opened 6 years ago Updated 2 years ago

Mysterious color shadow was incorrectly painted near around the texts

Categories

(Core :: Graphics: Text, defect, P3)

Unspecified
Windows
defect

Tracking

()

People

(Reporter: alwu, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 obsolete files)

I found that there are a lots of WebVTT ref tests failed [1] because some mysterious unexpected color showing around the text, it looks like a colorful shadow, but the ref files don't have such CSS property.

The completed try result is in here [2].

[1] https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://queue.taskcluster.net/v1/task/MHt1ISX1SVWHssmXl9Jo5A/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1

[2] https://treeherder.mozilla.org/#/jobs?repo=try&revision=9b88a91bd510481988a4f66b1968276a6faddb24&selectedJob=241364222

Looks like the tests are being rendered with grayscale antialiasing, while the reference is using cleartype (subpixel) AA.

The cleartype "color fringing" on the reference does look surprisingly strong; I wonder if it's not using the correct gamma, or something like that?

Hi, Jonathan,
Do you think if this issue is easy to get a fix? Or it's a complex issue and I should disable those tests on Windows and wait for someone to take a look for this issue?
Thank you!

Flags: needinfo?(jfkthame)

Lee is more likely to know if there's an easy way to fix this, I think; I'm not sure of all the exact criteria that go into determining what kind of antialiasing will be used when the text is painted.

Flags: needinfo?(jfkthame) → needinfo?(lsalzman)
Priority: -- → P3

As far as the text backends are concerned, whatever AA layout asks for is what they end up getting. I think maybe Matt or Markus would have a better idea of the situations where AA gets disabled or not by FLB above...

Flags: needinfo?(lsalzman)
Blocks: webvtt-wpt
No longer blocks: 1534862

It might be better if the reference file also used a <video> (or maybe a <canvas>?) to put under the text, so that the only difference between the two is the text (normal vs WebVTT).

The current case has dynamic content under the text in the test file (the video), and static under the text in ref (a white div), so we take quite different rendering paths, depending on platform and backend.

(In reply to Matt Woodrow (:mattwoodrow) from comment #5)

It might be better if the reference file also used a <video> (or maybe a <canvas>?) to put under the text, so that the only difference between the two is the text (normal vs WebVTT).

The current case has dynamic content under the text in the test file (the video), and static under the text in ref (a white div), so we take quite different rendering paths, depending on platform and backend.

Good idea, using <video> in reference file makes more sense.

Take basic-ref.html as an example [1], I made a example to put the text over the <video> [2]. Is that what you meant?

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/webvtt/rendering/cues-with-video/processing-model/basic-ref.html
[2] https://codepen.io/anon/pen/dEmLap

Flags: needinfo?(matt.woodrow)

I'm not sure if that will work, since from the display list side, there isn't actually any video content there.

I think you need to do the same as the test variant, where you load a white mp4/webm, set the autoplay attribute, and make the test wait for the onplaying event.

Flags: needinfo?(matt.woodrow)
Assignee: nobody → alwu

In order to use same rendering path for test and reference files, we should also use <video> in reference files.

As we have let test and reference file using same rendering path, we can re-enable those wpt on Windows.

Hi, Matt,
This issue still happened on Win7 [1], even if we used <video> tag for the reference files. Do you have any idea about why this issue only happen on Win7?
Thank you.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=afb2de6153a07bfac010202f914d9bf51452c5d3&selectedJob=248821538

Flags: needinfo?(matt.woodrow)

After adding class="reftest-wait" and including reftest-wait.js, the issue still happened [1]. It seems that we still have some rendering issue on Windows even if we use <video> on both test and reference files.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=17d97a24c8ffd9d06dfefc27525291a8b38efbc1&selectedJob=248992626

I believe that we should still fix this bug, not working around by changing tests.

Assignee: alwu → nobody
Attachment #9068157 - Attachment is obsolete: true
Attachment #9068158 - Attachment is obsolete: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: