Index: Source/core/svg/SVGHKernElement.cpp |
diff --git a/Source/core/svg/SVGHKernElement.cpp b/Source/core/svg/SVGHKernElement.cpp |
index cfd9229fdb8c49049d9fd983d1ab24c1c7acaa96..29042cd4f1cadd094aef6e0c2a815c25c275f7ac 100644 |
--- a/Source/core/svg/SVGHKernElement.cpp |
+++ b/Source/core/svg/SVGHKernElement.cpp |
@@ -41,8 +41,8 @@ PassRefPtr<SVGHKernElement> SVGHKernElement::create(Document& document) |
Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode* rootParent) |
{ |
ContainerNode* fontNode = parentNode(); |
- if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
- toSVGFontElement(fontNode)->invalidateGlyphCache(); |
+ if (isSVGFontElement(fontNode)) |
+ toSVGFontElement(*fontNode).invalidateGlyphCache(); |
return SVGElement::insertedInto(rootParent); |
} |
@@ -50,8 +50,8 @@ Node::InsertionNotificationRequest SVGHKernElement::insertedInto(ContainerNode* |
void SVGHKernElement::removedFrom(ContainerNode* rootParent) |
{ |
ContainerNode* fontNode = parentNode(); |
- if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
- toSVGFontElement(fontNode)->invalidateGlyphCache(); |
+ if (isSVGFontElement(fontNode)) |
+ toSVGFontElement(*fontNode).invalidateGlyphCache(); |
SVGElement::removedFrom(rootParent); |
} |