diff options
author | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-04-03 00:12:33 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <me@emiliocobos.me> | 2016-04-03 00:12:33 +0200 |
commit | b925d3ec6a5fc52dd8a00acef7a8062f346eed2d (patch) | |
tree | f5cf562c5c48965eb8b7e534a7c74ebf7a28a6e7 /tests/headers/weird_bitfields.hpp | |
parent | 6b9c662672e04045c8c65aeddcf32abf8a2d9772 (diff) |
gen: parser: Rework bitfield implementation to support enums
I've probably messed something up, I know it... also we assume the width
is 8 bits, which might be wrong, but I'll add it in a followup.
Diffstat (limited to 'tests/headers/weird_bitfields.hpp')
-rw-r--r-- | tests/headers/weird_bitfields.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/headers/weird_bitfields.hpp b/tests/headers/weird_bitfields.hpp new file mode 100644 index 00000000..75024090 --- /dev/null +++ b/tests/headers/weird_bitfields.hpp @@ -0,0 +1,32 @@ +// You can guess where this is taken from... +enum nsStyleSVGOpacitySource { + eStyleSVGOpacitySource_Normal, + eStyleSVGOpacitySource_ContextFillOpacity, + eStyleSVGOpacitySource_ContextStrokeOpacity +}; + +class Weird { + unsigned int mStrokeDasharrayLength; + unsigned char mClipRule; // [inherited] + unsigned char mColorInterpolation; // [inherited] see nsStyleConsts.h + unsigned char mColorInterpolationFilters; // [inherited] see nsStyleConsts.h + unsigned char mFillRule; // [inherited] see nsStyleConsts.h + unsigned char mImageRendering; // [inherited] see nsStyleConsts.h + unsigned char mPaintOrder; // [inherited] see nsStyleConsts.h + unsigned char mShapeRendering; // [inherited] see nsStyleConsts.h + unsigned char mStrokeLinecap; // [inherited] see nsStyleConsts.h + unsigned char mStrokeLinejoin; // [inherited] see nsStyleConsts.h + unsigned char mTextAnchor; // [inherited] see nsStyleConsts.h + unsigned char mTextRendering; // [inherited] see nsStyleConsts.h + + // In SVG glyphs, whether we inherit fill or stroke opacity from the outer + // text object. + // Use 3 bits to avoid signedness problems in MSVC. + nsStyleSVGOpacitySource mFillOpacitySource : 3; + nsStyleSVGOpacitySource mStrokeOpacitySource : 3; + + // SVG glyph outer object inheritance for other properties + bool mStrokeDasharrayFromObject : 1; + bool mStrokeDashoffsetFromObject : 1; + bool mStrokeWidthFromObject : 1; +}; |