Closed Bug 453103 Opened 16 years ago Closed 16 years ago

Reftest fail with subpixel rendering

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(2 files)

Attached patch fixSplinter Review
Like bug 452747, there are a few more reftests that fail on my Mac due to glyphs being rendered a little outside the (pixel-snapped) font-box and being clipped in the testcase and not the reference, or vice versa. These are all fixable by adding a little padding, or in one case it seems safer to just make the text be invisible via rgba(0,0,0,0).
Attachment #336318 - Flags: superreview?(dbaron)
Attachment #336318 - Flags: review?(dbaron)
Why are these reftest failures considered bugs in the tests rather than a bug in Gecko?  Why does adding padding fix them?
These tests assume that text glyphs never affect any pixels outside the pixel-snapped rectangle derived from the text's advance width, ascent and descent. That assumption is not true on Mac with subpixel rendering (and in general, for weird fonts, it's not true on any platform).
Is it guaranteed to be true if you stick 0.2em of padding in?
In theory? No. In practice? Yes.
Attachment #336318 - Flags: superreview?(dbaron)
Attachment #336318 - Flags: superreview+
Attachment #336318 - Flags: review?(dbaron)
Attachment #336318 - Flags: review+
Comment on attachment 336318 [details] [diff] [review]
fix

r+sr=dbaron if you fix the 430813 tests by making the text transparent rather than introducing padding
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #5)
> r+sr=dbaron if you fix the 430813 tests by making the text transparent rather
> than introducing padding

But if I make the test transparent, then the test isn't testing anything because incorrect positioning of that last DIV won't cause a visual difference.
Can you put the padding on an inline containing the text, then, rather than on the block?  (And use line-height if you need vertical padding.)
Attached patch fix v2Splinter Review
That works.
Attachment #343301 - Flags: review?(dbaron)
Comment on attachment 343301 [details] [diff] [review]
fix v2

r+sr=dbaron
Attachment #343301 - Flags: superreview+
Attachment #343301 - Flags: review?(dbaron)
Attachment #343301 - Flags: review+
Pushed 8735bfaf0b43
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: