зеркало из https://github.com/mozilla/gecko-dev.git
Fixed default hint for attribute changed - it wasn't being set.
Special-cased SRC attribute for nsHTMLImageElement.
This commit is contained in:
Родитель
3545ee7a90
Коммит
166576867e
|
@ -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;
|
||||
}
|
Загрузка…
Ссылка в новой задаче