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

Unified Diff: Source/core/svg/SVGFontElement.h

Issue 18045006: Use toSVGFontElement() instead of static_cast<SVGFontElement*> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed svg layout test 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
Index: Source/core/svg/SVGFontElement.h
diff --git a/Source/core/svg/SVGFontElement.h b/Source/core/svg/SVGFontElement.h
index 6f6f6cddf16ced25baed04875772d3d96cac5abb..774eae1c118c884226e819936ebe3c1b29e41881 100644
--- a/Source/core/svg/SVGFontElement.h
+++ b/Source/core/svg/SVGFontElement.h
@@ -23,6 +23,7 @@
#define SVGFontElement_h
#if ENABLE(SVG_FONTS)
+#include "SVGNames.h"
#include "core/svg/SVGAnimatedBoolean.h"
#include "core/svg/SVGExternalResourcesRequired.h"
#include "core/svg/SVGGlyphElement.h"
@@ -89,6 +90,12 @@ private:
bool m_isGlyphCacheValid;
};
+inline SVGFontElement* toSVGFontElement(Node* node)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::fontTag));
+ return static_cast<SVGFontElement*>(node);
+}
+
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)

Powered by Google App Engine
This is Rietveld 408576698