[Chromium] Sometimes bottom of text is truncated when page has a fractional scale
https://bugs.webkit.org/show_bug.cgi?id=88684

Reviewed by Tony Chang.

Source/WebCore:

When the page has a fractional scale, the ascent and descent part of the fonts might be fractional.
If the descent part is rounded down, the bottom of the text might be truncated when displayed
when subpixel text positioning is enabled.
To avoid that, borrow one unit from the ascent when possible.

Test: fast/text/descent-clip-in-scaled-page.html

* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
(WebCore::FontPlatformData::setupPaint): Moved NoPreference handling into querySystemForRenderStyle so that fontRenderStyle() can have actual styles without NoPreference.
(WebCore::FontPlatformData::querySystemForRenderStyle): Added NoPreference handling (moved from setupPaint)
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
(FontPlatformData):
(WebCore::FontPlatformData::fontRenderStyle): Added to let SimpleFontDataSkia access the font render styles.
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::platformInit):

LayoutTests:

New test case.

* fast/text/descent-clip-in-scaled-page-expected.html: Added.
* fast/text/descent-clip-in-scaled-page.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
7 files changed