If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

reftest text/zwnj-01 fails on Windows with ClearType enabled

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Core
Layout: Text
RESOLVED FIXED
9 years ago
7 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

Trunk
mozilla1.9.2a1
x86
Windows Vista
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

9 years ago
Created attachment 359571 [details]
screenshot showing where the reftest failure occurs

A number of the tests in layout/reftests/text fail when ClearType is enabled on Windows. All but one of these problems are resolved by the patch for bug 445087, which fixes a clipping problem when the reftest images are drawn on canvas.

However, zwnj-01.html still fails even with that patch. Examination of the test and reference images shows that they differ at the point where the ZWNJ character occurs in the test file, and the text is broken into separate inline-block spans in the reference.

IMO, the test file is rendering correctly here, and the defect is actually in the reference. The problem is that the ClearType smoothing pixels from the two text fragments (in two separate inline-blocks) actually overlap, and when the two blocks are painted separately we don't precisely reproduce the result of painting all the text in a single run.

The attached image (enlarged screenshot) shows the discrepancy.
(Assignee)

Comment 1

9 years ago
Created attachment 359575 [details] [diff] [review]
patch to modify zwnj-01 reftest to avoid failure with ClearType
[Checkin: Comment 2+3]

I think it's unlikely that we can completely resolve the discrepancy between text drawn all at once and text drawn in separate operations, where overlap of ClearType antialiasing occurs. Perhaps work on improving the alpha channel behavior in Cairo with ClearType may help (see bug 363861), but for the purpose of the ZWNJ test, we should simply ignore the difference.

The patch works around the issue by modifying the reftest to apply an SVG filter (non-white pixels to black) to the test and reference canvases, so that the slight color difference in the ClearType pixels is ignored.
Attachment #359575 - Flags: review?(roc)
Attachment #359575 - Flags: review?(roc) → review+
(Assignee)

Updated

9 years ago
Keywords: checkin-needed
Comment on attachment 359575 [details] [diff] [review]
patch to modify zwnj-01 reftest to avoid failure with ClearType
[Checkin: Comment 2+3]


http://hg.mozilla.org/mozilla-central/rev/91d0c4feeff9
Attachment #359575 - Attachment description: patch to modify zwnj-01 reftest to avoid failure with ClearType → patch to modify zwnj-01 reftest to avoid failure with ClearType [Checkin: Comment 2]
Comment on attachment 359575 [details] [diff] [review]
patch to modify zwnj-01 reftest to avoid failure with ClearType
[Checkin: Comment 2+3]

(In reply to comment #2)

Ftr, this was after fixing context for
{
patching file layout/reftests/text/reftest.list
Hunk #1 FAILED at 20
1 out of 1 hunks FAILED
}
Attachment #359575 - Attachment description: patch to modify zwnj-01 reftest to avoid failure with ClearType [Checkin: Comment 2] → patch to modify zwnj-01 reftest to avoid failure with ClearType [Checkin: Comment 2+3]
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
See bug 581081 for an adjustment to this patch.
You need to log in before you can comment on or make changes to this bug.