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

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

Issue 23377003: Add toSVGMissingGlyphElement(), and use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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 | « no previous file | Source/core/svg/SVGMissingGlyphElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGFontElement.cpp
diff --git a/Source/core/svg/SVGFontElement.cpp b/Source/core/svg/SVGFontElement.cpp
index 08d15de0cb6e83961899a82374b9bea750792cd4..e076129eaed2135ff43ec55e3af45b70f96f0bf1 100644
--- a/Source/core/svg/SVGFontElement.cpp
+++ b/Source/core/svg/SVGFontElement.cpp
@@ -73,7 +73,7 @@ SVGMissingGlyphElement* SVGFontElement::firstMissingGlyphElement() const
{
for (Node* child = firstChild(); child; child = child->nextSibling()) {
if (child->hasTagName(SVGNames::missing_glyphTag))
- return static_cast<SVGMissingGlyphElement*>(child);
+ return toSVGMissingGlyphElement(child);
}
return 0;
@@ -141,8 +141,9 @@ void SVGFontElement::ensureGlyphCache()
} else if (child->hasTagName(SVGNames::vkernTag)) {
SVGVKernElement* vkern = static_cast<SVGVKernElement*>(child);
vkern->buildVerticalKerningPair(m_verticalKerningPairs);
- } else if (child->hasTagName(SVGNames::missing_glyphTag) && !firstMissingGlyphElement)
- firstMissingGlyphElement = static_cast<SVGMissingGlyphElement*>(child);
+ } else if (child->hasTagName(SVGNames::missing_glyphTag) && !firstMissingGlyphElement) {
+ firstMissingGlyphElement = toSVGMissingGlyphElement(child);
+ }
}
// Register each character of each ligature, if needed.
« no previous file with comments | « no previous file | Source/core/svg/SVGMissingGlyphElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698