Added style hints for DOM attribute changes to the FONT and BASEFONT content objects.

This commit is contained in:
nisheeth%netscape.com 1999-02-15 23:48:09 +00:00
Родитель a5f0d1d47c
Коммит 53cf494871
4 изменённых файлов: 34 добавлений и 4 удалений

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

@ -182,6 +182,16 @@ nsHTMLBaseFontElement::GetStyleHintForAttributeChange(
const nsIAtom* aAttribute,
PRInt32 *aHint) const
{
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
if (nsHTMLAtoms::color == aAttribute ||
nsHTMLAtoms::face == aAttribute ||
nsHTMLAtoms::size == aAttribute) {
// XXX This hint should be changed to the one that will instruct the
// caller to reconstruct the entire document. Since that hint
// is not yet implemented, I'm passing a reflow hint for now.
*aHint = NS_STYLE_HINT_REFLOW;
}
else {
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
}
return NS_OK;
}

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

@ -341,6 +341,11 @@ nsHTMLFontElement::GetStyleHintForAttributeChange(
const nsIAtom* aAttribute,
PRInt32 *aHint) const
{
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
if (nsHTMLAtoms::color == aAttribute) {
*aHint = NS_STYLE_HINT_VISUAL;
}
else {
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
}
return NS_OK;
}

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

@ -182,6 +182,16 @@ nsHTMLBaseFontElement::GetStyleHintForAttributeChange(
const nsIAtom* aAttribute,
PRInt32 *aHint) const
{
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
if (nsHTMLAtoms::color == aAttribute ||
nsHTMLAtoms::face == aAttribute ||
nsHTMLAtoms::size == aAttribute) {
// XXX This hint should be changed to the one that will instruct the
// caller to reconstruct the entire document. Since that hint
// is not yet implemented, I'm passing a reflow hint for now.
*aHint = NS_STYLE_HINT_REFLOW;
}
else {
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
}
return NS_OK;
}

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

@ -341,6 +341,11 @@ nsHTMLFontElement::GetStyleHintForAttributeChange(
const nsIAtom* aAttribute,
PRInt32 *aHint) const
{
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
if (nsHTMLAtoms::color == aAttribute) {
*aHint = NS_STYLE_HINT_VISUAL;
}
else {
nsGenericHTMLElement::GetStyleHintForCommonAttributes(this, aAttribute, aHint);
}
return NS_OK;
}