зеркало из https://github.com/mozilla/gecko-dev.git
Bug 372768: {inc}Setting nowrap attribute dynamically does not change layout like it should. r=bzbarsky,sr=dbaron.
This commit is contained in:
Родитель
4560253525
Коммит
9da968b142
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче