| Index: Source/core/rendering/InlineTextBox.cpp
|
| diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
|
| index c5eff52094f0522dfb3d31262b97788995e9e592..3f615732900dff3448eeb6d08faf9dca38c0fb1e 100644
|
| --- a/Source/core/rendering/InlineTextBox.cpp
|
| +++ b/Source/core/rendering/InlineTextBox.cpp
|
| @@ -916,8 +916,7 @@ static StrokeStyle textDecorationStyleToStrokeStyle(TextDecorationStyle decorati
|
| return strokeStyle;
|
| }
|
|
|
| -#if ENABLE(CSS3_TEXT)
|
| -static int computeUnderlineOffset(const TextUnderlinePosition underlinePosition, const FontMetrics& fontMetrics, const InlineTextBox* inlineTextBox, const int textDecorationThickness)
|
| +static int computeUnderlineOffset(const TextUnderlinePosition underlinePosition, const FontMetrics& fontMetrics, const InlineTextBox* inlineTextBox, const float textDecorationThickness)
|
| {
|
| // Compute the gap between the font and the underline. Use at least one
|
| // pixel gap, if underline is thick then use a bigger gap.
|
| @@ -941,7 +940,6 @@ static int computeUnderlineOffset(const TextUnderlinePosition underlinePosition,
|
| ASSERT_NOT_REACHED();
|
| return fontMetrics.ascent() + gap;
|
| }
|
| -#endif // CSS3_TEXT
|
|
|
| static void adjustStepToDecorationLength(float& step, float& controlPointDistance, float length)
|
| {
|
| @@ -1140,13 +1138,7 @@ void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint&
|
| context->setStrokeStyle(textDecorationStyleToStrokeStyle(decorationStyle));
|
| if (deco & TextDecorationUnderline) {
|
| context->setStrokeColor(underline);
|
| -#if ENABLE(CSS3_TEXT)
|
| - TextUnderlinePosition underlinePosition = styleToUse->textUnderlinePosition();
|
| - const int underlineOffset = computeUnderlineOffset(underlinePosition, styleToUse->fontMetrics(), this, textDecorationThickness);
|
| -#else
|
| - const int underlineOffset = styleToUse->fontMetrics().ascent() + max<int>(1, ceilf(textDecorationThickness / 2.0));
|
| -#endif // CSS3_TEXT
|
| -
|
| + const int underlineOffset = computeUnderlineOffset(styleToUse->textUnderlinePosition(), styleToUse->fontMetrics(), this, textDecorationThickness);
|
| switch (decorationStyle) {
|
| case TextDecorationStyleWavy: {
|
| FloatPoint start(localOrigin.x(), localOrigin.y() + underlineOffset + doubleOffset);
|
|
|