Comments with nsCSSProps.cpp:kCSSRawFontDescs and elsewhere warn the reader about keeping various bits in sync. No one list is complete and each list is slightly different. Make the madness stop! Patch incoming.
Created attachment 583152 [details] [diff] [review] patch Simple patch to create nsCSSFontDescList.h and make various places use it.
Could you make the parameters to the macro not be uppercase, but instead have a trailing _ character? That matches the style of other things in nearby code, in particular, nsCSSPropList.h. Also, since the fields actually match 2 of the fields in the CSS_PROP macro, could you use the same names, so that you have: #define CSS_FONT_DESC(name_, method_) instead of: #define FONT_DESC(CSS_PROP, NAME) Otherwise, looks great.
Comment on attachment 583152 [details] [diff] [review] patch In addition to what dbaron said, those trailing commas are likely to be a problem, iirc. Add nsnull at the end of kCSSRawFontDescs, for sure; I think nsCSSFontFaceStyleDecl::Fields should have one too. r=me with that.
Why does either need a null? They're only accessed by index, I hope.
Last I checked some compilers warned on the trailing comma. But maybe not anymore?
We already have trailing commas elsewhere, e.g. nsCSSProps.cpp:kCSSRawProperties.
OK, then don't worry about it.
Created attachment 584780 [details] [diff] [review] patch v2 Addressed bz and dbaron's comments. Carrying over r+.