SVGSwitchElement.cpp [plain text]
#include "config.h"
#if SVG_SUPPORT
#include "Attr.h"
#include <kcanvas/KCanvasCreator.h>
#include <kcanvas/RenderSVGContainer.h>
#include <kcanvas/device/KRenderingDevice.h>
#include "SVGNames.h"
#include "SVGHelper.h"
#include "SVGTests.h"
#include "SVGSwitchElement.h"
#include "SVGAnimatedLength.h"
namespace WebCore {
SVGSwitchElement::SVGSwitchElement(const QualifiedName& tagName, Document *doc)
: SVGStyledTransformableElement(tagName, doc), SVGTests(), SVGLangSpace(), SVGExternalResourcesRequired()
{
}
SVGSwitchElement::~SVGSwitchElement()
{
}
bool SVGSwitchElement::childShouldCreateRenderer(Node *child) const
{
for (Node *n = firstChild(); n != 0; n = n->nextSibling()) {
SVGElement *element = svg_dynamic_cast(n);
if (element && element->isValid())
return (n == child); }
return false;
}
RenderObject* SVGSwitchElement::createRenderer(RenderArena* arena, RenderStyle*)
{
return new (arena) RenderSVGContainer(this);
}
}
#endif // SVG_SUPPORT