mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 02:31:41 +00:00
Bug 556007 (1/3) - Add list IDL attribute to HTMLInputElement. r=sicking a2.0=sicking
This commit is contained in:
parent
06546aad23
commit
4b77bdf913
@ -502,6 +502,7 @@ GK_ATOM(level, "level")
|
||||
GK_ATOM(li, "li")
|
||||
GK_ATOM(line, "line")
|
||||
GK_ATOM(link, "link")
|
||||
GK_ATOM(list, "list")
|
||||
GK_ATOM(listbox, "listbox")
|
||||
GK_ATOM(listboxbody, "listboxbody")
|
||||
GK_ATOM(listcell, "listcell")
|
||||
|
@ -1105,6 +1105,28 @@ nsHTMLInputElement::SetValue(const nsAString& aValue)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLInputElement::GetList(nsIDOMHTMLElement** aValue)
|
||||
{
|
||||
nsAutoString dataListId;
|
||||
GetAttr(kNameSpaceID_None, nsGkAtoms::list, dataListId);
|
||||
if (!dataListId.IsEmpty()) {
|
||||
nsIDocument* doc = GetCurrentDoc();
|
||||
|
||||
if (doc) {
|
||||
Element* elem = doc->GetElementById(dataListId);
|
||||
|
||||
if (elem) {
|
||||
CallQueryInterface(elem, aValue);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*aValue = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLInputElement::MozGetFileNameArray(PRUint32 *aLength, PRUnichar ***aFileNames)
|
||||
{
|
||||
|
@ -50,8 +50,8 @@ interface nsIDOMValidityState;
|
||||
* For more information on this interface please see
|
||||
* http://www.w3.org/TR/DOM-Level-2-HTML/
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e5079711-e6a9-4d3a-9b62-b4a8ef08fa7d)]
|
||||
|
||||
[scriptable, uuid(613c8e19-53b6-4719-8f6b-3c3e33012536)]
|
||||
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
|
||||
{
|
||||
attribute DOMString accept;
|
||||
@ -71,6 +71,7 @@ interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
|
||||
|
||||
attribute boolean indeterminate;
|
||||
|
||||
readonly attribute nsIDOMHTMLElement list;
|
||||
attribute long maxLength;
|
||||
|
||||
attribute boolean multiple;
|
||||
|
Loading…
x
Reference in New Issue
Block a user