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

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

Issue 673753004: Move RenderSVGResource into the inheritance hierarchy (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Non-move changes. Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/svg/SVGRenderSupport.h ('k') | Source/core/rendering/svg/SVGResources.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/svg/SVGRenderTreeAsText.cpp
diff --git a/Source/core/rendering/svg/SVGRenderTreeAsText.cpp b/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
index 9f39d43e8363b2a60202a1bbfba0b9c1426e4404..3e95b0c9fa035759de525f478ef2299887ed19a9 100644
--- a/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
+++ b/Source/core/rendering/svg/SVGRenderTreeAsText.cpp
@@ -253,17 +253,15 @@ static void writeSVGPaintingResource(TextStream& ts, const SVGPaintDescription&
return;
}
- RenderSVGResource* resource = paintDescription.resource;
- // All other resources derive from RenderSVGResourceContainer
- RenderSVGResourceContainer* container = static_cast<RenderSVGResourceContainer*>(resource);
- SVGElement* element = container->element();
+ RenderSVGResourcePaintServer* paintServerContainer = paintDescription.resource;
+ SVGElement* element = paintServerContainer->element();
ASSERT(element);
- if (container->resourceType() == PatternResourceType)
+ if (paintServerContainer->resourceType() == PatternResourceType)
ts << "[type=PATTERN]";
- else if (container->resourceType() == LinearGradientResourceType)
+ else if (paintServerContainer->resourceType() == LinearGradientResourceType)
ts << "[type=LINEAR-GRADIENT]";
- else if (container->resourceType() == RadialGradientResourceType)
+ else if (paintServerContainer->resourceType() == RadialGradientResourceType)
ts << "[type=RADIAL-GRADIENT]";
ts << " [id=\"" << element->getIdAttribute() << "\"]";
@@ -282,7 +280,7 @@ static void writeStyle(TextStream& ts, const RenderObject& object)
const RenderSVGShape& shape = static_cast<const RenderSVGShape&>(object);
ASSERT(shape.element());
- SVGPaintDescription strokePaintDescription = RenderSVGResource::requestPaintDescription(shape, shape.style(), ApplyToStrokeMode);
+ SVGPaintDescription strokePaintDescription = RenderSVGResourcePaintServer::requestPaintDescription(shape, shape.style(), ApplyToStrokeMode);
if (strokePaintDescription.isValid) {
TextStreamSeparator s(" ");
ts << " [stroke={" << s;
@@ -311,7 +309,7 @@ static void writeStyle(TextStream& ts, const RenderObject& object)
ts << "}]";
}
- SVGPaintDescription fillPaintDescription = RenderSVGResource::requestPaintDescription(shape, shape.style(), ApplyToFillMode);
+ SVGPaintDescription fillPaintDescription = RenderSVGResourcePaintServer::requestPaintDescription(shape, shape.style(), ApplyToFillMode);
if (fillPaintDescription.isValid) {
TextStreamSeparator s(" ");
ts << " [fill={" << s;
« no previous file with comments | « Source/core/rendering/svg/SVGRenderSupport.h ('k') | Source/core/rendering/svg/SVGResources.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698