Fixed default hint for attribute changed - it wasn't being set.

Special-cased SRC attribute for nsHTMLImageElement.
This commit is contained in:
michaelp%netscape.com 1998-12-18 19:02:36 +00:00
Родитель 3545ee7a90
Коммит 166576867e
4 изменённых файлов: 12 добавлений и 2 удалений

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

@ -1771,6 +1771,8 @@ nsGenericHTMLElement::SetStyleHintForCommonAttributes(const nsIContent* aNode,
*aHint = NS_STYLE_HINT_VISUAL;
}
else {
// XXX Make sure we at least set it to something
*aHint = NS_STYLE_HINT_REFLOW;
setHint = PR_FALSE;
}
return setHint;

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

@ -355,6 +355,9 @@ nsHTMLImageElement::GetStyleHintForAttributeChange(
const nsIAtom* aAttribute,
PRInt32 *aHint) const
{
nsGenericHTMLElement::SetStyleHintForCommonAttributes(aNode, aAttribute, aHint);
if (aAttribute == nsHTMLAtoms::src)
*aHint = NS_STYLE_HINT_CONTENT;
else
nsGenericHTMLElement::SetStyleHintForCommonAttributes(aNode, aAttribute, aHint);
return NS_OK;
}

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

@ -1771,6 +1771,8 @@ nsGenericHTMLElement::SetStyleHintForCommonAttributes(const nsIContent* aNode,
*aHint = NS_STYLE_HINT_VISUAL;
}
else {
// XXX Make sure we at least set it to something
*aHint = NS_STYLE_HINT_REFLOW;
setHint = PR_FALSE;
}
return setHint;

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

@ -355,6 +355,9 @@ nsHTMLImageElement::GetStyleHintForAttributeChange(
const nsIAtom* aAttribute,
PRInt32 *aHint) const
{
nsGenericHTMLElement::SetStyleHintForCommonAttributes(aNode, aAttribute, aHint);
if (aAttribute == nsHTMLAtoms::src)
*aHint = NS_STYLE_HINT_CONTENT;
else
nsGenericHTMLElement::SetStyleHintForCommonAttributes(aNode, aAttribute, aHint);
return NS_OK;
}