Hooked up style hint for id, class and dir
git-svn-id: svn://10.0.0.236/trunk@19868 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1902,13 +1902,24 @@ static PRBool AttributeChangeRequiresReflow(const nsIAtom* aAttribute)
|
||||
aAttribute==nsHTMLAtoms::width);
|
||||
}
|
||||
|
||||
static PRBool AttributeChangeRequiresReframe(const nsIAtom* aAttribute)
|
||||
{
|
||||
return (PRBool)
|
||||
(aAttribute==nsHTMLAtoms::id ||
|
||||
aAttribute==nsHTMLAtoms::kClass ||
|
||||
aAttribute==nsHTMLAtoms::dir);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsGenericHTMLElement::SetStyleHintForCommonAttributes(const nsIContent* aNode,
|
||||
const nsIAtom* aAttribute,
|
||||
PRInt32* aHint)
|
||||
{
|
||||
PRBool setHint = PR_TRUE;
|
||||
if (PR_TRUE == AttributeChangeRequiresReflow(aAttribute)) {
|
||||
if (PR_TRUE == AttributeChangeRequiresReframe(aAttribute)) {
|
||||
*aHint = NS_STYLE_HINT_FRAMECHANGE;
|
||||
}
|
||||
else if (PR_TRUE == AttributeChangeRequiresReflow(aAttribute)) {
|
||||
*aHint = NS_STYLE_HINT_REFLOW;
|
||||
}
|
||||
else if (PR_TRUE == AttributeChangeRequiresRepaint(aAttribute)) {
|
||||
|
||||
@@ -1902,13 +1902,24 @@ static PRBool AttributeChangeRequiresReflow(const nsIAtom* aAttribute)
|
||||
aAttribute==nsHTMLAtoms::width);
|
||||
}
|
||||
|
||||
static PRBool AttributeChangeRequiresReframe(const nsIAtom* aAttribute)
|
||||
{
|
||||
return (PRBool)
|
||||
(aAttribute==nsHTMLAtoms::id ||
|
||||
aAttribute==nsHTMLAtoms::kClass ||
|
||||
aAttribute==nsHTMLAtoms::dir);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsGenericHTMLElement::SetStyleHintForCommonAttributes(const nsIContent* aNode,
|
||||
const nsIAtom* aAttribute,
|
||||
PRInt32* aHint)
|
||||
{
|
||||
PRBool setHint = PR_TRUE;
|
||||
if (PR_TRUE == AttributeChangeRequiresReflow(aAttribute)) {
|
||||
if (PR_TRUE == AttributeChangeRequiresReframe(aAttribute)) {
|
||||
*aHint = NS_STYLE_HINT_FRAMECHANGE;
|
||||
}
|
||||
else if (PR_TRUE == AttributeChangeRequiresReflow(aAttribute)) {
|
||||
*aHint = NS_STYLE_HINT_REFLOW;
|
||||
}
|
||||
else if (PR_TRUE == AttributeChangeRequiresRepaint(aAttribute)) {
|
||||
|
||||
Reference in New Issue
Block a user