Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ecc551b9
Commit
ecc551b9
authored
Dec 01, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Improved error handling in element constructors.
parent
a8b94a03
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
212 additions
and
106 deletions
+212
-106
htmlanchor.c
dlls/mshtml/htmlanchor.c
+14
-6
htmlbody.c
dlls/mshtml/htmlbody.c
+14
-9
htmlelem.c
dlls/mshtml/htmlelem.c
+2
-3
htmlembed.c
dlls/mshtml/htmlembed.c
+8
-3
htmlform.c
dlls/mshtml/htmlform.c
+14
-6
htmlframe.c
dlls/mshtml/htmlframe.c
+5
-2
htmliframe.c
dlls/mshtml/htmliframe.c
+5
-2
htmlimg.c
dlls/mshtml/htmlimg.c
+12
-4
htmlinput.c
dlls/mshtml/htmlinput.c
+15
-8
htmlobject.c
dlls/mshtml/htmlobject.c
+14
-6
htmloption.c
dlls/mshtml/htmloption.c
+14
-6
htmlscript.c
dlls/mshtml/htmlscript.c
+14
-6
htmlselect.c
dlls/mshtml/htmlselect.c
+14
-6
htmlstyleelem.c
dlls/mshtml/htmlstyleelem.c
+8
-3
htmltable.c
dlls/mshtml/htmltable.c
+15
-8
htmltablerow.c
dlls/mshtml/htmltablerow.c
+14
-6
htmltextarea.c
dlls/mshtml/htmltextarea.c
+14
-6
mshtml_private.h
dlls/mshtml/mshtml_private.h
+16
-16
No files found.
dlls/mshtml/htmlanchor.c
View file @
ecc551b9
...
...
@@ -534,19 +534,27 @@ static dispex_static_data_t HTMLAnchorElement_dispex = {
HTMLAnchorElement_iface_tids
};
H
TMLElement
*
HTMLAnchorElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLAnchorElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLAnchorElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLAnchorElement
))
;
HTMLAnchorElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLAnchorElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLAnchorElementVtbl
=
&
HTMLAnchorElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLAnchorElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLAnchorElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLAnchorElement
,
(
void
**
)
&
ret
->
nsanchor
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLAnchorElement iface: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLAnchorElement_dispex
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmlbody.c
View file @
ecc551b9
...
...
@@ -812,24 +812,29 @@ static dispex_static_data_t HTMLBodyElement_dispex = {
HTMLBodyElement_iface_tids
};
H
TMLElement
*
HTMLBodyElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLBodyElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLBodyElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLBodyElement
))
;
HTMLBodyElement
*
ret
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
ret
,
nselem
);
ret
=
heap_alloc_zero
(
sizeof
(
HTMLBodyElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLBodyElementVtbl
=
&
HTMLBodyElementVtbl
;
ret
->
textcont
.
element
.
node
.
vtbl
=
&
HTMLBodyElementImplVtbl
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLBodyElement
,
(
void
**
)
&
ret
->
nsbody
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsDOMHTMLBodyElement: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_OUTOFMEMORY
;
}
HTMLTextContainer_Init
(
&
ret
->
textcont
,
doc
,
nselem
,
&
HTMLBodyElement_dispex
);
ConnectionPoint_Init
(
&
ret
->
cp_propnotif
,
&
ret
->
textcont
.
element
.
cp_container
,
&
IID_IPropertyNotifySink
,
NULL
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLBodyElement
,
(
void
**
)
&
ret
->
nsbody
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsDOMHTMLBodyElement: %08x
\n
"
,
nsres
);
return
&
ret
->
textcont
.
element
;
*
elem
=
&
ret
->
textcont
.
element
;
return
S_OK
;
}
dlls/mshtml/htmlelem.c
View file @
ecc551b9
...
...
@@ -53,7 +53,7 @@ static const WCHAR trW[] = {'T','R',0};
typedef
struct
{
const
WCHAR
*
name
;
H
TMLElement
*
(
*
constructor
)(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
RESULT
(
*
constructor
)(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
}
tag_desc_t
;
static
const
tag_desc_t
tag_descs
[]
=
{
...
...
@@ -1742,8 +1742,7 @@ HRESULT HTMLElement_Create(HTMLDocumentNode *doc, nsIDOMNode *nsnode, BOOL use_g
tag
=
get_tag_desc
(
class_name
);
if
(
tag
)
{
elem
=
tag
->
constructor
(
doc
,
nselem
);
hres
=
elem
?
S_OK
:
E_OUTOFMEMORY
;
hres
=
tag
->
constructor
(
doc
,
nselem
,
&
elem
);
}
else
if
(
use_generic
)
{
hres
=
HTMLGenericElement_Create
(
doc
,
nselem
,
&
elem
);
}
else
{
...
...
dlls/mshtml/htmlembed.c
View file @
ecc551b9
...
...
@@ -267,13 +267,18 @@ static dispex_static_data_t HTMLEmbedElement_dispex = {
HTMLEmbedElement_iface_tids
};
H
TMLElement
*
HTMLEmbedElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLEmbedElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLEmbedElement
*
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
HTMLEmbedElement
*
ret
;
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpIHTMLEmbedElementVtbl
=
&
HTMLEmbedElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLEmbedElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLEmbedElement_dispex
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmlform.c
View file @
ecc551b9
...
...
@@ -663,19 +663,27 @@ static dispex_static_data_t HTMLFormElement_dispex = {
HTMLFormElement_iface_tids
};
H
TMLElement
*
HTMLFormElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLFormElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLFormElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLFormElement
))
;
HTMLFormElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLFormElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLFormElementVtbl
=
&
HTMLFormElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLFormElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLFormElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLFormElement
,
(
void
**
)
&
ret
->
nsform
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLFormElement interface: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
return
&
ret
->
element
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLFormElement_dispex
);
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmlframe.c
View file @
ecc551b9
...
...
@@ -292,16 +292,19 @@ static dispex_static_data_t HTMLFrameElement_dispex = {
HTMLFrameElement_iface_tids
};
H
TMLElement
*
HTMLFrameElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLFrameElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLFrameElement
*
ret
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLFrameElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
framebase
.
element
.
node
.
vtbl
=
&
HTMLFrameElementImplVtbl
;
ret
->
lpIHTMLFrameElement3Vtbl
=
&
HTMLFrameElement3Vtbl
;
HTMLFrameBase_Init
(
&
ret
->
framebase
,
doc
,
nselem
,
&
HTMLFrameElement_dispex
);
return
&
ret
->
framebase
.
element
;
*
elem
=
&
ret
->
framebase
.
element
;
return
S_OK
;
}
dlls/mshtml/htmliframe.c
View file @
ecc551b9
...
...
@@ -270,16 +270,19 @@ static dispex_static_data_t HTMLIFrame_dispex = {
HTMLIFrame_iface_tids
};
H
TMLElement
*
HTMLIFrame_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLIFrame_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLIFrame
*
ret
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLIFrame
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpIHTMLIFrameElementVtbl
=
&
HTMLIFrameElementVtbl
;
ret
->
framebase
.
element
.
node
.
vtbl
=
&
HTMLIFrameImplVtbl
;
HTMLFrameBase_Init
(
&
ret
->
framebase
,
doc
,
nselem
,
&
HTMLIFrame_dispex
);
return
&
ret
->
framebase
.
element
;
*
elem
=
&
ret
->
framebase
.
element
;
return
S_OK
;
}
dlls/mshtml/htmlimg.c
View file @
ecc551b9
...
...
@@ -666,21 +666,29 @@ static dispex_static_data_t HTMLImgElement_dispex = {
HTMLImgElement_iface_tids
};
H
TMLElement
*
HTMLImgElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLImgElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLImgElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLImgElement
))
;
HTMLImgElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLImgElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLImgElementVtbl
=
&
HTMLImgElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLImgElementImplVtbl
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLImageElement
,
(
void
**
)
&
ret
->
nsimg
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLImageElement: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLImgElement_dispex
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
#define HTMLIMGFACTORY_THIS(iface) DEFINE_THIS(HTMLImageElementFactory, HTMLImageElementFactory, iface)
...
...
dlls/mshtml/htmlinput.c
View file @
ecc551b9
...
...
@@ -1212,21 +1212,28 @@ static dispex_static_data_t HTMLInputElement_dispex = {
HTMLInputElement_iface_tids
};
H
TMLElement
*
HTMLInputElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLInputElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLInputElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLInputElement
))
;
HTMLInputElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLInputElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLInputElementVtbl
=
&
HTMLInputElementVtbl
;
ret
->
lpHTMLInputTextElementVtbl
=
&
HTMLInputTextElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLInputElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLInputElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLInputElement
,
(
void
**
)
&
ret
->
nsinput
);
if
(
NS_FAILED
(
nsres
))
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLInputElement
,
(
void
**
)
&
ret
->
nsinput
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLInputElement interface: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
return
&
ret
->
element
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLInputElement_dispex
);
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmlobject.c
View file @
ecc551b9
...
...
@@ -457,19 +457,27 @@ static dispex_static_data_t HTMLObjectElement_dispex = {
HTMLObjectElement_iface_tids
};
H
TMLElement
*
HTMLObjectElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLObjectElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLObjectElement
*
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
))
;
HTMLObjectElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpIHTMLObjectElementVtbl
=
&
HTMLObjectElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLObjectElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLObjectElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLObjectElement
,
(
void
**
)
&
ret
->
nsobject
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLObjectElement iface: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLObjectElement_dispex
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmloption.c
View file @
ecc551b9
...
...
@@ -356,21 +356,29 @@ static dispex_static_data_t HTMLOptionElement_dispex = {
HTMLOptionElement_iface_tids
};
H
TMLElement
*
HTMLOptionElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLOptionElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLOptionElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLOptionElement
))
;
HTMLOptionElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLOptionElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLOptionElementVtbl
=
&
HTMLOptionElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLOptionElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLOptionElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLOptionElement
,
(
void
**
)
&
ret
->
nsoption
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLOptionElement interface: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
return
&
ret
->
element
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLOptionElement_dispex
);
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
#define HTMLOPTFACTORY_THIS(iface) DEFINE_THIS(HTMLOptionElementFactory, HTMLOptionElementFactory, iface)
...
...
dlls/mshtml/htmlscript.c
View file @
ecc551b9
...
...
@@ -343,19 +343,27 @@ static dispex_static_data_t HTMLScriptElement_dispex = {
HTMLScriptElement_iface_tids
};
H
TMLElement
*
HTMLScriptElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLScriptElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLScriptElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLScriptElement
))
;
HTMLScriptElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLScriptElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLScriptElementVtbl
=
&
HTMLScriptElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLScriptElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLScriptElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLScriptElement
,
(
void
**
)
&
ret
->
nsscript
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLScriptElement: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLScriptElement_dispex
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmlselect.c
View file @
ecc551b9
...
...
@@ -636,20 +636,28 @@ static dispex_static_data_t HTMLSelectElement_dispex = {
HTMLSelectElement_tids
};
H
TMLElement
*
HTMLSelectElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLSelectElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLSelectElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLSelectElement
))
;
HTMLSelectElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLSelectElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLSelectElementVtbl
=
&
HTMLSelectElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLSelectElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLSelectElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLSelectElement
,
(
void
**
)
&
ret
->
nsselect
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLSelectElement interfce: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
return
&
ret
->
element
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLSelectElement_dispex
);
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmlstyleelem.c
View file @
ecc551b9
...
...
@@ -267,13 +267,18 @@ static dispex_static_data_t HTMLStyleElement_dispex = {
HTMLStyleElement_iface_tids
};
H
TMLElement
*
HTMLStyleElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLStyleElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLStyleElement
*
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
HTMLStyleElement
*
ret
;
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpIHTMLStyleElementVtbl
=
&
HTMLStyleElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLStyleElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLStyleElement_dispex
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmltable.c
View file @
ecc551b9
...
...
@@ -571,21 +571,28 @@ static dispex_static_data_t HTMLTable_dispex = {
HTMLTable_iface_tids
};
H
TMLElement
*
HTMLTable_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLTable_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLTable
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLTable
))
;
HTMLTable
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLTable
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
element
.
node
.
vtbl
=
&
HTMLTableImplVtbl
;
ret
->
lpHTMLTableVtbl
=
&
HTMLTableVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLTable_dispex
);
ConnectionPoint_Init
(
&
ret
->
cp
,
&
ret
->
element
.
cp_container
,
&
DIID_HTMLTableEvents
,
NULL
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLTableElement
,
(
void
**
)
&
ret
->
nstable
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLTableElement iface: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLTable_dispex
);
ConnectionPoint_Init
(
&
ret
->
cp
,
&
ret
->
element
.
cp_container
,
&
DIID_HTMLTableEvents
,
NULL
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmltablerow.c
View file @
ecc551b9
...
...
@@ -314,19 +314,27 @@ static dispex_static_data_t HTMLTableRow_dispex = {
HTMLTableRow_iface_tids
};
H
TMLElement
*
HTMLTableRow_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLTableRow_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLTableRow
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLTableRow
))
;
HTMLTableRow
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLTableRow
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLTableRowVtbl
=
&
HTMLTableRowVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLTableRowImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLTableRow_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLTableRowElement
,
(
void
**
)
&
ret
->
nsrow
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLTableRowElement iface: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_OUTOFMEMORY
;
}
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLTableRow_dispex
);
return
&
ret
->
element
;
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/htmltextarea.c
View file @
ecc551b9
...
...
@@ -464,20 +464,28 @@ static dispex_static_data_t HTMLTextAreaElement_dispex = {
HTMLTextAreaElement_iface_tids
};
H
TMLElement
*
HTMLTextAreaElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
ns
elem
)
H
RESULT
HTMLTextAreaElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLTextAreaElement
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLTextAreaElement
))
;
HTMLTextAreaElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLTextAreaElement
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpHTMLTextAreaElementVtbl
=
&
HTMLTextAreaElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLTextAreaElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLTextAreaElement_dispex
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLTextAreaElement
,
(
void
**
)
&
ret
->
nstextarea
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsDOMHTMLInputElement: %08x
\n
"
,
nsres
);
heap_free
(
ret
);
return
E_FAIL
;
}
return
&
ret
->
element
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLTextAreaElement_dispex
);
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
dlls/mshtml/mshtml_private.h
View file @
ecc551b9
...
...
@@ -822,22 +822,22 @@ HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLDOMNode**);
HRESULT
HTMLElement_Create
(
HTMLDocumentNode
*
,
nsIDOMNode
*
,
BOOL
,
HTMLElement
**
);
HRESULT
HTMLCommentElement_Create
(
HTMLDocumentNode
*
,
nsIDOMNode
*
,
HTMLElement
**
);
H
TMLElement
*
HTMLAnchorElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLBodyElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLEmbedElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLFormElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLFrameElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLIFrame_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLStyleElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLImgElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLInputElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLObjectElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLOptionElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLScriptElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLSelectElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLTable_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLTableRow_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
TMLElement
*
HTMLTextAreaElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
);
H
RESULT
HTMLAnchorElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLBodyElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLEmbedElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLFormElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLFrameElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLIFrame_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLStyleElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLImgElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLInputElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLObjectElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLOptionElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLScriptElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLSelectElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLTable_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLTableRow_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
H
RESULT
HTMLTextAreaElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
*
*
);
HRESULT
HTMLGenericElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
);
void
HTMLDOMNode_Init
(
HTMLDocumentNode
*
,
HTMLDOMNode
*
,
nsIDOMNode
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment