Make sure to reframe when the "rules" attribute changes, since tables cache all

sorts of border-collapse stuff across reflows.  Bug 226593, r=bernd, sr=dbaron,
a=brendan
This commit is contained in:
bzbarsky%mit.edu 2003-12-04 06:26:15 +00:00
Родитель 991b944827
Коммит 567e341b75
3 изменённых файлов: 8 добавлений и 5 удалений

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

@ -1487,9 +1487,6 @@ nsHTMLTableElement::HasAttributeDependentStyle(const nsIAtom* aAttribute) const
{ &nsHTMLAtoms::bordercolor },
// Changing to rules will force border-collapse. Unfortunately, if
// border-collapse was already in effect, then a frame change is
// not necessary.
{ &nsHTMLAtoms::align },
{ &nsHTMLAtoms::rules },
{ nsnull }

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

@ -875,9 +875,12 @@ nsStyleTable::nsStyleTable(const nsStyleTable& aSource)
nsChangeHint nsStyleTable::CalcDifference(const nsStyleTable& aOther) const
{
// Changes in mRules may require reframing (if border-collapse stuff changes, for example).
if (mRules != aOther.mRules)
return NS_STYLE_HINT_FRAMECHANGE;
if ((mLayoutStrategy == aOther.mLayoutStrategy) &&
(mFrame == aOther.mFrame) &&
(mRules == aOther.mRules) &&
(mCols == aOther.mCols) &&
(mSpan == aOther.mSpan))
return NS_STYLE_HINT_NONE;

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

@ -875,9 +875,12 @@ nsStyleTable::nsStyleTable(const nsStyleTable& aSource)
nsChangeHint nsStyleTable::CalcDifference(const nsStyleTable& aOther) const
{
// Changes in mRules may require reframing (if border-collapse stuff changes, for example).
if (mRules != aOther.mRules)
return NS_STYLE_HINT_FRAMECHANGE;
if ((mLayoutStrategy == aOther.mLayoutStrategy) &&
(mFrame == aOther.mFrame) &&
(mRules == aOther.mRules) &&
(mCols == aOther.mCols) &&
(mSpan == aOther.mSpan))
return NS_STYLE_HINT_NONE;