mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1791701 - Remove StyleClear::Max. r=emilio
The `static_assert` is not very useful and maybe too strict because `StyleClear` is 8-bits, and we've asserted that `FlagBits` should be not greater than 32-bits in nsLineBox.h. Differential Revision: https://phabricator.services.mozilla.com/D157772
This commit is contained in:
parent
0997b5bec4
commit
430d8d4658
@ -61,9 +61,6 @@ nsLineBox::nsLineBox(nsIFrame* aFrame, int32_t aCount, bool aIsBlock)
|
||||
NS_ASSERTION(aIsBlock == f->IsBlockOutside(), "wrong kind of child frame");
|
||||
}
|
||||
#endif
|
||||
static_assert(static_cast<int>(StyleClear::Max) <= 15,
|
||||
"FlagBits needs more bits to store the full range of "
|
||||
"break type ('clear') values");
|
||||
mChildCount = aCount;
|
||||
MarkDirty();
|
||||
mFlags.mBlock = aIsBlock;
|
||||
@ -207,8 +204,6 @@ static void ListFloats(FILE* out, const char* aPrefix,
|
||||
return "leftbr+rightbr";
|
||||
case StyleClear::Line:
|
||||
return "linebr";
|
||||
case StyleClear::Max:
|
||||
return "leftbr+rightbr+linebr";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
@ -159,13 +159,7 @@ enum class StyleClear : uint8_t {
|
||||
Left,
|
||||
Right,
|
||||
Both,
|
||||
// StyleClear::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.
|
||||
//
|
||||
// FIXME(emilio): Doesn't look like we do that anymore, so probably can be
|
||||
// made a single value instead, and Max removed.
|
||||
Line = 8,
|
||||
Max = 13 // Max = (Both | Line)
|
||||
Line,
|
||||
};
|
||||
|
||||
enum class StyleColumnFill : uint8_t {
|
||||
|
Loading…
x
Reference in New Issue
Block a user