зеркало из https://github.com/mozilla/pjs.git
Backout bug 566128 to fix test failures
This commit is contained in:
Коммит
5ac450cdaa
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче