Index: Source/core/svg/SVGHKernElement.cpp |
diff --git a/Source/core/svg/SVGHKernElement.cpp b/Source/core/svg/SVGHKernElement.cpp |
index d9f0b07ee9254dde1a6ae043ad03f287cc2700bf..70cec60307e22d01fff6fb4acf12b49848823c99 100644 |
--- a/Source/core/svg/SVGHKernElement.cpp |
+++ b/Source/core/svg/SVGHKernElement.cpp |
@@ -44,10 +44,8 @@ PassRefPtr<SVGHKernElement> SVGHKernElement::create(const QualifiedName& tagName |
Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode* rootParent) |
{ |
ContainerNode* fontNode = parentNode(); |
- if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) { |
- if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode)) |
- element->invalidateGlyphCache(); |
- } |
+ if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
+ toSVGFontElement(fontNode)->invalidateGlyphCache(); |
return SVGElement::insertedInto(rootParent); |
} |
@@ -55,10 +53,8 @@ Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode* |
void SVGHKernElement::removedFrom(ContainerNode* rootParent) |
{ |
ContainerNode* fontNode = parentNode(); |
- if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) { |
- if (SVGFontElement* element = static_cast<SVGFontElement*>(fontNode)) |
- element->invalidateGlyphCache(); |
- } |
+ if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
+ toSVGFontElement(fontNode)->invalidateGlyphCache(); |
SVGElement::removedFrom(rootParent); |
} |