bug #5993. Removed references to nsIWidget in form HTML content elements. the form elements

now go through the nsFormControlFrame interface instead. This removes the dependency between
form element content and nsIWidget.


git-svn-id: svn://10.0.0.236/trunk@31518 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kmcclusk%netscape.com
1999-05-13 23:45:40 +00:00
parent 48e71616c3
commit 7972adcafd
28 changed files with 368 additions and 330 deletions

View File

@@ -857,13 +857,30 @@ void nsTextControlFrame::SetTextControlFrameState(const nsString& aValue)
NS_IMETHODIMP nsTextControlFrame::SetProperty(nsIAtom* aName, const nsString& aValue)
{
nsresult rv = NS_OK;
if (nsHTMLAtoms::value == aName) {
SetTextControlFrameState(aValue);
} else if (nsHTMLAtoms::select == aName) {
if (nsnull != mWidget) {
nsITextWidget *textWidget;
rv = mWidget->QueryInterface(kITextWidgetIID, (void**)&textWidget);
if (NS_SUCCEEDED(rv)) {
textWidget->SelectAll();
NS_RELEASE(textWidget);
}
nsITextAreaWidget *textAreaWidget;
rv = mWidget->QueryInterface(kITextAreaWidgetIID, (void**)&textAreaWidget);
if (NS_SUCCEEDED(rv)) {
textAreaWidget->SelectAll();
NS_RELEASE(textAreaWidget);
}
}
}
else {
return nsFormControlFrame::SetProperty(aName, aValue);
}
return NS_OK;
return rv;
}
NS_IMETHODIMP nsTextControlFrame::GetProperty(nsIAtom* aName, nsString& aValue)