Bug 961364 - Clear the column type bits before setting them in nsTableCol{,Group}Frame::SetColType. r=dbaron

This commit is contained in:
Cameron McCormack 2014-02-18 13:32:06 +11:00
parent ce912be374
commit 415a94a6de
2 changed files with 7 additions and 2 deletions

View File

@ -47,7 +47,8 @@ nsTableColFrame::SetColType(nsTableColType aType)
GetPrevContinuation()->GetNextSibling() == this),
"spanned content cols must be continuations");
uint32_t type = aType - eColContent;
mState |= nsFrameState(type << COL_TYPE_OFFSET);
RemoveStateBits(COL_TYPE_BITS);
AddStateBits(nsFrameState(type << COL_TYPE_OFFSET));
}
/* virtual */ void

View File

@ -26,8 +26,12 @@ nsTableColGroupFrame::GetColType() const
void nsTableColGroupFrame::SetColType(nsTableColGroupType aType)
{
NS_ASSERTION(GetColType() == eColGroupContent,
"should only call nsTableColGroupFrame::SetColType with aType "
"!= eColGroupContent once");
uint32_t type = aType - eColGroupContent;
mState |= nsFrameState(type << COL_GROUP_TYPE_OFFSET);
RemoveStateBits(COL_GROUP_TYPE_BITS);
AddStateBits(nsFrameState(type << COL_GROUP_TYPE_OFFSET));
}
void nsTableColGroupFrame::ResetColIndices(nsIFrame* aFirstColGroup,