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

This commit is contained in:
[email protected] committed 1999-02-15 23:48:09 +00:00
1 parent ea6aaf37cb
commit 1756770bc4
4 files changed
+34 -4

No files matched your search

@@ -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;
}