Index: Source/core/rendering/InlineTextBox.cpp |
diff --git a/Source/core/rendering/InlineTextBox.cpp b/Source/core/rendering/InlineTextBox.cpp |
index 5b36f6d98dd9d80ddd218943526ac9224687e27b..64045a8e66be58df25890f97c753e3d345f469de 100644 |
--- a/Source/core/rendering/InlineTextBox.cpp |
+++ b/Source/core/rendering/InlineTextBox.cpp |
@@ -409,7 +409,8 @@ static void paintTextWithShadows(GraphicsContext* context, |
int shadowX = horizontal ? shadow->x() : shadow->y(); |
int shadowY = horizontal ? shadow->y() : -shadow->x(); |
FloatSize offset(shadowX, shadowY); |
- drawLooper.addShadow(offset, shadow->blur(), renderer->resolveColor(shadow->color()), |
+ drawLooper.addShadow(offset, shadow->blur(), |
+ renderer->resolveColor(shadow->color(), Color::stdShadowColor), |
DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresAlpha); |
} while ((shadow = shadow->next())); |
drawLooper.addUnmodifiedContent(); |
@@ -599,14 +600,14 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, |
if (haveSelection) { |
// Check foreground color first. |
Color foreground = paintInfo.forceBlackText() ? Color::black : renderer()->selectionForegroundColor(); |
- if (foreground.isValid() && foreground != selectionFillColor) { |
+ if (foreground != Color::transparent && foreground != selectionFillColor) { |
if (!paintSelectedTextOnly) |
paintSelectedTextSeparately = true; |
selectionFillColor = foreground; |
} |
Color emphasisMarkForeground = paintInfo.forceBlackText() ? Color::black : renderer()->selectionEmphasisMarkColor(); |
- if (emphasisMarkForeground.isValid() && emphasisMarkForeground != selectionEmphasisMarkColor) { |
+ if (emphasisMarkForeground != Color::transparent && emphasisMarkForeground != selectionEmphasisMarkColor) { |
if (!paintSelectedTextOnly) |
paintSelectedTextSeparately = true; |
selectionEmphasisMarkColor = emphasisMarkForeground; |
@@ -845,7 +846,7 @@ void InlineTextBox::paintSelection(GraphicsContext* context, const FloatPoint& b |
return; |
Color c = renderer()->selectionBackgroundColor(); |
- if (!c.isValid() || c.alpha() == 0) |
+ if (!c.alpha()) |
return; |
// If the text color ends up being the same as the selection background, invert the selection |
@@ -1139,7 +1140,8 @@ void InlineTextBox::paintDecoration(GraphicsContext* context, const FloatPoint& |
} |
int shadowX = isHorizontal() ? shadow->x() : shadow->y(); |
int shadowY = isHorizontal() ? shadow->y() : -shadow->x(); |
- context->setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->blur(), shadow->color()); |
+ context->setShadow(FloatSize(shadowX, shadowY - extraOffset), shadow->blur(), |
+ renderer()->resolveColor(shadow->color(), Color::stdShadowColor)); |
shadow = shadow->next(); |
} |