Bug 513110 - Adjust the maximum break type (only used in assertions) to reflect reality. r=dholbert

This commit is contained in:
Mats Palmgren 2014-03-01 10:36:39 +00:00
Родитель 7f156c7ed1
Коммит ee65ddbae1
3 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -3756,7 +3756,7 @@ nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
uint8_t breakType = NS_INLINE_GET_BREAK_TYPE(frameReflowStatus);
NS_ASSERTION((NS_STYLE_CLEAR_NONE != breakType) ||
(NS_STYLE_CLEAR_NONE != aState.mFloatBreakType), "bad break type");
NS_ASSERTION(NS_STYLE_CLEAR_LAST_VALUE >= breakType, "invalid break type");
NS_ASSERTION(NS_STYLE_CLEAR_MAX >= breakType, "invalid break type");
if (NS_INLINE_IS_BREAK_BEFORE(frameReflowStatus)) {
// Break-before cases.

Просмотреть файл

@ -43,7 +43,7 @@ nsLineBox::nsLineBox(nsIFrame* aFrame, int32_t aCount, bool aIsBlock)
}
#endif
static_assert(NS_STYLE_CLEAR_LAST_VALUE <= 15,
static_assert(NS_STYLE_CLEAR_MAX <= 15,
"FlagBits needs more bits to store the full range of "
"break type ('clear') values");
#if NS_STYLE_CLEAR_NONE > 0

Просмотреть файл

@ -319,7 +319,9 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
#define NS_STYLE_CLEAR_RIGHT 2
#define NS_STYLE_CLEAR_LEFT_AND_RIGHT 3
#define NS_STYLE_CLEAR_LINE 4
#define NS_STYLE_CLEAR_LAST_VALUE NS_STYLE_CLEAR_LINE
// @note NS_STYLE_CLEAR_LINE can be added to one of the other values in layout
// so it needs to use a bit value that none of the other values can have.
#define NS_STYLE_CLEAR_MAX (NS_STYLE_CLEAR_LINE | NS_STYLE_CLEAR_LEFT_AND_RIGHT)
// See nsStyleContent
#define NS_STYLE_CONTENT_OPEN_QUOTE 0