Fixed border rendering during printing for Select and text, and text areas.

Implemented SetProperty/GetProperty methods for FileControlFrame
Added nsGenericHTMLElement::GetPrimaryFrame check for nsnull for doc return type.
nsHTMLInputElement.cpp replace NS_OK == with  NS_SUCCEEDED in GetValue and SetValue
Added GetName and GetValue utility methods to nsFormControlHelper
modified nsButtonControlFrame::PaintButton to take the label to paint as an extra parameter.
This allows it to be callable from the nsFileControlFrame code to render the button.
This commit is contained in:
kmcclusk@netscape.com
1999-02-11 01:13:28 +00:00
parent 4c76a367ae
commit d7eefcc655
23 changed files with 317 additions and 129 deletions
+10 -6
View File
@@ -321,9 +321,11 @@ nsHTMLInputElement::GetValue(nsString& aValue)
GetType(&type);
if (NS_FORM_INPUT_TEXT == type || NS_FORM_INPUT_PASSWORD == type) {
nsIFormControlFrame* formControlFrame = nsnull;
if (NS_OK == nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame)) {
formControlFrame->GetProperty(nsHTMLAtoms::value, aValue);
NS_RELEASE(formControlFrame);
if (NS_SUCCEEDED(nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame))) {
if (nsnull != formControlFrame) {
formControlFrame->GetProperty(nsHTMLAtoms::value, aValue);
NS_RELEASE(formControlFrame);
}
return NS_OK;
}
}
@@ -338,9 +340,11 @@ nsHTMLInputElement::SetValue(const nsString& aValue)
GetType(&type);
if (NS_FORM_INPUT_TEXT == type) {
nsIFormControlFrame* formControlFrame = nsnull;
if (NS_OK == nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame)) {
formControlFrame->SetProperty(nsHTMLAtoms::value, aValue);
NS_RELEASE(formControlFrame);
if (NS_SUCCEEDED(nsGenericHTMLElement::GetPrimaryFrame(this, formControlFrame))) {
if (nsnull != formControlFrame ) {
formControlFrame->SetProperty(nsHTMLAtoms::value, aValue);
NS_RELEASE(formControlFrame);
}
}
}
return NS_OK;