Backout bug 566128 to fix test failures

This commit is contained in:
Robert O'Callahan 2010-06-01 13:53:59 +12:00
Родитель a125a0bb68 6525273de3
Коммит 5ac450cdaa
1 изменённых файлов: 18 добавлений и 6 удалений

Просмотреть файл

@ -355,12 +355,28 @@ nsHTMLFormElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
}
NS_IMPL_STRING_ATTR(nsHTMLFormElement, AcceptCharset, acceptcharset)
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Action, action)
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)
{
GetAttr(kNameSpaceID_None, nsGkAtoms::action, aValue);
if (aValue.IsEmpty()) {
// Avoid resolving action="" to the base uri, bug 297761.
return NS_OK;
}
return GetURIAttr(nsGkAtoms::action, nsnull, aValue);
}
NS_IMETHODIMP
nsHTMLFormElement::SetAction(const nsAString& aValue)
{
return SetAttr(kNameSpaceID_None, nsGkAtoms::action, aValue, PR_TRUE);
}
NS_IMETHODIMP
nsHTMLFormElement::Submit()
{
@ -1324,11 +1340,7 @@ nsHTMLFormElement::GetActionURL(nsIURI** aActionURL)
// Grab the URL string
//
nsAutoString action;
GetAttr(kNameSpaceID_None, nsGkAtoms::action, action);
// Avoid resolving action="" to the base uri, bug 297761.
if (!action.IsEmpty()) {
GetURIAttr(nsGkAtoms::action, nsnull, action);
}
GetAction(action);
//
// Form the full action URL