Merge from Chromium at DEPS revision 257591
This commit was generated by merge_to_master.py.
Change-Id: I834f3ca85c1ef7ec2c1061847a3d92aa461da043
diff --git a/Source/core/svg/SVGVKernElement.cpp b/Source/core/svg/SVGVKernElement.cpp
index ff60552..b3bdedb 100644
--- a/Source/core/svg/SVGVKernElement.cpp
+++ b/Source/core/svg/SVGVKernElement.cpp
@@ -41,8 +41,8 @@
{
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 @@
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);
}