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

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

Issue 18045006: Use toSVGFontElement() instead of static_cast<SVGFontElement*> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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/SVGGlyphElement.cpp ('k') | Source/core/svg/SVGVKernElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « Source/core/svg/SVGGlyphElement.cpp ('k') | Source/core/svg/SVGVKernElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698