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:
@@ -917,3 +917,48 @@ nsFormControlHelper::PaintCircularBorder(nsIPresContext& aPresContext,
|
||||
aRenderingContext.PopState(clip);
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsFormControlHelper::GetName(nsIContent* aContent,nsString* aResult)
|
||||
{
|
||||
nsresult result = NS_FORM_NOTOK;
|
||||
if (nsnull != aContent) {
|
||||
nsIHTMLContent* formControl = nsnull;
|
||||
result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
|
||||
if ((NS_OK == result) && formControl) {
|
||||
nsHTMLValue value;
|
||||
result = formControl->GetHTMLAttribute(nsHTMLAtoms::name, value);
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
|
||||
if (eHTMLUnit_String == value.GetUnit()) {
|
||||
value.GetStringValue(*aResult);
|
||||
}
|
||||
}
|
||||
NS_RELEASE(formControl);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsFormControlHelper::GetValue(nsIContent* aContent, nsString* aResult)
|
||||
{
|
||||
nsresult result = NS_FORM_NOTOK;
|
||||
if (nsnull != aContent) {
|
||||
nsIHTMLContent* formControl = nsnull;
|
||||
result = aContent->QueryInterface(kIHTMLContentIID, (void**)&formControl);
|
||||
if ((NS_OK == result) && formControl) {
|
||||
nsHTMLValue value;
|
||||
result = formControl->GetHTMLAttribute(nsHTMLAtoms::value, value);
|
||||
if (NS_CONTENT_ATTR_HAS_VALUE == result) {
|
||||
if (eHTMLUnit_String == value.GetUnit()) {
|
||||
value.GetStringValue(*aResult);
|
||||
}
|
||||
}
|
||||
NS_RELEASE(formControl);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user