QuirkMode: support for background="" to override the table inheriting the background down to the cells.

This commit is contained in:
attinasi%netscape.com 2000-05-06 05:48:38 +00:00
Родитель cecb05c0dd
Коммит 309bb9300a
2 изменённых файлов: 26 добавлений и 0 удалений

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

@ -2821,6 +2821,19 @@ nsGenericHTMLElement::MapBackgroundAttributesInto(const nsIHTMLMappedAttributes*
}
}
}
} else if (aPresContext) {
// in NavQuirks mode, allow the empty string to set the background to empty
nsCompatibility mode;
aPresContext->GetCompatibilityMode(&mode);
if (eCompatibility_NavQuirks == mode &&
eHTMLUnit_Empty == value.GetUnit()) {
nsAutoString spec;
nsStyleColor* color;
color = (nsStyleColor*)aContext->GetMutableStyleData(eStyleStruct_Color);
color->mBackgroundImage = spec;
color->mBackgroundFlags &= ~NS_STYLE_BG_IMAGE_NONE;
color->mBackgroundRepeat = NS_STYLE_BG_REPEAT_XY;
}
}
}

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

@ -2821,6 +2821,19 @@ nsGenericHTMLElement::MapBackgroundAttributesInto(const nsIHTMLMappedAttributes*
}
}
}
} else if (aPresContext) {
// in NavQuirks mode, allow the empty string to set the background to empty
nsCompatibility mode;
aPresContext->GetCompatibilityMode(&mode);
if (eCompatibility_NavQuirks == mode &&
eHTMLUnit_Empty == value.GetUnit()) {
nsAutoString spec;
nsStyleColor* color;
color = (nsStyleColor*)aContext->GetMutableStyleData(eStyleStruct_Color);
color->mBackgroundImage = spec;
color->mBackgroundFlags &= ~NS_STYLE_BG_IMAGE_NONE;
color->mBackgroundRepeat = NS_STYLE_BG_REPEAT_XY;
}
}
}