mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
Added style hints for DOM attribute changes to the FONT and BASEFONT content objects.
This commit is contained in:
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;
|
||||
}
|
||||
Reference in new issue
Block a user