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

Unified Diff: Source/core/rendering/svg/SVGInlineTextBox.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/svg/SVGInlineTextBox.cpp
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp
index db62df8e1365327e0e65975a314b59931bd2996a..0b94074c6873d8d2fe678e3b9438398b0a1ff19c 100644
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp
@@ -206,7 +206,7 @@ void SVGInlineTextBox::paintSelectionBackground(PaintInfo& paintInfo)
return;
Color backgroundColor = renderer()->selectionBackgroundColor();
- if (!backgroundColor.isValid() || !backgroundColor.alpha())
+ if (!backgroundColor.alpha())
return;
RenderSVGInlineText* textRenderer = toRenderSVGInlineText(this->textRenderer());
@@ -355,7 +355,7 @@ bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float
ASSERT(style);
ASSERT(m_paintingResourceMode != ApplyToDefaultMode);
- Color fallbackColor;
+ StyleColor fallbackColor;
if (m_paintingResourceMode & ApplyToFillMode)
m_paintingResource = RenderSVGResource::fillPaintingResource(renderer, style, fallbackColor);
else if (m_paintingResourceMode & ApplyToStrokeMode)
@@ -371,7 +371,7 @@ bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float
if (!m_paintingResource->applyResource(renderer, style, context, m_paintingResourceMode)) {
if (fallbackColor.isValid()) {
RenderSVGResourceSolidColor* fallbackResource = RenderSVGResource::sharedSolidPaintingResource();
- fallbackResource->setColor(fallbackColor);
+ fallbackResource->setColor(fallbackColor.color());
m_paintingResource = fallbackResource;
m_paintingResource->applyResource(renderer, style, context, m_paintingResourceMode);
@@ -624,7 +624,7 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
DrawLooper drawLooper;
do {
FloatSize offset(shadow->x(), shadow->y());
- drawLooper.addShadow(offset, shadow->blur(), shadow->color(),
+ drawLooper.addShadow(offset, shadow->blur(), textRenderer->resolveColor(shadow->color(), Color::stdShadowColor),
DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowRespectsAlpha);
} while ((shadow = shadow->next()));
drawLooper.addUnmodifiedContent();

Powered by Google App Engine
This is Rietveld 408576698