Index: Source/core/svg/SVGVKernElement.cpp |
diff --git a/Source/core/svg/SVGVKernElement.cpp b/Source/core/svg/SVGVKernElement.cpp |
index ff60552df306fee29fe3bdadfc19cf04a63d0ff6..b3bdedbfd193fa349e637e1718eb283bdb37662d 100644 |
--- a/Source/core/svg/SVGVKernElement.cpp |
+++ b/Source/core/svg/SVGVKernElement.cpp |
@@ -41,8 +41,8 @@ Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode* |
{ |
if (rootParent->inDocument()) { |
ContainerNode* fontNode = parentNode(); |
- if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
- toSVGFontElement(fontNode)->invalidateGlyphCache(); |
+ if (isSVGFontElement(fontNode)) |
+ toSVGFontElement(*fontNode).invalidateGlyphCache(); |
} |
return SVGElement::insertedInto(rootParent); |
@@ -51,8 +51,8 @@ Node::InsertionNotificationRequest SVGVKernElement::insertedInto(ContainerNode* |
void SVGVKernElement::removedFrom(ContainerNode* rootParent) |
{ |
ContainerNode* fontNode = parentNode(); |
- if (fontNode && fontNode->hasTagName(SVGNames::fontTag)) |
- toSVGFontElement(fontNode)->invalidateGlyphCache(); |
+ if (isSVGFontElement(fontNode)) |
+ toSVGFontElement(*fontNode).invalidateGlyphCache(); |
SVGElement::removedFrom(rootParent); |
} |