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
Родитель ce912be374
Коммит 415a94a6de
2 изменённых файлов: 7 добавлений и 2 удалений

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

@ -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

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

@ -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,