| Index: Source/core/rendering/InlineTextBox.cpp
|
| diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp
|
| index 23de0a7eb91a0bc89fb4c73e4bf584520663656f..624d9c12afb81dc5db272f065323efd188223892 100644
|
| --- a/Source/core/rendering/InlineTextBox.cpp
|
| +++ b/Source/core/rendering/InlineTextBox.cpp
|
| @@ -411,8 +411,11 @@ FloatSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext* context,
|
| return extraOffset;
|
| }
|
|
|
| -static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun, const AtomicString& emphasisMark, int emphasisMarkOffset, int startOffset, int endOffset, int truncationPoint, const FloatPoint& textOrigin,
|
| - const FloatRect& boxRect, const ShadowData* shadow, bool stroked, bool horizontal)
|
| +static void paintTextWithShadows(GraphicsContext* context, const Font& font, const TextRun& textRun,
|
| + const AtomicString& emphasisMark, int emphasisMarkOffset,
|
| + int startOffset, int endOffset, int truncationPoint,
|
| + const FloatPoint& textOrigin, const FloatRect& boxRect,
|
| + const ShadowData* shadow, bool stroked, bool horizontal)
|
| {
|
| Color fillColor = context->fillColor();
|
| ColorSpace fillColorSpace = context->fillColorSpace();
|
| @@ -420,6 +423,8 @@ static void paintTextWithShadows(GraphicsContext* context, const Font& font, con
|
| if (!opaque)
|
| context->setFillColor(Color::black, fillColorSpace);
|
|
|
| + TextRunPaintInfo textRunPaintInfo(textRun);
|
| + textRunPaintInfo.bounds = boxRect;
|
| do {
|
| IntSize extraOffset;
|
| if (shadow)
|
| @@ -428,22 +433,28 @@ static void paintTextWithShadows(GraphicsContext* context, const Font& font, con
|
| context->setFillColor(fillColor, fillColorSpace);
|
|
|
| if (startOffset <= endOffset) {
|
| + textRunPaintInfo.from = startOffset;
|
| + textRunPaintInfo.to = endOffset;
|
| if (emphasisMark.isEmpty())
|
| - context->drawText(font, textRun, textOrigin + extraOffset, startOffset, endOffset);
|
| + context->drawText(font, textRunPaintInfo, textOrigin + extraOffset);
|
| else
|
| - context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), startOffset, endOffset);
|
| + context->drawEmphasisMarks(font, textRunPaintInfo, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset));
|
| } else {
|
| if (endOffset > 0) {
|
| + textRunPaintInfo.from = 0;
|
| + textRunPaintInfo.to = endOffset;
|
| if (emphasisMark.isEmpty())
|
| - context->drawText(font, textRun, textOrigin + extraOffset, 0, endOffset);
|
| + context->drawText(font, textRunPaintInfo, textOrigin + extraOffset);
|
| else
|
| - context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), 0, endOffset);
|
| + context->drawEmphasisMarks(font, textRunPaintInfo, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset));
|
| }
|
| if (startOffset < truncationPoint) {
|
| + textRunPaintInfo.from = startOffset;
|
| + textRunPaintInfo.to = truncationPoint;
|
| if (emphasisMark.isEmpty())
|
| - context->drawText(font, textRun, textOrigin + extraOffset, startOffset, truncationPoint);
|
| + context->drawText(font, textRunPaintInfo, textOrigin + extraOffset);
|
| else
|
| - context->drawEmphasisMarks(font, textRun, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset), startOffset, truncationPoint);
|
| + context->drawEmphasisMarks(font, textRunPaintInfo, emphasisMark, textOrigin + extraOffset + IntSize(0, emphasisMarkOffset));
|
| }
|
| }
|
|
|
|
|