Index: Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
index d1a3363ab40d9043c3be3731beb672ac421c6559..2edfe27f45389ae35d0aa40782022addc6b6b8a0 100644 |
--- a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
+++ b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp |
@@ -126,6 +126,20 @@ void RenderSVGResourceGradient::postApplyResource(GraphicsContext* context) |
context->restore(); |
} |
+bool RenderSVGResourceGradient::isChildAllowed(RenderObject* child, RenderStyle*) const |
+{ |
+ if (child->isSVGGradientStop()) |
+ return true; |
+ |
+ if (!child->isSVGResourceContainer()) |
+ return false; |
+ |
+ RenderSVGResourceContainer* resource = toRenderSVGResourceContainer(child); |
+ return resource->resourceType() == PatternResourceType |
+ || resource->resourceType() == LinearGradientResourceType |
+ || resource->resourceType() == RadialGradientResourceType; |
+} |
+ |
void RenderSVGResourceGradient::addStops(GradientData* gradientData, const Vector<Gradient::ColorStop>& stops) const |
{ |
ASSERT(gradientData->gradient); |