Added support for setting the DISABLED attrivute via the DOM...

This commit is contained in:
rpotts%netscape.com 1999-01-21 09:51:28 +00:00
parent 8c7a8f2392
commit 3aad0278d5
4 changed files with 11 additions and 1 deletions

View File

@ -430,6 +430,9 @@ nsFormControlFrame::AttributeChanged(nsIPresContext* aPresContext,
nsIAtom* aAttribute,
PRInt32 aHint)
{
if (nsHTMLAtoms::disabled == aAttribute) {
mWidget->Enable(!nsFormFrame::GetDisabled(this));
}
return NS_OK;
}

View File

@ -205,6 +205,8 @@ nsButtonControlFrame::AttributeChanged(nsIPresContext* aPresContext,
}
} else if (nsHTMLAtoms::size == aAttribute) {
nsFormFrame::StyleChangeReflow(aPresContext, this);
} else {
result = nsFormControlFrame::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
}
}
return result;

View File

@ -190,7 +190,9 @@ nsCheckboxControlFrame::AttributeChanged(nsIPresContext* aPresContext,
}
NS_RELEASE(button);
}
}
} else {
result = nsFormControlFrame::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
}
}
return result;
}

View File

@ -430,6 +430,9 @@ nsFormControlFrame::AttributeChanged(nsIPresContext* aPresContext,
nsIAtom* aAttribute,
PRInt32 aHint)
{
if (nsHTMLAtoms::disabled == aAttribute) {
mWidget->Enable(!nsFormFrame::GetDisabled(this));
}
return NS_OK;
}