Bug 112283 - Set -webkit-font-smoothing: none in fast/regions/autoheight-break-after.html so reftest matches exactly in Mountain Lion
Summary: Set -webkit-font-smoothing: none in fast/regions/autoheight-break-after.html ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: James Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 13:18 PDT by James Robinson
Modified: 2013-03-14 02:37 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.10 KB, patch)
2013-03-13 13:20 PDT, James Robinson
no flags Details | Formatted Diff | Diff
Patch (1.55 KB, patch)
2013-03-13 13:44 PDT, James Robinson
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Robinson 2013-03-13 13:18:57 PDT
Set -webkit-font-smoothing: none in fast/regions/autoheight-break-after.html so reftest matches exactly in Mountain Lion
Comment 1 James Robinson 2013-03-13 13:20:18 PDT
Created attachment 192981 [details]
Patch
Comment 2 James Robinson 2013-03-13 13:22:13 PDT
This fixes the immediate issue with this test, but I definitely wouldn't mind a more general solution.
Comment 3 James Robinson 2013-03-13 13:32:48 PDT
Comment on attachment 192981 [details]
Patch

I think we want to understand why this is different.
Comment 4 James Robinson 2013-03-13 13:44:19 PDT
Created attachment 192987 [details]
Patch
Comment 5 Dave Hyatt 2013-03-13 13:44:49 PDT
Comment on attachment 192987 [details]
Patch

r=me
Comment 6 James Robinson 2013-03-13 13:57:43 PDT
Committed r145749: <http://trac.webkit.org/changeset/145749>
Comment 7 Andrei Bucur 2013-03-14 02:37:31 PDT
Font smoothing seems to be taken into account only when painting the glyphs (Font::drawGlyphs).
The flow thread is clipping the graphics context around the overflow rectangle so the smoothed pixels are not painted. In the reference file this is not happening unless overflow: hidden is specified.

Why the fail is happening only on Mountain Lion? It seems glyphs can be both antialiased and smoothed (subpixel AA?).

Skia's Font::drawGlyphs implementation states:
    if (!shouldUseSmoothing() || isRunningLayoutTest())
        shouldSmoothFonts = false;

This doesn't disable AA. Probably some agresive AA on Chromium Mountain Lion is the culprit for the failure.

Antialiasing and font smoothing are both disabled if NoSmoothing is specified on the FontDescription and might explain why this is fixed when setting the property.