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

Unified Diff: Source/core/rendering/svg/SVGInlineTextBox.cpp

Issue 23581008: Revert r154797: "Move isValid/isCurrentColor from Color to StyleColor" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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: Source/core/rendering/svg/SVGInlineTextBox.cpp
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp
index 882ddcda3acbf3d9670b271cd975bf65f705ade6..d15a979b6a4be3b75daa4354f9be95c54d4b3b49 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.alpha())
+ if (!backgroundColor.isValid() || !backgroundColor.alpha())
return;
RenderSVGInlineText* textRenderer = toRenderSVGInlineText(this->textRenderer());
@@ -368,7 +368,7 @@ bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float
ASSERT(style);
ASSERT(m_paintingResourceMode != ApplyToDefaultMode);
- StyleColor fallbackColor;
+ Color fallbackColor;
if (m_paintingResourceMode & ApplyToFillMode)
m_paintingResource = RenderSVGResource::fillPaintingResource(renderer, style, fallbackColor);
else if (m_paintingResourceMode & ApplyToStrokeMode)
@@ -384,7 +384,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.color());
+ fallbackResource->setColor(fallbackColor);
m_paintingResource = fallbackResource;
m_paintingResource->applyResource(renderer, style, context, m_paintingResourceMode);
@@ -641,7 +641,7 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
DrawLooper drawLooper;
do {
FloatSize offset(shadow->x(), shadow->y());
- drawLooper.addShadow(offset, shadow->blur(), textRenderer->resolveColor(shadow->color(), Color::stdShadowColor),
+ drawLooper.addShadow(offset, shadow->blur(), shadow->color(),
DrawLooper::ShadowRespectsTransforms, DrawLooper::ShadowRespectsAlpha);
} while ((shadow = shadow->next()));
drawLooper.addUnmodifiedContent();

Powered by Google App Engine
This is Rietveld 408576698