Chromium Code Reviews| Index: Source/platform/fonts/CustomFontData.h |
| diff --git a/Source/platform/fonts/CustomFontData.h b/Source/platform/fonts/CustomFontData.h |
| index d15c2b2c10b44cd612ac933e6b1a3a47e3db4fdc..b281342ddeb1ee7bd1f91d642806401878c4a1bd 100644 |
| --- a/Source/platform/fonts/CustomFontData.h |
| +++ b/Source/platform/fonts/CustomFontData.h |
| @@ -56,6 +56,10 @@ protected: |
| CustomFontData() { } |
| }; |
| +#define DEFINE_CUSTOM_FONT_DATA_TYPE_CASTS(thisType, predicate) \ |
|
tkent
2014/08/11 01:04:56
I feel introducing new macro only for SVGFontData
gyuyoung-inactive
2014/08/11 04:50:55
If there is only SVGFontData as child class of Cus
|
| + template<typename T> inline thisType* to##thisType(const RefPtr<T>& customFontData) { return to##thisType(customFontData.get()); } \ |
| + DEFINE_TYPE_CASTS(thisType, CustomFontData, customFontData, customFontData->predicate, customFontData.predicate) |
| + |
| } |
| #endif // CustomFontData_h |