| Index: third_party/WebKit/Source/core/paint/TextPainter.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/TextPainter.cpp b/third_party/WebKit/Source/core/paint/TextPainter.cpp
|
| index 32dd1916ae43e76e18b2bfc0c4f562a3a32b0490..faa873a9fce01619fff239c8f4b1e3a59a51610f 100644
|
| --- a/third_party/WebKit/Source/core/paint/TextPainter.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/TextPainter.cpp
|
| @@ -120,37 +120,37 @@ Color TextPainter::textColorForWhiteBackground(Color textColor)
|
| TextPainter::Style TextPainter::textPaintingStyle(LineLayoutItem lineLayoutItem, const ComputedStyle& style, const PaintInfo& paintInfo)
|
| {
|
| TextPainter::Style textStyle;
|
| - bool isPrinting = paintInfo.isPrinting();
|
| -
|
| - if (paintInfo.phase == PaintPhaseTextClip) {
|
| - // When we use the text as a clip, we only care about the alpha, thus we make all the colors black.
|
| - textStyle.currentColor = Color::black;
|
| - textStyle.fillColor = Color::black;
|
| - textStyle.strokeColor = Color::black;
|
| - textStyle.emphasisMarkColor = Color::black;
|
| - textStyle.strokeWidth = style.textStrokeWidth();
|
| - textStyle.shadow = 0;
|
| - } else {
|
| - textStyle.currentColor = style.visitedDependentColor(CSSPropertyColor);
|
| + //bool isPrinting = paintInfo.isPrinting();
|
| +
|
| + //if (paintInfo.phase == PaintPhaseTextClip) {
|
| + //// When we use the text as a clip, we only care about the alpha, thus we make all the colors black.
|
| + //textStyle.currentColor = Color::black;
|
| + //textStyle.fillColor = Color::black;
|
| + //textStyle.strokeColor = Color::black;
|
| + //textStyle.emphasisMarkColor = Color::black;
|
| + //textStyle.strokeWidth = style.textStrokeWidth();
|
| + //textStyle.shadow = 0;
|
| + //} else {
|
| + //textStyle.currentColor = style.visitedDependentColor(CSSPropertyColor);
|
| textStyle.fillColor = lineLayoutItem.resolveColor(style, CSSPropertyWebkitTextFillColor);
|
| - textStyle.strokeColor = lineLayoutItem.resolveColor(style, CSSPropertyWebkitTextStrokeColor);
|
| - textStyle.emphasisMarkColor = lineLayoutItem.resolveColor(style, CSSPropertyWebkitTextEmphasisColor);
|
| - textStyle.strokeWidth = style.textStrokeWidth();
|
| - textStyle.shadow = style.textShadow();
|
| + //textStyle.strokeColor = lineLayoutItem.resolveColor(style, CSSPropertyWebkitTextStrokeColor);
|
| + //textStyle.emphasisMarkColor = lineLayoutItem.resolveColor(style, CSSPropertyWebkitTextEmphasisColor);
|
| + //textStyle.strokeWidth = style.textStrokeWidth();
|
| + //textStyle.shadow = style.textShadow();
|
|
|
| // Adjust text color when printing with a white background.
|
| - ASSERT(lineLayoutItem.document().printing() == isPrinting);
|
| - bool forceBackgroundToWhite = BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(style, lineLayoutItem.document());
|
| - if (forceBackgroundToWhite) {
|
| - textStyle.fillColor = textColorForWhiteBackground(textStyle.fillColor);
|
| - textStyle.strokeColor = textColorForWhiteBackground(textStyle.strokeColor);
|
| - textStyle.emphasisMarkColor = textColorForWhiteBackground(textStyle.emphasisMarkColor);
|
| - }
|
| + //ASSERT(lineLayoutItem.document().printing() == isPrinting);
|
| + //bool forceBackgroundToWhite = BoxPainter::shouldForceWhiteBackgroundForPrintEconomy(style, lineLayoutItem.document());
|
| + //if (forceBackgroundToWhite) {
|
| + //textStyle.fillColor = textColorForWhiteBackground(textStyle.fillColor);
|
| + //textStyle.strokeColor = textColorForWhiteBackground(textStyle.strokeColor);
|
| + //textStyle.emphasisMarkColor = textColorForWhiteBackground(textStyle.emphasisMarkColor);
|
| + //}
|
|
|
| // Text shadows are disabled when printing. http://crbug.com/258321
|
| - if (isPrinting)
|
| - textStyle.shadow = 0;
|
| - }
|
| + //if (isPrinting)
|
| + //textStyle.shadow = 0;
|
| + //}
|
|
|
| return textStyle;
|
| }
|
|
|