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:
vidur%netscape.com
1999-02-05 19:55:56 +00:00
parent 0a666c164e
commit 37fc0ea58e
2 changed files with 24 additions and 2 deletions

View File

@@ -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)) {

View File

@@ -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)) {