Bug 1342330 Part 2 - Convert uint32_t to bool in nsLineBox::FlagBits. r?xidorn
They're all one bit flags, so we should use bool.
MozReview-Commit-ID: 5twqu3SIXKl
--- a/layout/generic/nsLineBox.h
+++ b/layout/generic/nsLineBox.h
@@ -218,17 +218,17 @@ public:
nsIFrame* aFrame, int32_t aCount);
void Destroy(nsIPresShell* aPresShell);
// mBlock bit
bool IsBlock() const {
return mFlags.mBlock;
}
bool IsInline() const {
- return 0 == mFlags.mBlock;
+ return !mFlags.mBlock;
}
// mDirty bit
void MarkDirty() {
mFlags.mDirty = 1;
}
void ClearDirty() {
mFlags.mDirty = 0;
@@ -652,35 +652,35 @@ public:
// mFlags.mHasHashedFrames says which one to use
union {
nsTHashtable< nsPtrHashKey<nsIFrame> >* mFrames;
uint32_t mChildCount;
};
struct FlagBits {
- uint32_t mDirty : 1;
- uint32_t mPreviousMarginDirty : 1;
- uint32_t mHasClearance : 1;
- uint32_t mBlock : 1;
- uint32_t mImpactedByFloat : 1;
- uint32_t mLineWrapped: 1;
- uint32_t mInvalidateTextRuns : 1;
+ bool mDirty : 1;
+ bool mPreviousMarginDirty : 1;
+ bool mHasClearance : 1;
+ bool mBlock : 1;
+ bool mImpactedByFloat : 1;
+ bool mLineWrapped: 1;
+ bool mInvalidateTextRuns : 1;
// default 0 = means that the opt potentially applies to this line.
// 1 = never skip reflowing this line for a resize reflow
- uint32_t mResizeReflowOptimizationDisabled: 1;
- uint32_t mEmptyCacheValid: 1;
- uint32_t mEmptyCacheState: 1;
+ bool mResizeReflowOptimizationDisabled: 1;
+ bool mEmptyCacheValid: 1;
+ bool mEmptyCacheState: 1;
// mHasBullet indicates that this is an inline line whose block's
// bullet is adjacent to this line and non-empty.
- uint32_t mHasBullet : 1;
+ bool mHasBullet : 1;
// Indicates that this line *may* have a placeholder for a float
// that was pushed to a later column or page.
- uint32_t mHadFloatPushed : 1;
- uint32_t mHasHashedFrames: 1;
+ bool mHadFloatPushed : 1;
+ bool mHasHashedFrames: 1;
uint32_t mBreakType : 4;
};
struct ExtraData {
explicit ExtraData(const nsRect& aBounds) : mOverflowAreas(aBounds, aBounds) {
}
nsOverflowAreas mOverflowAreas;
};