Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: Source/core/svg/SVGVKernElement.cpp

Issue 192143002: Use isSVG*Element() helpers more in SVG code (Part 2) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/core/svg/SVGUseElement.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698