зеркало из https://github.com/mozilla/pjs.git
Bug 566128. 'action' IDL attribute should reflect content attribute. r=sicking
This commit is contained in:
Родитель
16916eaa39
Коммит
a343d9b2d0
|
@ -353,28 +353,12 @@ 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()
|
||||
{
|
||||
|
@ -1338,7 +1322,11 @@ nsHTMLFormElement::GetActionURL(nsIURI** aActionURL)
|
|||
// Grab the URL string
|
||||
//
|
||||
nsAutoString action;
|
||||
GetAction(action);
|
||||
GetAttr(kNameSpaceID_None, nsGkAtoms::action, action);
|
||||
// Avoid resolving action="" to the base uri, bug 297761.
|
||||
if (!action.IsEmpty()) {
|
||||
GetURIAttr(nsGkAtoms::action, nsnull, action);
|
||||
}
|
||||
|
||||
//
|
||||
// Form the full action URL
|
||||
|
|
Загрузка…
Ссылка в новой задаче