Bug 372768: {inc}Setting nowrap attribute dynamically does not change layout like it should. r=bzbarsky,sr=dbaron.

This commit is contained in:
sharparrow1@yahoo.com 2007-07-01 11:42:18 -07:00
Родитель 4560253525
Коммит 9da968b142
2 изменённых файлов: 9 добавлений и 0 удалений

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

@ -128,6 +128,8 @@ GetWidthInfo(nsIRenderingContext *aRenderingContext,
// Quirk: A cell with "nowrap" set and a coord value for the
// width which is bigger than the intrinsic minimum width uses
// that coord value as the minimum width.
// This is kept up-to-date with dynamic chnages to nowrap by code in
// nsTableCellFrame::AttributeChanged
if (aIsCell && w > minCoord &&
aFrame->PresContext()->CompatibilityMode() ==
eCompatibility_NavQuirks &&

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

@ -221,6 +221,13 @@ nsTableCellFrame::AttributeChanged(PRInt32 aNameSpaceID,
nsIAtom* aAttribute,
PRInt32 aModType)
{
// We need to recalculate in this case because of the nowrap quirk in
// BasicTableLayoutStrategy
if (aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::nowrap &&
PresContext()->CompatibilityMode() == eCompatibility_NavQuirks) {
PresContext()->PresShell()->
FrameNeedsReflow(this, nsIPresShell::eTreeChange, NS_FRAME_IS_DIRTY);
}
// let the table frame decide what to do
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
if (tableFrame) {