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

Unified Diff: Source/platform/fonts/CustomFontData.h

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
« no previous file with comments | « Source/core/svg/SVGFontData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/svg/SVGFontData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698