mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 855850: Use MOZ_STATIC_ASSERT instead of #if, to verify that "break type" values are representable in 4 bits. r=mats
This commit is contained in:
parent
5d94ac13f5
commit
c28f7f825d
@ -16,6 +16,7 @@
|
||||
#include "nsBidiPresUtils.h"
|
||||
#endif
|
||||
#include "nsStyleStructInlines.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -43,6 +44,9 @@ nsLineBox::nsLineBox(nsIFrame* aFrame, int32_t aCount, bool aIsBlock)
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_STATIC_ASSERT(NS_STYLE_CLEAR_LAST_VALUE <= 15,
|
||||
"FlagBits needs more bits to store the full range of "
|
||||
"break type ('clear') values");
|
||||
#if NS_STYLE_CLEAR_NONE > 0
|
||||
mFlags.mBreakType = NS_STYLE_CLEAR_NONE;
|
||||
#endif
|
||||
|
@ -146,10 +146,6 @@ protected:
|
||||
#define LINE_MAX_BREAK_TYPE ((1 << 4) - 1)
|
||||
#define LINE_MAX_CHILD_COUNT INT32_MAX
|
||||
|
||||
#if NS_STYLE_CLEAR_LAST_VALUE > 15
|
||||
need to rearrange the mBits bitfield;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Function to create a line box and initialize it with a single frame.
|
||||
* The allocation is infallible.
|
||||
|
Loading…
Reference in New Issue
Block a user