Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: third_party/WebKit/Source/core/paint/TextPainter.cpp

Issue 2345543002: debugging for crbug.com/646539
Patch Set: 3 TUs, 2 .h Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/BUILD.gn ('k') | third_party/WebKit/Source/core/paint/TextPainterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698