зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5d94ac13f5
Коммит
c28f7f825d
|
@ -16,6 +16,7 @@
|
||||||
#include "nsBidiPresUtils.h"
|
#include "nsBidiPresUtils.h"
|
||||||
#endif
|
#endif
|
||||||
#include "nsStyleStructInlines.h"
|
#include "nsStyleStructInlines.h"
|
||||||
|
#include "mozilla/Assertions.h"
|
||||||
#include "mozilla/Likely.h"
|
#include "mozilla/Likely.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -43,6 +44,9 @@ nsLineBox::nsLineBox(nsIFrame* aFrame, int32_t aCount, bool aIsBlock)
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
#if NS_STYLE_CLEAR_NONE > 0
|
||||||
mFlags.mBreakType = NS_STYLE_CLEAR_NONE;
|
mFlags.mBreakType = NS_STYLE_CLEAR_NONE;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -146,10 +146,6 @@ protected:
|
||||||
#define LINE_MAX_BREAK_TYPE ((1 << 4) - 1)
|
#define LINE_MAX_BREAK_TYPE ((1 << 4) - 1)
|
||||||
#define LINE_MAX_CHILD_COUNT INT32_MAX
|
#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.
|
* Function to create a line box and initialize it with a single frame.
|
||||||
* The allocation is infallible.
|
* The allocation is infallible.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче