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

Unified Diff: Source/core/rendering/EllipsisBox.cpp

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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: Source/core/rendering/EllipsisBox.cpp
diff --git a/Source/core/rendering/EllipsisBox.cpp b/Source/core/rendering/EllipsisBox.cpp
index c5cb7cf373b49b2de4407fce19ae38b17c1c11c1..7dcc2a9f6b0a89e3f5500e7c29f0a9e88ac4eeed 100644
--- a/Source/core/rendering/EllipsisBox.cpp
+++ b/Source/core/rendering/EllipsisBox.cpp
@@ -48,7 +48,7 @@ void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, La
// Select the correct color for painting the text.
Color foreground = paintInfo.forceBlackText() ? Color::black : renderer()->selectionForegroundColor();
- if (foreground.isValid() && foreground != styleTextColor)
+ if (foreground != Color::transparent && foreground != styleTextColor)
context->setFillColor(foreground);
}
@@ -61,7 +61,8 @@ void EllipsisBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, La
int shadowX = isHorizontal() ? shadow->x() : shadow->y();
int shadowY = isHorizontal() ? shadow->y() : -shadow->x();
FloatSize offset(shadowX, shadowY);
- drawLooper.addShadow(offset, shadow->blur(), m_renderer->resolveColor(shadow->color()),
+ drawLooper.addShadow(offset, shadow->blur(),
+ m_renderer->resolveColor(shadow->color(), Color::stdShadowColor),
DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowIgnoresAlpha);
} while ((shadow = shadow->next()));
drawLooper.addUnmodifiedContent();
@@ -131,7 +132,7 @@ void EllipsisBox::paintSelection(GraphicsContext* context, const LayoutPoint& pa
{
Color textColor = m_renderer->resolveColor(style, CSSPropertyColor);
Color c = m_renderer->selectionBackgroundColor();
- if (!c.isValid() || !c.alpha())
+ if (!c.alpha())
return;
// If the text color ends up being the same as the selection background, invert the selection

Powered by Google App Engine
This is Rietveld 408576698