Index: third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp |
diff --git a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp |
index 136998d0b3f5484dc9d93b37b9bdff9796e13c56..990e04c8561fb2f8d43c8b79c9ecd53432067241 100644 |
--- a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp |
+++ b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp |
@@ -134,29 +134,8 @@ void SimpleFontData::platformInit(bool subpixelAscentDescent) { |
ascent = vdmxAscent; |
descent = -vdmxDescent; |
} else { |
- // For tiny fonts, the rounding of fAscent and fDescent results in equal |
- // baseline for different types of text baselines (crbug.com/338908). |
- // Please see CanvasRenderingContext2D::getFontBaseline for the heuristic. |
- if (subpixelAscentDescent && |
- (-metrics.fAscent < 3 || -metrics.fAscent + metrics.fDescent < 2)) { |
- ascent = -metrics.fAscent; |
- descent = metrics.fDescent; |
- } else { |
- ascent = SkScalarRoundToScalar(-metrics.fAscent); |
- descent = SkScalarRoundToScalar(metrics.fDescent); |
- } |
-#if OS(LINUX) || OS(ANDROID) |
- // When subpixel positioning is enabled, if the descent is rounded down, the |
- // descent part of the glyph may be truncated when displayed in a 'overflow: |
- // hidden' container. To avoid that, borrow 1 unit from the ascent when |
- // possible. |
- // FIXME: This can be removed if sub-pixel ascent/descent is supported. |
- if (platformData().getFontRenderStyle().useSubpixelPositioning && |
- descent < SkScalarToFloat(metrics.fDescent) && ascent >= 1) { |
- ++descent; |
- --ascent; |
- } |
-#endif |
+ ascent = -metrics.fAscent; |
+ descent = metrics.fDescent; |
} |
#if OS(MACOSX) |