Commit 8b3eab6e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLInputElement implementation.

parent 3d685993
......@@ -13,6 +13,7 @@ C_SRCS = \
htmldoc.c \
htmldoc3.c \
htmlelem.c \
htmlinput.c \
htmlnode.c \
main.c \
navigate.c \
......
......@@ -918,6 +918,11 @@ static const IHTMLElementVtbl HTMLElementVtbl = {
void HTMLElement_Create(HTMLDOMNode *node)
{
HTMLElement *ret;
nsAString class_name_str;
const PRUnichar *class_name;
nsresult nsres;
static const WCHAR wszINPUT[] = {'I','N','P','U','T',0};
ret = HeapAlloc(GetProcessHeap(), 0, sizeof(HTMLElement));
ret->lpHTMLElementVtbl = &HTMLElementVtbl;
......@@ -929,7 +934,19 @@ void HTMLElement_Create(HTMLDOMNode *node)
node->impl.elem = HTMLELEM(ret);
node->destructor = HTMLElement_destructor;
nsIDOMNode_QueryInterface(node->nsnode, &IID_nsIDOMHTMLElement, (void**)&ret->nselem);
nsres = nsIDOMNode_QueryInterface(node->nsnode, &IID_nsIDOMHTMLElement, (void**)&ret->nselem);
if(NS_FAILED(nsres))
return;
nsAString_Init(&class_name_str, NULL);
nsIDOMHTMLElement_GetTagName(ret->nselem, &class_name_str);
nsAString_GetData(&class_name_str, &class_name, NULL);
if(!strcmpW(class_name, wszINPUT))
HTMLInputElement_Create(ret);
nsAString_Finish(&class_name_str);
}
typedef struct {
......
......@@ -212,6 +212,7 @@ nsIInputStream *create_nsstream(const char*,PRInt32);
IHlink *Hlink_Create(void);
void HTMLElement_Create(HTMLDOMNode*);
void HTMLInputElement_Create(HTMLElement*);
HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*);
void release_nodes(HTMLDocument*);
......
......@@ -100,6 +100,7 @@ typedef nsISupports nsIDOMComment;
typedef nsISupports nsIDOMCDATASection;
typedef nsISupports nsIDOMProcessingInstruction;
typedef nsISupports nsIDOMEntityReference;
typedef nsISupports nsIDOMHTMLFormElement;
[
object,
......@@ -462,6 +463,53 @@ interface nsIDOMWindow : nsISupports
[
object,
uuid(a6cf9093-15b3-11d2-932e-00805f8add32)
]
interface nsIDOMHTMLInputElement : nsIDOMHTMLElement
{
nsresult GetDefaultValue(nsAString *aDefaultValue);
nsresult SetDefaultValue(const nsAString *aDefaultValue);
nsresult GetDefaultChecked(PRBool *aDefaultChecked);
nsresult SetDefaultChecked(PRBool aDefaultChecked);
nsresult GetForm(nsIDOMHTMLFormElement **aForm);
nsresult GetAccept(nsAString *aAccept);
nsresult SetAccept(const nsAString *aAccept);
nsresult GetAccessKey(nsAString *aAccessKey);
nsresult SetAccessKey(const nsAString *aAccessKey);
nsresult GetAlign(nsAString *aAlign);
nsresult SetAlign(const nsAString *aAlign);
nsresult GetAlt(nsAString *aAlt);
nsresult SetAlt(const nsAString *aAlt);
nsresult GetChecked(PRBool *aChecked);
nsresult SetChecked(PRBool aChecked);
nsresult GetDisabled(PRBool *aDisabled);
nsresult SetDisabled(PRBool aDisabled);
nsresult GetMaxLength(PRInt32 *aMaxLength);
nsresult SetMaxLength(PRInt32 aMaxLength);
nsresult GetName(nsAString *aName);
nsresult SetName(const nsAString *aName);
nsresult GetReadOnly(PRBool *aReadOnly);
nsresult SetReadOnly(PRBool aReadOnly);
nsresult GetSize(PRUint32 *aSize);
nsresult SetSize(PRUint32 aSize);
nsresult GetSrc(nsAString *aSrc);
nsresult SetSrc(const nsAString *aSrc);
nsresult GetTabIndex(PRInt32 *aTabIndex);
nsresult SetTabIndex(PRInt32 aTabIndex);
nsresult GetType(nsAString *aType);
nsresult SetType(const nsAString *aType);
nsresult GetUseMap(nsAString *aUseMap);
nsresult SetUseMap(const nsAString *aUseMap);
nsresult GetValue(nsAString *aValue);
nsresult SetValue(const nsAString *aValue);
nsresult Blur();
nsresult Focus();
nsresult Select();
nsresult Click();
}
[
object,
uuid(94928ab3-8b63-11d3-989d-001083010e9b)
]
interface nsIURIContentListener : nsISupports
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment