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

Unified Diff: Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp

Issue 453203003: Introduce DEFINE_CUSTOM_FONT_DATA_TYPE_CASTS, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
diff --git a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
index 67c9e7a4d17cade8f5cb452e32296b8dfad3a798..5fcb4996fd861c268d3a7af1f1f6e1d04b35cfde 100644
--- a/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
+++ b/Source/core/rendering/svg/SVGTextLayoutEngineSpacing.cpp
@@ -57,8 +57,7 @@ float SVGTextLayoutEngineSpacing::calculateSVGKerning(bool isVerticalText, Glyph
ASSERT(fontData->isSVGFont());
RefPtr<CustomFontData> customFontData = fontData->customFontData();
- const SVGFontData* svgFontData = static_cast<const SVGFontData*>(customFontData.get());
- SVGFontFaceElement* svgFontFace = svgFontData->svgFontFaceElement();
+ SVGFontFaceElement* svgFontFace = toSVGFontData(customFontData)->svgFontFaceElement();
ASSERT(svgFontFace);
SVGFontElement* svgFont = svgFontFace->associatedFontElement();

Powered by Google App Engine
This is Rietveld 408576698