Bug 566046. 'target' IDL attribute should reflect content attribute. r=sicking

This commit is contained in:
Mounir Lamouri 2010-06-01 11:43:11 +12:00
parent 18ce766a1d
commit 38b08f99d8

View File

@ -356,6 +356,7 @@ NS_IMPL_STRING_ATTR(nsHTMLFormElement, AcceptCharset, acceptcharset)
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Enctype, enctype)
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Method, method)
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Name, name)
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Target, target)
NS_IMETHODIMP
nsHTMLFormElement::GetAction(nsAString& aValue)
@ -374,21 +375,6 @@ nsHTMLFormElement::SetAction(const nsAString& aValue)
return SetAttr(kNameSpaceID_None, nsGkAtoms::action, aValue, PR_TRUE);
}
NS_IMETHODIMP
nsHTMLFormElement::GetTarget(nsAString& aValue)
{
if (!GetAttr(kNameSpaceID_None, nsGkAtoms::target, aValue)) {
GetBaseTarget(aValue);
}
return NS_OK;
}
NS_IMETHODIMP
nsHTMLFormElement::SetTarget(const nsAString& aValue)
{
return SetAttr(kNameSpaceID_None, nsGkAtoms::target, aValue, PR_TRUE);
}
NS_IMETHODIMP
nsHTMLFormElement::Submit()
{
@ -816,8 +802,9 @@ nsHTMLFormElement::SubmitSubmission(nsFormSubmission* aFormSubmission)
}
nsAutoString target;
rv = GetTarget(target);
NS_ENSURE_SUBMIT_SUCCESS(rv);
if (!GetAttr(kNameSpaceID_None, nsGkAtoms::target, target)) {
GetBaseTarget(target);
}
//
// Notify observers of submit