Closed Bug 900975 Opened 7 years ago Closed 6 years ago

-moz-osx-font-smoothing does not work properly for elements with display:inline

Categories

(Core :: Graphics: Text, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(2 files)

See bug 857142 comment 95 and 96.

Testcase:
data:text/html,<p style="font:16px arial;background:black;color:white">one
  <span style="-moz-osx-font-smoothing:grayscale">two

Compare:
data:text/html,<p style="font:16px arial;background:black;color:white">one
  <span style="-moz-osx-font-smoothing:grayscale;display:inline-block">two
Is this from failure to force a text run boundary?
That seems likely, yes. I expect we need to check this property in BuildTextRunsScanner::ContinueTextRunAcrossFrames.
Looks like the way to fix this is to respect the smoothing field in nsFont::BaseEquals.
Attachment #785103 - Flags: review?(dbaron)
Assignee: nobody → jfkthame
Comment on attachment 785103 [details] [diff] [review]
include font-smoothing setting in the nsFont::BaseEquals comparison

r=dbaron if you also remove the smoothing check from nsFont::Equals.
Attachment #785103 - Flags: review?(dbaron) → review+
Comment on attachment 785121 [details] [diff] [review]
reftest for -moz-osx-font-smoothing on display:inline element

Hopefully the inline-block vs. inline doesn't lead to any rounding issues.

Also worth checking that it actually fails on 10.6 and 10.7 -- it's possible you might need random-if for one or both of them, or just omission of any annotation.
Attachment #785121 - Flags: review?(dbaron) → review+
(In reply to David Baron [:dbaron] (don't cc:, use needinfo? instead) from comment #6)
> Comment on attachment 785121 [details] [diff] [review]
> reftest for -moz-osx-font-smoothing on display:inline element
> 
> Hopefully the inline-block vs. inline doesn't lead to any rounding issues.

I wondered that, too, but it doesn't seem to be a problem.

> Also worth checking that it actually fails on 10.6 and 10.7 -- it's possible
> you might need random-if for one or both of them, or just omission of any
> annotation.

I pushed it to tryserver to check that the annotations worked as expected: https://tbpl.mozilla.org/?tree=Try&rev=6b3da9214137

(Locally, the tests pass for me on 10.7, but that's because my system has subpixel AA enabled by default, which the 10.6/10.7 test slaves apparently don't. If we get that changed, we'll need to update these annotations.)
You need to log in before you can comment on or make changes to this bug.