Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
a084d1db
Commit
a084d1db
authored
Dec 05, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Rename the wrappers around HeapAlloc() &Co to use the new standard naming.
parent
d457af74
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
140 additions
and
140 deletions
+140
-140
conpoint.c
dlls/mshtml/conpoint.c
+3
-3
editor.c
dlls/mshtml/editor.c
+4
-4
htmlanchor.c
dlls/mshtml/htmlanchor.c
+1
-1
htmlbody.c
dlls/mshtml/htmlbody.c
+1
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+3
-3
htmlelem.c
dlls/mshtml/htmlelem.c
+13
-13
htmlinput.c
dlls/mshtml/htmlinput.c
+1
-1
htmlnode.c
dlls/mshtml/htmlnode.c
+2
-2
htmloption.c
dlls/mshtml/htmloption.c
+3
-3
htmlselect.c
dlls/mshtml/htmlselect.c
+1
-1
htmlstyle.c
dlls/mshtml/htmlstyle.c
+2
-2
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+4
-4
htmltable.c
dlls/mshtml/htmltable.c
+1
-1
htmltextarea.c
dlls/mshtml/htmltextarea.c
+1
-1
htmlwindow.c
dlls/mshtml/htmlwindow.c
+4
-4
install.c
dlls/mshtml/install.c
+15
-15
loadopts.c
dlls/mshtml/loadopts.c
+7
-7
main.c
dlls/mshtml/main.c
+6
-6
mshtml_private.h
dlls/mshtml/mshtml_private.h
+4
-4
navigate.c
dlls/mshtml/navigate.c
+12
-12
nsembed.c
dlls/mshtml/nsembed.c
+2
-2
nsevents.c
dlls/mshtml/nsevents.c
+1
-1
nsio.c
dlls/mshtml/nsio.c
+12
-12
persist.c
dlls/mshtml/persist.c
+5
-5
protocol.c
dlls/mshtml/protocol.c
+18
-18
selection.c
dlls/mshtml/selection.c
+2
-2
service.c
dlls/mshtml/service.c
+2
-2
task.c
dlls/mshtml/task.c
+3
-3
txtrange.c
dlls/mshtml/txtrange.c
+6
-6
view.c
dlls/mshtml/view.c
+1
-1
No files found.
dlls/mshtml/conpoint.c
View file @
a084d1db
...
@@ -152,9 +152,9 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
...
@@ -152,9 +152,9 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
}
}
if
(
i
==
This
->
sinks_size
)
if
(
i
==
This
->
sinks_size
)
This
->
sinks
=
mshtml
_realloc
(
This
->
sinks
,(
++
This
->
sinks_size
)
*
sizeof
(
*
This
->
sinks
));
This
->
sinks
=
heap
_realloc
(
This
->
sinks
,(
++
This
->
sinks_size
)
*
sizeof
(
*
This
->
sinks
));
}
else
{
}
else
{
This
->
sinks
=
mshtml
_alloc
(
sizeof
(
*
This
->
sinks
));
This
->
sinks
=
heap
_alloc
(
sizeof
(
*
This
->
sinks
));
This
->
sinks_size
=
1
;
This
->
sinks_size
=
1
;
i
=
0
;
i
=
0
;
}
}
...
@@ -223,7 +223,7 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
...
@@ -223,7 +223,7 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
IUnknown_Release
(
This
->
sinks
[
i
].
unk
);
IUnknown_Release
(
This
->
sinks
[
i
].
unk
);
}
}
mshtml
_free
(
This
->
sinks
);
heap
_free
(
This
->
sinks
);
}
}
#define CONPTCONT_THIS(iface) DEFINE_THIS(ConnectionPointContainer, ConnectionPointContainer, iface)
#define CONPTCONT_THIS(iface) DEFINE_THIS(ConnectionPointContainer, ConnectionPointContainer, iface)
...
...
dlls/mshtml/editor.c
View file @
a084d1db
...
@@ -569,12 +569,12 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
...
@@ -569,12 +569,12 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
TRACE
(
"%s
\n
"
,
debugstr_w
(
V_BSTR
(
in
)));
TRACE
(
"%s
\n
"
,
debugstr_w
(
V_BSTR
(
in
)));
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
V_BSTR
(
in
),
-
1
,
NULL
,
0
,
NULL
,
NULL
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
V_BSTR
(
in
),
-
1
,
NULL
,
0
,
NULL
,
NULL
);
stra
=
mshtml
_alloc
(
len
);
stra
=
heap
_alloc
(
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
V_BSTR
(
in
),
-
1
,
stra
,
-
1
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
V_BSTR
(
in
),
-
1
,
stra
,
-
1
,
NULL
,
NULL
);
set_ns_fontname
(
This
->
nscontainer
,
stra
);
set_ns_fontname
(
This
->
nscontainer
,
stra
);
mshtml
_free
(
stra
);
heap
_free
(
stra
);
update_doc
(
This
,
UPDATE_UI
);
update_doc
(
This
,
UPDATE_UI
);
}
}
...
@@ -599,12 +599,12 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
...
@@ -599,12 +599,12 @@ static HRESULT exec_fontname(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in,
nsICommandParams_Release
(
nsparam
);
nsICommandParams_Release
(
nsparam
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
NULL
,
0
);
strw
=
mshtml
_alloc
(
len
*
sizeof
(
WCHAR
));
strw
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
strw
,
-
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
stra
,
-
1
,
strw
,
-
1
);
nsfree
(
stra
);
nsfree
(
stra
);
V_BSTR
(
out
)
=
SysAllocString
(
strw
);
V_BSTR
(
out
)
=
SysAllocString
(
strw
);
mshtml
_free
(
strw
);
heap
_free
(
strw
);
}
}
return
S_OK
;
return
S_OK
;
...
...
dlls/mshtml/htmlanchor.c
View file @
a084d1db
...
@@ -484,7 +484,7 @@ static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
...
@@ -484,7 +484,7 @@ static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
HTMLElement
*
HTMLAnchorElement_Create
(
nsIDOMHTMLElement
*
nselem
)
HTMLElement
*
HTMLAnchorElement_Create
(
nsIDOMHTMLElement
*
nselem
)
{
{
HTMLAnchorElement
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLAnchorElement
));
HTMLAnchorElement
*
ret
=
heap
_alloc
(
sizeof
(
HTMLAnchorElement
));
HTMLElement_Init
(
&
ret
->
element
);
HTMLElement_Init
(
&
ret
->
element
);
...
...
dlls/mshtml/htmlbody.c
View file @
a084d1db
...
@@ -490,7 +490,7 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
...
@@ -490,7 +490,7 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
HTMLElement
*
HTMLBodyElement_Create
(
nsIDOMHTMLElement
*
nselem
)
HTMLElement
*
HTMLBodyElement_Create
(
nsIDOMHTMLElement
*
nselem
)
{
{
HTMLBodyElement
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLBodyElement
));
HTMLBodyElement
*
ret
=
heap
_alloc
(
sizeof
(
HTMLBodyElement
));
nsresult
nsres
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
ret
,
nselem
);
TRACE
(
"(%p)->(%p)
\n
"
,
ret
,
nselem
);
...
...
dlls/mshtml/htmldoc.c
View file @
a084d1db
...
@@ -194,7 +194,7 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
...
@@ -194,7 +194,7 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
if
(
This
->
nscontainer
)
if
(
This
->
nscontainer
)
NSContainer_Release
(
This
->
nscontainer
);
NSContainer_Release
(
This
->
nscontainer
);
mshtml
_free
(
This
);
heap
_free
(
This
);
UNLOCK_MODULE
();
UNLOCK_MODULE
();
}
}
...
@@ -1176,7 +1176,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
...
@@ -1176,7 +1176,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
TRACE
(
"(%p %s %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppvObject
);
TRACE
(
"(%p %s %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppvObject
);
ret
=
mshtml
_alloc
(
sizeof
(
HTMLDocument
));
ret
=
heap
_alloc
(
sizeof
(
HTMLDocument
));
ret
->
lpHTMLDocument2Vtbl
=
&
HTMLDocumentVtbl
;
ret
->
lpHTMLDocument2Vtbl
=
&
HTMLDocumentVtbl
;
ret
->
ref
=
0
;
ret
->
ref
=
0
;
ret
->
nscontainer
=
NULL
;
ret
->
nscontainer
=
NULL
;
...
@@ -1191,7 +1191,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
...
@@ -1191,7 +1191,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
hres
=
IHTMLDocument_QueryInterface
(
HTMLDOC
(
ret
),
riid
,
ppvObject
);
hres
=
IHTMLDocument_QueryInterface
(
HTMLDOC
(
ret
),
riid
,
ppvObject
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
mshtml
_free
(
ret
);
heap
_free
(
ret
);
return
hres
;
return
hres
;
}
}
...
...
dlls/mshtml/htmlelem.c
View file @
a084d1db
...
@@ -50,7 +50,7 @@ static void elem_vector_add(elem_vector *buf, HTMLElement *elem)
...
@@ -50,7 +50,7 @@ static void elem_vector_add(elem_vector *buf, HTMLElement *elem)
{
{
if
(
buf
->
len
==
buf
->
size
)
{
if
(
buf
->
len
==
buf
->
size
)
{
buf
->
size
<<=
1
;
buf
->
size
<<=
1
;
buf
->
buf
=
mshtml
_realloc
(
buf
->
buf
,
buf
->
size
*
sizeof
(
HTMLElement
**
));
buf
->
buf
=
heap
_realloc
(
buf
->
buf
,
buf
->
size
*
sizeof
(
HTMLElement
**
));
}
}
buf
->
buf
[
buf
->
len
++
]
=
elem
;
buf
->
buf
[
buf
->
len
++
]
=
elem
;
...
@@ -59,10 +59,10 @@ static void elem_vector_add(elem_vector *buf, HTMLElement *elem)
...
@@ -59,10 +59,10 @@ static void elem_vector_add(elem_vector *buf, HTMLElement *elem)
static
void
elem_vector_normalize
(
elem_vector
*
buf
)
static
void
elem_vector_normalize
(
elem_vector
*
buf
)
{
{
if
(
!
buf
->
len
)
{
if
(
!
buf
->
len
)
{
mshtml
_free
(
buf
->
buf
);
heap
_free
(
buf
->
buf
);
buf
->
buf
=
NULL
;
buf
->
buf
=
NULL
;
}
else
if
(
buf
->
size
>
buf
->
len
)
{
}
else
if
(
buf
->
size
>
buf
->
len
)
{
buf
->
buf
=
mshtml
_realloc
(
buf
->
buf
,
buf
->
len
*
sizeof
(
HTMLElement
**
));
buf
->
buf
=
heap
_realloc
(
buf
->
buf
,
buf
->
len
*
sizeof
(
HTMLElement
**
));
}
}
buf
->
size
=
buf
->
len
;
buf
->
size
=
buf
->
len
;
...
@@ -1059,7 +1059,7 @@ static void create_child_list(HTMLDocument *doc, HTMLElement *elem, elem_vector
...
@@ -1059,7 +1059,7 @@ static void create_child_list(HTMLDocument *doc, HTMLElement *elem, elem_vector
return
;
return
;
buf
->
size
=
list_len
;
buf
->
size
=
list_len
;
buf
->
buf
=
mshtml
_alloc
(
buf
->
size
*
sizeof
(
HTMLElement
**
));
buf
->
buf
=
heap
_alloc
(
buf
->
size
*
sizeof
(
HTMLElement
**
));
for
(
i
=
0
;
i
<
list_len
;
i
++
)
{
for
(
i
=
0
;
i
<
list_len
;
i
++
)
{
nsres
=
nsIDOMNodeList_Item
(
nsnode_list
,
i
,
&
iter
);
nsres
=
nsIDOMNodeList_Item
(
nsnode_list
,
i
,
&
iter
);
...
@@ -1129,7 +1129,7 @@ static HRESULT WINAPI HTMLElement_get_all(IHTMLElement *iface, IDispatch **p)
...
@@ -1129,7 +1129,7 @@ static HRESULT WINAPI HTMLElement_get_all(IHTMLElement *iface, IDispatch **p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
buf
.
buf
=
mshtml
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
**
));
buf
.
buf
=
heap
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
**
));
create_all_list
(
This
->
node
.
doc
,
&
This
->
node
,
&
buf
);
create_all_list
(
This
->
node
.
doc
,
&
This
->
node
,
&
buf
);
elem_vector_normalize
(
&
buf
);
elem_vector_normalize
(
&
buf
);
...
@@ -1336,7 +1336,7 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode)
...
@@ -1336,7 +1336,7 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode)
ret
=
HTMLTextAreaElement_Create
(
nselem
);
ret
=
HTMLTextAreaElement_Create
(
nselem
);
if
(
!
ret
)
{
if
(
!
ret
)
{
ret
=
mshtml
_alloc
(
sizeof
(
HTMLElement
));
ret
=
heap
_alloc
(
sizeof
(
HTMLElement
));
HTMLElement_Init
(
ret
);
HTMLElement_Init
(
ret
);
}
}
...
@@ -1407,8 +1407,8 @@ static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface)
...
@@ -1407,8 +1407,8 @@ static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface)
if
(
!
ref
)
{
if
(
!
ref
)
{
IUnknown_Release
(
This
->
ref_unk
);
IUnknown_Release
(
This
->
ref_unk
);
mshtml
_free
(
This
->
elems
);
heap
_free
(
This
->
elems
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -1563,7 +1563,7 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface,
...
@@ -1563,7 +1563,7 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface,
}
else
{
}
else
{
elem_vector
buf
=
{
NULL
,
0
,
8
};
elem_vector
buf
=
{
NULL
,
0
,
8
};
buf
.
buf
=
mshtml
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
*
));
buf
.
buf
=
heap
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
*
));
for
(
i
=
0
;
i
<
This
->
len
;
i
++
)
{
for
(
i
=
0
;
i
<
This
->
len
;
i
++
)
{
if
(
is_elem_name
(
This
->
elems
[
i
],
V_BSTR
(
&
name
)))
if
(
is_elem_name
(
This
->
elems
[
i
],
V_BSTR
(
&
name
)))
...
@@ -1579,7 +1579,7 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface,
...
@@ -1579,7 +1579,7 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface,
IDispatch_AddRef
(
*
pdisp
);
IDispatch_AddRef
(
*
pdisp
);
}
}
mshtml
_free
(
buf
.
buf
);
heap
_free
(
buf
.
buf
);
}
}
return
S_OK
;
return
S_OK
;
...
@@ -1606,7 +1606,7 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface,
...
@@ -1606,7 +1606,7 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface,
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
V_BSTR
(
&
tagName
)),
pdisp
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
V_BSTR
(
&
tagName
)),
pdisp
);
buf
.
buf
=
mshtml
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
*
));
buf
.
buf
=
heap
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
*
));
nsAString_Init
(
&
tag_str
,
NULL
);
nsAString_Init
(
&
tag_str
,
NULL
);
...
@@ -1653,7 +1653,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node)
...
@@ -1653,7 +1653,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node)
{
{
elem_vector
buf
=
{
NULL
,
0
,
8
};
elem_vector
buf
=
{
NULL
,
0
,
8
};
buf
.
buf
=
mshtml
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
**
));
buf
.
buf
=
heap
_alloc
(
buf
.
size
*
sizeof
(
HTMLElement
**
));
elem_vector_add
(
&
buf
,
HTMLELEM_NODE_THIS
(
node
));
elem_vector_add
(
&
buf
,
HTMLELEM_NODE_THIS
(
node
));
create_all_list
(
node
->
doc
,
node
,
&
buf
);
create_all_list
(
node
->
doc
,
node
,
&
buf
);
...
@@ -1665,7 +1665,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node)
...
@@ -1665,7 +1665,7 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node)
static
IHTMLElementCollection
*
HTMLElementCollection_Create
(
IUnknown
*
ref_unk
,
static
IHTMLElementCollection
*
HTMLElementCollection_Create
(
IUnknown
*
ref_unk
,
HTMLElement
**
elems
,
DWORD
len
)
HTMLElement
**
elems
,
DWORD
len
)
{
{
HTMLElementCollection
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLElementCollection
));
HTMLElementCollection
*
ret
=
heap
_alloc
(
sizeof
(
HTMLElementCollection
));
ret
->
lpHTMLElementCollectionVtbl
=
&
HTMLElementCollectionVtbl
;
ret
->
lpHTMLElementCollectionVtbl
=
&
HTMLElementCollectionVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
...
dlls/mshtml/htmlinput.c
View file @
a084d1db
...
@@ -1059,7 +1059,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = {
...
@@ -1059,7 +1059,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = {
HTMLElement
*
HTMLInputElement_Create
(
nsIDOMHTMLElement
*
nselem
)
HTMLElement
*
HTMLInputElement_Create
(
nsIDOMHTMLElement
*
nselem
)
{
{
HTMLInputElement
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLInputElement
));
HTMLInputElement
*
ret
=
heap
_alloc
(
sizeof
(
HTMLInputElement
));
nsresult
nsres
;
nsresult
nsres
;
HTMLElement_Init
(
&
ret
->
element
);
HTMLElement_Init
(
&
ret
->
element
);
...
...
dlls/mshtml/htmlnode.c
View file @
a084d1db
...
@@ -66,7 +66,7 @@ static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface)
...
@@ -66,7 +66,7 @@ static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface)
if
(
!
ref
)
{
if
(
!
ref
)
{
This
->
vtbl
->
destructor
(
This
);
This
->
vtbl
->
destructor
(
This
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -354,7 +354,7 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
...
@@ -354,7 +354,7 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode)
ret
=
&
HTMLElement_Create
(
nsnode
)
->
node
;
ret
=
&
HTMLElement_Create
(
nsnode
)
->
node
;
break
;
break
;
default:
default:
ret
=
mshtml
_alloc
(
sizeof
(
HTMLDOMNode
));
ret
=
heap
_alloc
(
sizeof
(
HTMLDOMNode
));
ret
->
vtbl
=
&
HTMLDOMNodeImplVtbl
;
ret
->
vtbl
=
&
HTMLDOMNodeImplVtbl
;
}
}
...
...
dlls/mshtml/htmloption.c
View file @
a084d1db
...
@@ -337,7 +337,7 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = {
...
@@ -337,7 +337,7 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = {
HTMLElement
*
HTMLOptionElement_Create
(
nsIDOMHTMLElement
*
nselem
)
HTMLElement
*
HTMLOptionElement_Create
(
nsIDOMHTMLElement
*
nselem
)
{
{
HTMLOptionElement
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLOptionElement
));
HTMLOptionElement
*
ret
=
heap
_alloc
(
sizeof
(
HTMLOptionElement
));
nsresult
nsres
;
nsresult
nsres
;
HTMLElement_Init
(
&
ret
->
element
);
HTMLElement_Init
(
&
ret
->
element
);
...
@@ -399,7 +399,7 @@ static ULONG WINAPI HTMLOptionElementFactory_Release(IHTMLOptionElementFactory *
...
@@ -399,7 +399,7 @@ static ULONG WINAPI HTMLOptionElementFactory_Release(IHTMLOptionElementFactory *
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
mshtml
_free
(
This
);
heap
_free
(
This
);
return
ref
;
return
ref
;
}
}
...
@@ -512,7 +512,7 @@ HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLDocument *doc)
...
@@ -512,7 +512,7 @@ HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLDocument *doc)
{
{
HTMLOptionElementFactory
*
ret
;
HTMLOptionElementFactory
*
ret
;
ret
=
mshtml
_alloc
(
sizeof
(
HTMLOptionElementFactory
));
ret
=
heap
_alloc
(
sizeof
(
HTMLOptionElementFactory
));
ret
->
lpHTMLOptionElementFactoryVtbl
=
&
HTMLOptionElementFactoryVtbl
;
ret
->
lpHTMLOptionElementFactoryVtbl
=
&
HTMLOptionElementFactoryVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
...
dlls/mshtml/htmlselect.c
View file @
a084d1db
...
@@ -426,7 +426,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
...
@@ -426,7 +426,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
HTMLElement
*
HTMLSelectElement_Create
(
nsIDOMHTMLElement
*
nselem
)
HTMLElement
*
HTMLSelectElement_Create
(
nsIDOMHTMLElement
*
nselem
)
{
{
HTMLSelectElement
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLSelectElement
));
HTMLSelectElement
*
ret
=
heap
_alloc
(
sizeof
(
HTMLSelectElement
));
nsresult
nsres
;
nsresult
nsres
;
HTMLElement_Init
(
&
ret
->
element
);
HTMLElement_Init
(
&
ret
->
element
);
...
...
dlls/mshtml/htmlstyle.c
View file @
a084d1db
...
@@ -193,7 +193,7 @@ static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
...
@@ -193,7 +193,7 @@ static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
mshtml
_free
(
This
);
heap
_free
(
This
);
return
ref
;
return
ref
;
}
}
...
@@ -1736,7 +1736,7 @@ static const IHTMLStyleVtbl HTMLStyleVtbl = {
...
@@ -1736,7 +1736,7 @@ static const IHTMLStyleVtbl HTMLStyleVtbl = {
IHTMLStyle
*
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
nsstyle
)
IHTMLStyle
*
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
nsstyle
)
{
{
HTMLStyle
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLStyle
));
HTMLStyle
*
ret
=
heap
_alloc
(
sizeof
(
HTMLStyle
));
ret
->
lpHTMLStyleVtbl
=
&
HTMLStyleVtbl
;
ret
->
lpHTMLStyleVtbl
=
&
HTMLStyleVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
...
dlls/mshtml/htmlstylesheet.c
View file @
a084d1db
...
@@ -103,7 +103,7 @@ static ULONG WINAPI HTMLStyleSheetsCollection_Release(IHTMLStyleSheetsCollection
...
@@ -103,7 +103,7 @@ static ULONG WINAPI HTMLStyleSheetsCollection_Release(IHTMLStyleSheetsCollection
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
mshtml
_free
(
This
);
heap
_free
(
This
);
return
ref
;
return
ref
;
}
}
...
@@ -221,7 +221,7 @@ static const IHTMLStyleSheetsCollectionVtbl HTMLStyleSheetsCollectionVtbl = {
...
@@ -221,7 +221,7 @@ static const IHTMLStyleSheetsCollectionVtbl HTMLStyleSheetsCollectionVtbl = {
IHTMLStyleSheetsCollection
*
HTMLStyleSheetsCollection_Create
(
nsIDOMStyleSheetList
*
nslist
)
IHTMLStyleSheetsCollection
*
HTMLStyleSheetsCollection_Create
(
nsIDOMStyleSheetList
*
nslist
)
{
{
HTMLStyleSheetsCollection
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLStyleSheetsCollection
));
HTMLStyleSheetsCollection
*
ret
=
heap
_alloc
(
sizeof
(
HTMLStyleSheetsCollection
));
ret
->
lpHTMLStyleSheetsCollectionVtbl
=
&
HTMLStyleSheetsCollectionVtbl
;
ret
->
lpHTMLStyleSheetsCollectionVtbl
=
&
HTMLStyleSheetsCollectionVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
@@ -279,7 +279,7 @@ static ULONG WINAPI HTMLStyleSheet_Release(IHTMLStyleSheet *iface)
...
@@ -279,7 +279,7 @@ static ULONG WINAPI HTMLStyleSheet_Release(IHTMLStyleSheet *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
mshtml
_free
(
This
);
heap
_free
(
This
);
return
ref
;
return
ref
;
}
}
...
@@ -505,7 +505,7 @@ static const IHTMLStyleSheetVtbl HTMLStyleSheetVtbl = {
...
@@ -505,7 +505,7 @@ static const IHTMLStyleSheetVtbl HTMLStyleSheetVtbl = {
IHTMLStyleSheet
*
HTMLStyleSheet_Create
(
nsIDOMStyleSheet
*
nsstylesheet
)
IHTMLStyleSheet
*
HTMLStyleSheet_Create
(
nsIDOMStyleSheet
*
nsstylesheet
)
{
{
HTMLStyleSheet
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLStyleSheet
));
HTMLStyleSheet
*
ret
=
heap
_alloc
(
sizeof
(
HTMLStyleSheet
));
nsresult
nsres
;
nsresult
nsres
;
ret
->
lpHTMLStyleSheetVtbl
=
&
HTMLStyleSheetVtbl
;
ret
->
lpHTMLStyleSheetVtbl
=
&
HTMLStyleSheetVtbl
;
...
...
dlls/mshtml/htmltable.c
View file @
a084d1db
...
@@ -550,7 +550,7 @@ static const NodeImplVtbl HTMLTableImplVtbl = {
...
@@ -550,7 +550,7 @@ static const NodeImplVtbl HTMLTableImplVtbl = {
HTMLElement
*
HTMLTable_Create
(
nsIDOMHTMLElement
*
nselem
)
HTMLElement
*
HTMLTable_Create
(
nsIDOMHTMLElement
*
nselem
)
{
{
HTMLTable
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLTable
));
HTMLTable
*
ret
=
heap
_alloc
(
sizeof
(
HTMLTable
));
HTMLElement_Init
(
&
ret
->
element
);
HTMLElement_Init
(
&
ret
->
element
);
...
...
dlls/mshtml/htmltextarea.c
View file @
a084d1db
...
@@ -406,7 +406,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
...
@@ -406,7 +406,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
HTMLElement
*
HTMLTextAreaElement_Create
(
nsIDOMHTMLElement
*
nselem
)
HTMLElement
*
HTMLTextAreaElement_Create
(
nsIDOMHTMLElement
*
nselem
)
{
{
HTMLTextAreaElement
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLTextAreaElement
));
HTMLTextAreaElement
*
ret
=
heap
_alloc
(
sizeof
(
HTMLTextAreaElement
));
nsresult
nsres
;
nsresult
nsres
;
HTMLElement_Init
(
&
ret
->
element
);
HTMLElement_Init
(
&
ret
->
element
);
...
...
dlls/mshtml/htmlwindow.c
View file @
a084d1db
...
@@ -89,7 +89,7 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
...
@@ -89,7 +89,7 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
if
(
!
ref
)
{
if
(
!
ref
)
{
list_remove
(
&
This
->
entry
);
list_remove
(
&
This
->
entry
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -775,12 +775,12 @@ static void astr_to_nswstr(const char *str, nsAString *nsstr)
...
@@ -775,12 +775,12 @@ static void astr_to_nswstr(const char *str, nsAString *nsstr)
int
len
;
int
len
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
wstr
=
mshtml
_alloc
(
len
*
sizeof
(
WCHAR
));
wstr
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
wstr
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
wstr
,
len
);
nsAString_Init
(
nsstr
,
wstr
);
nsAString_Init
(
nsstr
,
wstr
);
mshtml
_free
(
wstr
);
heap
_free
(
wstr
);
}
}
static
nsresult
call_js_func
(
nsIScriptContainer
*
script_container
,
nsISupports
*
target
,
static
nsresult
call_js_func
(
nsIScriptContainer
*
script_container
,
nsISupports
*
target
,
...
@@ -867,7 +867,7 @@ void setup_nswindow(HTMLWindow *This)
...
@@ -867,7 +867,7 @@ void setup_nswindow(HTMLWindow *This)
HTMLWindow
*
HTMLWindow_Create
(
HTMLDocument
*
doc
)
HTMLWindow
*
HTMLWindow_Create
(
HTMLDocument
*
doc
)
{
{
HTMLWindow
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLWindow
));
HTMLWindow
*
ret
=
heap
_alloc
(
sizeof
(
HTMLWindow
));
ret
->
lpHTMLWindow2Vtbl
=
&
HTMLWindow2Vtbl
;
ret
->
lpHTMLWindow2Vtbl
=
&
HTMLWindow2Vtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
...
dlls/mshtml/install.c
View file @
a084d1db
...
@@ -66,7 +66,7 @@ static void clean_up(void)
...
@@ -66,7 +66,7 @@ static void clean_up(void)
if
(
tmp_file_name
)
{
if
(
tmp_file_name
)
{
DeleteFileW
(
tmp_file_name
);
DeleteFileW
(
tmp_file_name
);
mshtml
_free
(
tmp_file_name
);
heap
_free
(
tmp_file_name
);
tmp_file_name
=
NULL
;
tmp_file_name
=
NULL
;
}
}
...
@@ -112,7 +112,7 @@ static void set_registry(LPCSTR install_dir)
...
@@ -112,7 +112,7 @@ static void set_registry(LPCSTR install_dir)
}
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
install_dir
,
-
1
,
NULL
,
0
)
-
1
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
install_dir
,
-
1
,
NULL
,
0
)
-
1
;
gecko_path
=
mshtml
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
)
+
sizeof
(
wszWineGecko
));
gecko_path
=
heap
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
)
+
sizeof
(
wszWineGecko
));
MultiByteToWideChar
(
CP_ACP
,
0
,
install_dir
,
-
1
,
gecko_path
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
install_dir
,
-
1
,
gecko_path
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
if
(
len
&&
gecko_path
[
len
-
1
]
!=
'\\'
)
if
(
len
&&
gecko_path
[
len
-
1
]
!=
'\\'
)
...
@@ -123,7 +123,7 @@ static void set_registry(LPCSTR install_dir)
...
@@ -123,7 +123,7 @@ static void set_registry(LPCSTR install_dir)
size
=
len
*
sizeof
(
WCHAR
)
+
sizeof
(
wszWineGecko
);
size
=
len
*
sizeof
(
WCHAR
)
+
sizeof
(
wszWineGecko
);
res
=
RegSetValueExW
(
hkey
,
wszGeckoPath
,
0
,
REG_SZ
,
(
LPVOID
)
gecko_path
,
res
=
RegSetValueExW
(
hkey
,
wszGeckoPath
,
0
,
REG_SZ
,
(
LPVOID
)
gecko_path
,
len
*
sizeof
(
WCHAR
)
+
sizeof
(
wszWineGecko
));
len
*
sizeof
(
WCHAR
)
+
sizeof
(
wszWineGecko
));
mshtml
_free
(
gecko_path
);
heap
_free
(
gecko_path
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
if
(
res
!=
ERROR_SUCCESS
)
ERR
(
"Failed to set GeckoPath value: %08x
\n
"
,
res
);
ERR
(
"Failed to set GeckoPath value: %08x
\n
"
,
res
);
...
@@ -161,13 +161,13 @@ static BOOL install_cab(LPCWSTR file_name)
...
@@ -161,13 +161,13 @@ static BOOL install_cab(LPCWSTR file_name)
pExtractFilesA
=
(
typeof
(
ExtractFilesA
)
*
)
GetProcAddress
(
advpack
,
"ExtractFiles"
);
pExtractFilesA
=
(
typeof
(
ExtractFilesA
)
*
)
GetProcAddress
(
advpack
,
"ExtractFiles"
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
file_name
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
file_name
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
file_name_a
=
mshtml
_alloc
(
len
);
file_name_a
=
heap
_alloc
(
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
file_name
,
-
1
,
file_name_a
,
-
1
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
file_name
,
-
1
,
file_name_a
,
-
1
,
NULL
,
NULL
);
/* FIXME: Use unicode version (not yet implemented) */
/* FIXME: Use unicode version (not yet implemented) */
hres
=
pExtractFilesA
(
file_name_a
,
install_dir
,
0
,
NULL
,
NULL
,
0
);
hres
=
pExtractFilesA
(
file_name_a
,
install_dir
,
0
,
NULL
,
NULL
,
0
);
FreeLibrary
(
advpack
);
FreeLibrary
(
advpack
);
mshtml
_free
(
file_name_a
);
heap
_free
(
file_name_a
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
ERR
(
"Could not extract package: %08x
\n
"
,
hres
);
ERR
(
"Could not extract package: %08x
\n
"
,
hres
);
clean_up
();
clean_up
();
...
@@ -213,7 +213,7 @@ static BOOL install_from_unix_file(const char *file_name)
...
@@ -213,7 +213,7 @@ static BOOL install_from_unix_file(const char *file_name)
ret
=
install_cab
(
dos_file_name
);
ret
=
install_cab
(
dos_file_name
);
mshtml
_free
(
dos_file_name
);
heap
_free
(
dos_file_name
);
return
ret
;
return
ret
;
}
}
...
@@ -229,10 +229,10 @@ static BOOL install_from_registered_dir(void)
...
@@ -229,10 +229,10 @@ static BOOL install_from_registered_dir(void)
if
(
res
!=
ERROR_SUCCESS
)
if
(
res
!=
ERROR_SUCCESS
)
return
FALSE
;
return
FALSE
;
file_name
=
mshtml
_alloc
(
size
+
sizeof
(
GECKO_FILE_NAME
));
file_name
=
heap
_alloc
(
size
+
sizeof
(
GECKO_FILE_NAME
));
res
=
RegQueryValueExA
(
hkey
,
"GeckoCabDir"
,
NULL
,
&
type
,
(
PBYTE
)
file_name
,
&
size
);
res
=
RegQueryValueExA
(
hkey
,
"GeckoCabDir"
,
NULL
,
&
type
,
(
PBYTE
)
file_name
,
&
size
);
if
(
res
==
ERROR_MORE_DATA
)
{
if
(
res
==
ERROR_MORE_DATA
)
{
file_name
=
mshtml
_realloc
(
file_name
,
size
+
sizeof
(
GECKO_FILE_NAME
));
file_name
=
heap
_realloc
(
file_name
,
size
+
sizeof
(
GECKO_FILE_NAME
));
res
=
RegQueryValueExA
(
hkey
,
"GeckoCabDir"
,
NULL
,
&
type
,
(
PBYTE
)
file_name
,
&
size
);
res
=
RegQueryValueExA
(
hkey
,
"GeckoCabDir"
,
NULL
,
&
type
,
(
PBYTE
)
file_name
,
&
size
);
}
}
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
...
@@ -245,7 +245,7 @@ static BOOL install_from_registered_dir(void)
...
@@ -245,7 +245,7 @@ static BOOL install_from_registered_dir(void)
ret
=
install_from_unix_file
(
file_name
);
ret
=
install_from_unix_file
(
file_name
);
mshtml
_free
(
file_name
);
heap
_free
(
file_name
);
return
ret
;
return
ret
;
}
}
...
@@ -266,14 +266,14 @@ static BOOL install_from_default_dir(void)
...
@@ -266,14 +266,14 @@ static BOOL install_from_default_dir(void)
len
=
strlen
(
data_dir
);
len
=
strlen
(
data_dir
);
len2
=
strlen
(
subdir
);
len2
=
strlen
(
subdir
);
file_name
=
mshtml
_alloc
(
len
+
len2
+
sizeof
(
GECKO_FILE_NAME
));
file_name
=
heap
_alloc
(
len
+
len2
+
sizeof
(
GECKO_FILE_NAME
));
memcpy
(
file_name
,
data_dir
,
len
);
memcpy
(
file_name
,
data_dir
,
len
);
memcpy
(
file_name
+
len
,
subdir
,
len2
);
memcpy
(
file_name
+
len
,
subdir
,
len2
);
memcpy
(
file_name
+
len
+
len2
,
GECKO_FILE_NAME
,
sizeof
(
GECKO_FILE_NAME
));
memcpy
(
file_name
+
len
+
len2
,
GECKO_FILE_NAME
,
sizeof
(
GECKO_FILE_NAME
));
ret
=
install_from_unix_file
(
file_name
);
ret
=
install_from_unix_file
(
file_name
);
mshtml
_free
(
file_name
);
heap
_free
(
file_name
);
return
ret
;
return
ret
;
}
}
...
@@ -307,7 +307,7 @@ static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface,
...
@@ -307,7 +307,7 @@ static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface,
GetTempPathW
(
sizeof
(
tmp_dir
)
/
sizeof
(
WCHAR
),
tmp_dir
);
GetTempPathW
(
sizeof
(
tmp_dir
)
/
sizeof
(
WCHAR
),
tmp_dir
);
tmp_file_name
=
mshtml
_alloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
tmp_file_name
=
heap
_alloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
GetTempFileNameW
(
tmp_dir
,
NULL
,
0
,
tmp_file_name
);
GetTempFileNameW
(
tmp_dir
,
NULL
,
0
,
tmp_file_name
);
TRACE
(
"creating temp file %s
\n
"
,
debugstr_w
(
tmp_file_name
));
TRACE
(
"creating temp file %s
\n
"
,
debugstr_w
(
tmp_file_name
));
...
@@ -433,12 +433,12 @@ static LPWSTR get_url(void)
...
@@ -433,12 +433,12 @@ static LPWSTR get_url(void)
if
(
res
!=
ERROR_SUCCESS
)
if
(
res
!=
ERROR_SUCCESS
)
return
NULL
;
return
NULL
;
url
=
mshtml
_alloc
(
size
);
url
=
heap
_alloc
(
size
);
res
=
RegQueryValueExW
(
hkey
,
wszGeckoUrl
,
NULL
,
&
type
,
(
LPBYTE
)
url
,
&
size
);
res
=
RegQueryValueExW
(
hkey
,
wszGeckoUrl
,
NULL
,
&
type
,
(
LPBYTE
)
url
,
&
size
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
{
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
{
mshtml
_free
(
url
);
heap
_free
(
url
);
return
NULL
;
return
NULL
;
}
}
...
@@ -459,7 +459,7 @@ static DWORD WINAPI download_proc(PVOID arg)
...
@@ -459,7 +459,7 @@ static DWORD WINAPI download_proc(PVOID arg)
HRESULT
hres
;
HRESULT
hres
;
CreateURLMoniker
(
NULL
,
url
,
&
mon
);
CreateURLMoniker
(
NULL
,
url
,
&
mon
);
mshtml
_free
(
url
);
heap
_free
(
url
);
url
=
NULL
;
url
=
NULL
;
CreateAsyncBindCtx
(
0
,
&
InstallCallback
,
0
,
&
bctx
);
CreateAsyncBindCtx
(
0
,
&
InstallCallback
,
0
,
&
bctx
);
...
...
dlls/mshtml/loadopts.c
View file @
a084d1db
...
@@ -106,11 +106,11 @@ static ULONG WINAPI HtmlLoadOptions_Release(IHtmlLoadOptions *iface)
...
@@ -106,11 +106,11 @@ static ULONG WINAPI HtmlLoadOptions_Release(IHtmlLoadOptions *iface)
last
=
iter
;
last
=
iter
;
iter
=
iter
->
next
;
iter
=
iter
->
next
;
mshtml
_free
(
last
->
buffer
);
heap
_free
(
last
->
buffer
);
mshtml
_free
(
last
);
heap
_free
(
last
);
}
}
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -159,13 +159,13 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d
...
@@ -159,13 +159,13 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d
}
}
if
(
!
iter
)
{
if
(
!
iter
)
{
iter
=
mshtml
_alloc
(
sizeof
(
load_opt
));
iter
=
heap
_alloc
(
sizeof
(
load_opt
));
iter
->
next
=
This
->
opts
;
iter
->
next
=
This
->
opts
;
This
->
opts
=
iter
;
This
->
opts
=
iter
;
iter
->
option
=
dwOption
;
iter
->
option
=
dwOption
;
}
else
{
}
else
{
mshtml
_free
(
iter
->
buffer
);
heap
_free
(
iter
->
buffer
);
}
}
if
(
!
cbBuf
)
{
if
(
!
cbBuf
)
{
...
@@ -176,7 +176,7 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d
...
@@ -176,7 +176,7 @@ static HRESULT WINAPI HtmlLoadOptions_SetOption(IHtmlLoadOptions *iface, DWORD d
}
}
iter
->
size
=
cbBuf
;
iter
->
size
=
cbBuf
;
iter
->
buffer
=
mshtml
_alloc
(
cbBuf
);
iter
->
buffer
=
heap
_alloc
(
cbBuf
);
memcpy
(
iter
->
buffer
,
pBuffer
,
iter
->
size
);
memcpy
(
iter
->
buffer
,
pBuffer
,
iter
->
size
);
return
S_OK
;
return
S_OK
;
...
@@ -199,7 +199,7 @@ HRESULT HTMLLoadOptions_Create(IUnknown *pUnkOuter, REFIID riid, void** ppv)
...
@@ -199,7 +199,7 @@ HRESULT HTMLLoadOptions_Create(IUnknown *pUnkOuter, REFIID riid, void** ppv)
TRACE
(
"(%p %s %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%p %s %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppv
);
ret
=
mshtml
_alloc
(
sizeof
(
HTMLLoadOptions
));
ret
=
heap
_alloc
(
sizeof
(
HTMLLoadOptions
));
ret
->
lpHtmlLoadOptionsVtbl
=
&
HtmlLoadOptionsVtbl
;
ret
->
lpHtmlLoadOptionsVtbl
=
&
HtmlLoadOptionsVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
...
dlls/mshtml/main.c
View file @
a084d1db
...
@@ -103,7 +103,7 @@ static void thread_detach(void)
...
@@ -103,7 +103,7 @@ static void thread_detach(void)
if
(
thread_data
->
thread_hwnd
)
if
(
thread_data
->
thread_hwnd
)
DestroyWindow
(
thread_data
->
thread_hwnd
);
DestroyWindow
(
thread_data
->
thread_hwnd
);
mshtml
_free
(
thread_data
);
heap
_free
(
thread_data
);
}
}
static
void
process_detach
(
void
)
static
void
process_detach
(
void
)
...
@@ -192,7 +192,7 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
...
@@ -192,7 +192,7 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
{
mshtml
_free
(
This
);
heap
_free
(
This
);
UNLOCK_MODULE
();
UNLOCK_MODULE
();
}
}
...
@@ -228,7 +228,7 @@ static const IClassFactoryVtbl HTMLClassFactoryVtbl = {
...
@@ -228,7 +228,7 @@ static const IClassFactoryVtbl HTMLClassFactoryVtbl = {
static
HRESULT
ClassFactory_Create
(
REFIID
riid
,
void
**
ppv
,
CreateInstanceFunc
fnCreateInstance
)
static
HRESULT
ClassFactory_Create
(
REFIID
riid
,
void
**
ppv
,
CreateInstanceFunc
fnCreateInstance
)
{
{
ClassFactory
*
ret
=
mshtml
_alloc
(
sizeof
(
ClassFactory
));
ClassFactory
*
ret
=
heap
_alloc
(
sizeof
(
ClassFactory
));
HRESULT
hres
;
HRESULT
hres
;
ret
->
lpVtbl
=
&
HTMLClassFactoryVtbl
;
ret
->
lpVtbl
=
&
HTMLClassFactoryVtbl
;
...
@@ -239,7 +239,7 @@ static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc f
...
@@ -239,7 +239,7 @@ static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc f
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
LOCK_MODULE
();
LOCK_MODULE
();
}
else
{
}
else
{
mshtml
_free
(
ret
);
heap
_free
(
ret
);
*
ppv
=
NULL
;
*
ppv
=
NULL
;
}
}
return
hres
;
return
hres
;
...
@@ -416,7 +416,7 @@ static HRESULT register_server(BOOL do_register)
...
@@ -416,7 +416,7 @@ static HRESULT register_server(BOOL do_register)
INF_SET_ID
(
LIBID_MSHTML
);
INF_SET_ID
(
LIBID_MSHTML
);
for
(
i
=
0
;
i
<
sizeof
(
pse
)
/
sizeof
(
pse
[
0
]);
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
pse
)
/
sizeof
(
pse
[
0
]);
i
++
)
{
pse
[
i
].
pszValue
=
mshtml
_alloc
(
39
);
pse
[
i
].
pszValue
=
heap
_alloc
(
39
);
sprintf
(
pse
[
i
].
pszValue
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
sprintf
(
pse
[
i
].
pszValue
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
clsids
[
i
]
->
Data1
,
clsids
[
i
]
->
Data2
,
clsids
[
i
]
->
Data3
,
clsids
[
i
]
->
Data4
[
0
],
clsids
[
i
]
->
Data1
,
clsids
[
i
]
->
Data2
,
clsids
[
i
]
->
Data3
,
clsids
[
i
]
->
Data4
[
0
],
clsids
[
i
]
->
Data4
[
1
],
clsids
[
i
]
->
Data4
[
2
],
clsids
[
i
]
->
Data4
[
3
],
clsids
[
i
]
->
Data4
[
4
],
clsids
[
i
]
->
Data4
[
1
],
clsids
[
i
]
->
Data4
[
2
],
clsids
[
i
]
->
Data4
[
3
],
clsids
[
i
]
->
Data4
[
4
],
...
@@ -432,7 +432,7 @@ static HRESULT register_server(BOOL do_register)
...
@@ -432,7 +432,7 @@ static HRESULT register_server(BOOL do_register)
hres
=
pRegInstall
(
hInst
,
do_register
?
"RegisterDll"
:
"UnregisterDll"
,
&
strtable
);
hres
=
pRegInstall
(
hInst
,
do_register
?
"RegisterDll"
:
"UnregisterDll"
,
&
strtable
);
for
(
i
=
0
;
i
<
sizeof
(
pse
)
/
sizeof
(
pse
[
0
]);
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
pse
)
/
sizeof
(
pse
[
0
]);
i
++
)
mshtml
_free
(
pse
[
i
].
pszValue
);
heap
_free
(
pse
[
i
].
pszValue
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
ERR
(
"RegInstall failed: %08x
\n
"
,
hres
);
ERR
(
"RegInstall failed: %08x
\n
"
,
hres
);
...
...
dlls/mshtml/mshtml_private.h
View file @
a084d1db
...
@@ -541,22 +541,22 @@ extern LONG module_ref;
...
@@ -541,22 +541,22 @@ extern LONG module_ref;
/* memory allocation functions */
/* memory allocation functions */
static
inline
void
*
mshtml
_alloc
(
size_t
len
)
static
inline
void
*
heap
_alloc
(
size_t
len
)
{
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
}
static
inline
void
*
mshtml
_alloc_zero
(
size_t
len
)
static
inline
void
*
heap
_alloc_zero
(
size_t
len
)
{
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
}
}
static
inline
void
*
mshtml
_realloc
(
void
*
mem
,
size_t
len
)
static
inline
void
*
heap
_realloc
(
void
*
mem
,
size_t
len
)
{
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
}
}
static
inline
BOOL
mshtml
_free
(
void
*
mem
)
static
inline
BOOL
heap
_free
(
void
*
mem
)
{
{
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
}
...
...
dlls/mshtml/navigate.c
View file @
a084d1db
...
@@ -88,7 +88,7 @@ static nsrefcnt NSAPI nsInputStream_Release(nsIInputStream *iface)
...
@@ -88,7 +88,7 @@ static nsrefcnt NSAPI nsInputStream_Release(nsIInputStream *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
mshtml
_free
(
This
);
heap
_free
(
This
);
return
ref
;
return
ref
;
}
}
...
@@ -176,7 +176,7 @@ static const nsIInputStreamVtbl nsInputStreamVtbl = {
...
@@ -176,7 +176,7 @@ static const nsIInputStreamVtbl nsInputStreamVtbl = {
static
nsProtocolStream
*
create_nsprotocol_stream
(
void
)
static
nsProtocolStream
*
create_nsprotocol_stream
(
void
)
{
{
nsProtocolStream
*
ret
=
mshtml
_alloc
(
sizeof
(
nsProtocolStream
));
nsProtocolStream
*
ret
=
heap
_alloc
(
sizeof
(
nsProtocolStream
));
ret
->
lpInputStreamVtbl
=
&
nsInputStreamVtbl
;
ret
->
lpInputStreamVtbl
=
&
nsInputStreamVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
@@ -212,7 +212,7 @@ static HRESULT read_stream_data(BSCallback *This, IStream *stream)
...
@@ -212,7 +212,7 @@ static HRESULT read_stream_data(BSCallback *This, IStream *stream)
break
;
break
;
if
(
!
This
->
readed
&&
This
->
nsstream
->
buf_size
>=
2
&&
*
(
WORD
*
)
This
->
nsstream
->
buf
==
0xfeff
)
{
if
(
!
This
->
readed
&&
This
->
nsstream
->
buf_size
>=
2
&&
*
(
WORD
*
)
This
->
nsstream
->
buf
==
0xfeff
)
{
This
->
nschannel
->
charset
=
mshtml
_alloc
(
sizeof
(
UTF16_STR
));
This
->
nschannel
->
charset
=
heap
_alloc
(
sizeof
(
UTF16_STR
));
memcpy
(
This
->
nschannel
->
charset
,
UTF16_STR
,
sizeof
(
UTF16_STR
));
memcpy
(
This
->
nschannel
->
charset
,
UTF16_STR
,
sizeof
(
UTF16_STR
));
}
}
...
@@ -330,8 +330,8 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
...
@@ -330,8 +330,8 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
if
(
This
->
binding
)
if
(
This
->
binding
)
IBinding_Release
(
This
->
binding
);
IBinding_Release
(
This
->
binding
);
list_remove
(
&
This
->
entry
);
list_remove
(
&
This
->
entry
);
mshtml
_free
(
This
->
headers
);
heap
_free
(
This
->
headers
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -383,10 +383,10 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface,
...
@@ -383,10 +383,10 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface,
if
(
!
This
->
nschannel
)
if
(
!
This
->
nschannel
)
return
S_OK
;
return
S_OK
;
mshtml
_free
(
This
->
nschannel
->
content
);
heap
_free
(
This
->
nschannel
->
content
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
szStatusText
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
szStatusText
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
This
->
nschannel
->
content
=
mshtml
_alloc
(
len
*
sizeof
(
WCHAR
));
This
->
nschannel
->
content
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
WideCharToMultiByte
(
CP_ACP
,
0
,
szStatusText
,
-
1
,
This
->
nschannel
->
content
,
-
1
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
szStatusText
,
-
1
,
This
->
nschannel
->
content
,
-
1
,
NULL
,
NULL
);
}
}
}
}
...
@@ -425,7 +425,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
...
@@ -425,7 +425,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac
return
S_OK
;
return
S_OK
;
if
(
This
->
doc
&&
This
->
doc
->
bscallback
==
This
&&
!
This
->
doc
->
nscontainer
)
{
if
(
This
->
doc
&&
This
->
doc
->
bscallback
==
This
&&
!
This
->
doc
->
nscontainer
)
{
task_t
*
task
=
mshtml
_alloc
(
sizeof
(
task_t
));
task_t
*
task
=
heap
_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
->
doc
;
task
->
doc
=
This
->
doc
;
task
->
task_id
=
TASK_PARSECOMPLETE
;
task
->
task_id
=
TASK_PARSECOMPLETE
;
...
@@ -662,7 +662,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
...
@@ -662,7 +662,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
BSCallback
*
create_bscallback
(
IMoniker
*
mon
)
BSCallback
*
create_bscallback
(
IMoniker
*
mon
)
{
{
BSCallback
*
ret
=
mshtml
_alloc
(
sizeof
(
BSCallback
));
BSCallback
*
ret
=
heap
_alloc
(
sizeof
(
BSCallback
));
ret
->
lpBindStatusCallbackVtbl
=
&
BindStatusCallbackVtbl
;
ret
->
lpBindStatusCallbackVtbl
=
&
BindStatusCallbackVtbl
;
ret
->
lpServiceProviderVtbl
=
&
ServiceProviderVtbl
;
ret
->
lpServiceProviderVtbl
=
&
ServiceProviderVtbl
;
...
@@ -750,9 +750,9 @@ static void parse_post_data(nsIInputStream *post_data_stream, LPWSTR *headers_re
...
@@ -750,9 +750,9 @@ static void parse_post_data(nsIInputStream *post_data_stream, LPWSTR *headers_re
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr2
,
ptr
-
ptr2
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr2
,
ptr
-
ptr2
,
NULL
,
0
);
if
(
headers
)
if
(
headers
)
headers
=
mshtml
_realloc
(
headers
,(
headers_len
+
len
+
1
)
*
sizeof
(
WCHAR
));
headers
=
heap
_realloc
(
headers
,(
headers_len
+
len
+
1
)
*
sizeof
(
WCHAR
));
else
else
headers
=
mshtml
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
headers
=
heap
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr2
,
ptr
-
ptr2
,
headers
+
headers_len
,
-
1
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
ptr2
,
ptr
-
ptr2
,
headers
+
headers_len
,
-
1
);
headers_len
+=
len
;
headers_len
+=
len
;
...
@@ -895,7 +895,7 @@ HRESULT load_stream(BSCallback *bscallback, IStream *stream)
...
@@ -895,7 +895,7 @@ HRESULT load_stream(BSCallback *bscallback, IStream *stream)
add_nsrequest
(
bscallback
);
add_nsrequest
(
bscallback
);
if
(
bscallback
->
nschannel
)
{
if
(
bscallback
->
nschannel
)
{
bscallback
->
nschannel
->
content
=
mshtml
_alloc
(
sizeof
(
text_html
));
bscallback
->
nschannel
->
content
=
heap
_alloc
(
sizeof
(
text_html
));
memcpy
(
bscallback
->
nschannel
->
content
,
text_html
,
sizeof
(
text_html
));
memcpy
(
bscallback
->
nschannel
->
content
,
text_html
,
sizeof
(
text_html
));
}
}
...
...
dlls/mshtml/nsembed.c
View file @
a084d1db
...
@@ -874,7 +874,7 @@ static nsrefcnt NSAPI nsWebBrowserChrome_Release(nsIWebBrowserChrome *iface)
...
@@ -874,7 +874,7 @@ static nsrefcnt NSAPI nsWebBrowserChrome_Release(nsIWebBrowserChrome *iface)
if
(
!
ref
)
{
if
(
!
ref
)
{
if
(
This
->
parent
)
if
(
This
->
parent
)
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
This
->
parent
));
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
This
->
parent
));
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -1558,7 +1558,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
...
@@ -1558,7 +1558,7 @@ NSContainer *NSContainer_Create(HTMLDocument *doc, NSContainer *parent)
if
(
!
load_gecko
(
FALSE
))
if
(
!
load_gecko
(
FALSE
))
return
NULL
;
return
NULL
;
ret
=
mshtml
_alloc
(
sizeof
(
NSContainer
));
ret
=
heap
_alloc
(
sizeof
(
NSContainer
));
ret
->
lpWebBrowserChromeVtbl
=
&
nsWebBrowserChromeVtbl
;
ret
->
lpWebBrowserChromeVtbl
=
&
nsWebBrowserChromeVtbl
;
ret
->
lpContextMenuListenerVtbl
=
&
nsContextMenuListenerVtbl
;
ret
->
lpContextMenuListenerVtbl
=
&
nsContextMenuListenerVtbl
;
...
...
dlls/mshtml/nsevents.c
View file @
a084d1db
...
@@ -146,7 +146,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
...
@@ -146,7 +146,7 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
if
(
This
->
doc
->
usermode
==
EDITMODE
)
if
(
This
->
doc
->
usermode
==
EDITMODE
)
handle_edit_load
(
This
->
doc
);
handle_edit_load
(
This
->
doc
);
task
=
mshtml
_alloc
(
sizeof
(
task_t
));
task
=
heap
_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
->
doc
;
task
->
doc
=
This
->
doc
;
task
->
task_id
=
TASK_PARSECOMPLETE
;
task
->
task_id
=
TASK_PARSECOMPLETE
;
...
...
dlls/mshtml/nsio.c
View file @
a084d1db
...
@@ -204,9 +204,9 @@ static nsrefcnt NSAPI nsChannel_Release(nsIHttpChannel *iface)
...
@@ -204,9 +204,9 @@ static nsrefcnt NSAPI nsChannel_Release(nsIHttpChannel *iface)
nsIInterfaceRequestor_Release
(
This
->
notif_callback
);
nsIInterfaceRequestor_Release
(
This
->
notif_callback
);
if
(
This
->
original_uri
)
if
(
This
->
original_uri
)
nsIURI_Release
(
This
->
original_uri
);
nsIURI_Release
(
This
->
original_uri
);
mshtml
_free
(
This
->
content
);
heap
_free
(
This
->
content
);
mshtml
_free
(
This
->
charset
);
heap
_free
(
This
->
charset
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -735,7 +735,7 @@ static nsresult async_open(nsChannel *This, NSContainer *container, nsIStreamLis
...
@@ -735,7 +735,7 @@ static nsresult async_open(nsChannel *This, NSContainer *container, nsIStreamLis
bscallback
->
nscontext
=
context
;
bscallback
->
nscontext
=
context
;
}
}
task
=
mshtml
_alloc
(
sizeof
(
task_t
));
task
=
heap
_alloc
(
sizeof
(
task_t
));
task
->
doc
=
container
->
doc
;
task
->
doc
=
container
->
doc
;
task
->
task_id
=
TASK_START_BINDING
;
task
->
task_id
=
TASK_START_BINDING
;
...
@@ -1190,8 +1190,8 @@ static nsrefcnt NSAPI nsURI_Release(nsIWineURI *iface)
...
@@ -1190,8 +1190,8 @@ static nsrefcnt NSAPI nsURI_Release(nsIWineURI *iface)
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
This
->
container
));
nsIWebBrowserChrome_Release
(
NSWBCHROME
(
This
->
container
));
if
(
This
->
uri
)
if
(
This
->
uri
)
nsIURI_Release
(
This
->
uri
);
nsIURI_Release
(
This
->
uri
);
mshtml
_free
(
This
->
wine_url
);
heap
_free
(
This
->
wine_url
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -1655,11 +1655,11 @@ static nsresult NSAPI nsURI_SetWineURL(nsIWineURI *iface, LPCWSTR aURL)
...
@@ -1655,11 +1655,11 @@ static nsresult NSAPI nsURI_SetWineURL(nsIWineURI *iface, LPCWSTR aURL)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
aURL
));
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
aURL
));
mshtml
_free
(
This
->
wine_url
);
heap
_free
(
This
->
wine_url
);
if
(
aURL
)
{
if
(
aURL
)
{
int
len
=
strlenW
(
aURL
)
+
1
;
int
len
=
strlenW
(
aURL
)
+
1
;
This
->
wine_url
=
mshtml
_alloc
(
len
*
sizeof
(
WCHAR
));
This
->
wine_url
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
memcpy
(
This
->
wine_url
,
aURL
,
len
*
sizeof
(
WCHAR
));
memcpy
(
This
->
wine_url
,
aURL
,
len
*
sizeof
(
WCHAR
));
/* FIXME: Always use wine url */
/* FIXME: Always use wine url */
...
@@ -1717,7 +1717,7 @@ static const nsIWineURIVtbl nsWineURIVtbl = {
...
@@ -1717,7 +1717,7 @@ static const nsIWineURIVtbl nsWineURIVtbl = {
static
nsresult
create_uri
(
nsIURI
*
uri
,
NSContainer
*
container
,
nsIWineURI
**
_retval
)
static
nsresult
create_uri
(
nsIURI
*
uri
,
NSContainer
*
container
,
nsIWineURI
**
_retval
)
{
{
nsURI
*
ret
=
mshtml
_alloc
(
sizeof
(
nsURI
));
nsURI
*
ret
=
heap
_alloc
(
sizeof
(
nsURI
));
ret
->
lpWineURIVtbl
=
&
nsWineURIVtbl
;
ret
->
lpWineURIVtbl
=
&
nsWineURIVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
@@ -1794,7 +1794,7 @@ static nsrefcnt NSAPI nsProtocolHandler_Release(nsIProtocolHandler *iface)
...
@@ -1794,7 +1794,7 @@ static nsrefcnt NSAPI nsProtocolHandler_Release(nsIProtocolHandler *iface)
if
(
!
ref
)
{
if
(
!
ref
)
{
if
(
This
->
nshandler
)
if
(
This
->
nshandler
)
nsIProtocolHandler_Release
(
This
->
nshandler
);
nsIProtocolHandler_Release
(
This
->
nshandler
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -1887,7 +1887,7 @@ static const nsIProtocolHandlerVtbl nsProtocolHandlerVtbl = {
...
@@ -1887,7 +1887,7 @@ static const nsIProtocolHandlerVtbl nsProtocolHandlerVtbl = {
static
nsIProtocolHandler
*
create_protocol_handler
(
nsIProtocolHandler
*
nshandler
)
static
nsIProtocolHandler
*
create_protocol_handler
(
nsIProtocolHandler
*
nshandler
)
{
{
nsProtocolHandler
*
ret
=
mshtml
_alloc
(
sizeof
(
nsProtocolHandler
));
nsProtocolHandler
*
ret
=
heap
_alloc
(
sizeof
(
nsProtocolHandler
));
ret
->
lpProtocolHandlerVtbl
=
&
nsProtocolHandlerVtbl
;
ret
->
lpProtocolHandlerVtbl
=
&
nsProtocolHandlerVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
@@ -2092,7 +2092,7 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI
...
@@ -2092,7 +2092,7 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI
return
channel
?
NS_OK
:
NS_ERROR_UNEXPECTED
;
return
channel
?
NS_OK
:
NS_ERROR_UNEXPECTED
;
}
}
ret
=
mshtml
_alloc
(
sizeof
(
nsChannel
));
ret
=
heap
_alloc
(
sizeof
(
nsChannel
));
ret
->
lpHttpChannelVtbl
=
&
nsChannelVtbl
;
ret
->
lpHttpChannelVtbl
=
&
nsChannelVtbl
;
ret
->
lpUploadChannelVtbl
=
&
nsUploadChannelVtbl
;
ret
->
lpUploadChannelVtbl
=
&
nsUploadChannelVtbl
;
...
...
dlls/mshtml/persist.c
View file @
a084d1db
...
@@ -136,7 +136,7 @@ static nsIInputStream *get_post_data_stream(IBindCtx *bctx)
...
@@ -136,7 +136,7 @@ static nsIInputStream *get_post_data_stream(IBindCtx *bctx)
static
const
char
content_length
[]
=
"Content-Length: %u
\r\n\r\n
"
;
static
const
char
content_length
[]
=
"Content-Length: %u
\r\n\r\n
"
;
data
=
mshtml
_alloc
(
headers_len
+
post_len
+
sizeof
(
content_length
)
+
8
);
data
=
heap
_alloc
(
headers_len
+
post_len
+
sizeof
(
content_length
)
+
8
);
if
(
headers_len
)
{
if
(
headers_len
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
headers
,
-
1
,
data
,
-
1
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
headers
,
-
1
,
data
,
-
1
,
NULL
,
NULL
);
...
@@ -281,7 +281,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
...
@@ -281,7 +281,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
bscallback
=
create_bscallback
(
mon
);
bscallback
=
create_bscallback
(
mon
);
if
(
This
->
frame
)
{
if
(
This
->
frame
)
{
task
=
mshtml
_alloc
(
sizeof
(
task_t
));
task
=
heap
_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
;
task
->
doc
=
This
;
task
->
task_id
=
TASK_SETPROGRESS
;
task
->
task_id
=
TASK_SETPROGRESS
;
...
@@ -290,7 +290,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
...
@@ -290,7 +290,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
push_task
(
task
);
push_task
(
task
);
}
}
task
=
mshtml
_alloc
(
sizeof
(
task_t
));
task
=
heap
_alloc
(
sizeof
(
task_t
));
task
->
doc
=
This
;
task
->
doc
=
This
;
task
->
task_id
=
TASK_SETDOWNLOADSTATE
;
task
->
task_id
=
TASK_SETDOWNLOADSTATE
;
...
@@ -366,7 +366,7 @@ static HRESULT get_doc_string(HTMLDocument *This, char **str, DWORD *len)
...
@@ -366,7 +366,7 @@ static HRESULT get_doc_string(HTMLDocument *This, char **str, DWORD *len)
TRACE
(
"%s
\n
"
,
debugstr_w
(
strw
));
TRACE
(
"%s
\n
"
,
debugstr_w
(
strw
));
*
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
strw
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
*
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
strw
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
*
str
=
mshtml
_alloc
(
*
len
);
*
str
=
heap
_alloc
(
*
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
strw
,
-
1
,
*
str
,
*
len
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
strw
,
-
1
,
*
str
,
*
len
,
NULL
,
NULL
);
nsAString_Finish
(
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
...
@@ -700,7 +700,7 @@ static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM
...
@@ -700,7 +700,7 @@ static HRESULT WINAPI PersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
FIXME
(
"Write failed: %08x
\n
"
,
hres
);
FIXME
(
"Write failed: %08x
\n
"
,
hres
);
mshtml
_free
(
str
);
heap
_free
(
str
);
return
S_OK
;
return
S_OK
;
}
}
...
...
dlls/mshtml/protocol.c
View file @
a084d1db
...
@@ -213,8 +213,8 @@ static ULONG WINAPI AboutProtocol_Release(IInternetProtocol *iface)
...
@@ -213,8 +213,8 @@ static ULONG WINAPI AboutProtocol_Release(IInternetProtocol *iface)
TRACE
(
"(%p) ref=%x
\n
"
,
iface
,
ref
);
TRACE
(
"(%p) ref=%x
\n
"
,
iface
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
{
mshtml
_free
(
This
->
data
);
heap
_free
(
This
->
data
);
mshtml
_free
(
This
);
heap
_free
(
This
);
UNLOCK_MODULE
();
UNLOCK_MODULE
();
}
}
...
@@ -259,7 +259,7 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr
...
@@ -259,7 +259,7 @@ static HRESULT WINAPI AboutProtocol_Start(IInternetProtocol *iface, LPCWSTR szUr
This
->
data_len
=
sizeof
(
html_begin
)
+
sizeof
(
html_end
)
-
sizeof
(
WCHAR
)
This
->
data_len
=
sizeof
(
html_begin
)
+
sizeof
(
html_end
)
-
sizeof
(
WCHAR
)
+
(
text
?
strlenW
(
text
)
*
sizeof
(
WCHAR
)
:
0
);
+
(
text
?
strlenW
(
text
)
*
sizeof
(
WCHAR
)
:
0
);
This
->
data
=
mshtml
_alloc
(
This
->
data_len
);
This
->
data
=
heap
_alloc
(
This
->
data_len
);
memcpy
(
This
->
data
,
html_begin
,
sizeof
(
html_begin
));
memcpy
(
This
->
data
,
html_begin
,
sizeof
(
html_begin
));
if
(
text
)
if
(
text
)
...
@@ -387,7 +387,7 @@ static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface,
...
@@ -387,7 +387,7 @@ static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface,
TRACE
(
"(%p)->(%p %s %p)
\n
"
,
iface
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%p)->(%p %s %p)
\n
"
,
iface
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppv
);
ret
=
mshtml
_alloc
(
sizeof
(
AboutProtocol
));
ret
=
heap
_alloc
(
sizeof
(
AboutProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
AboutProtocolVtbl
;
ret
->
lpInternetProtocolVtbl
=
&
AboutProtocolVtbl
;
ret
->
ref
=
0
;
ret
->
ref
=
0
;
...
@@ -409,7 +409,7 @@ static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface,
...
@@ -409,7 +409,7 @@ static HRESULT WINAPI AboutProtocolFactory_CreateInstance(IClassFactory *iface,
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
LOCK_MODULE
();
LOCK_MODULE
();
else
else
mshtml
_free
(
ret
);
heap
_free
(
ret
);
return
hres
;
return
hres
;
}
}
...
@@ -542,8 +542,8 @@ static ULONG WINAPI ResProtocol_Release(IInternetProtocol *iface)
...
@@ -542,8 +542,8 @@ static ULONG WINAPI ResProtocol_Release(IInternetProtocol *iface)
TRACE
(
"(%p) ref=%x
\n
"
,
iface
,
ref
);
TRACE
(
"(%p) ref=%x
\n
"
,
iface
,
ref
);
if
(
!
ref
)
{
if
(
!
ref
)
{
mshtml
_free
(
This
->
data
);
heap
_free
(
This
->
data
);
mshtml
_free
(
This
);
heap
_free
(
This
);
UNLOCK_MODULE
();
UNLOCK_MODULE
();
}
}
...
@@ -573,11 +573,11 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
...
@@ -573,11 +573,11 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
ReleaseBindInfo
(
&
bindinfo
);
ReleaseBindInfo
(
&
bindinfo
);
len
=
strlenW
(
szUrl
)
+
16
;
len
=
strlenW
(
szUrl
)
+
16
;
url
=
mshtml
_alloc
(
len
*
sizeof
(
WCHAR
));
url
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
hres
=
CoInternetParseUrl
(
szUrl
,
PARSE_ENCODE
,
0
,
url
,
len
,
&
len
,
0
);
hres
=
CoInternetParseUrl
(
szUrl
,
PARSE_ENCODE
,
0
,
url
,
len
,
&
len
,
0
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
WARN
(
"CoInternetParseUrl failed: %08x
\n
"
,
hres
);
WARN
(
"CoInternetParseUrl failed: %08x
\n
"
,
hres
);
mshtml
_free
(
url
);
heap
_free
(
url
);
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
hres
,
0
,
NULL
);
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
hres
,
0
,
NULL
);
return
hres
;
return
hres
;
}
}
...
@@ -585,7 +585,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
...
@@ -585,7 +585,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
if
(
len
<
sizeof
(
wszRes
)
/
sizeof
(
wszRes
[
0
])
||
memcmp
(
url
,
wszRes
,
sizeof
(
wszRes
)))
{
if
(
len
<
sizeof
(
wszRes
)
/
sizeof
(
wszRes
[
0
])
||
memcmp
(
url
,
wszRes
,
sizeof
(
wszRes
)))
{
WARN
(
"Wrong protocol of url: %s
\n
"
,
debugstr_w
(
url
));
WARN
(
"Wrong protocol of url: %s
\n
"
,
debugstr_w
(
url
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
E_INVALIDARG
,
0
,
NULL
);
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
E_INVALIDARG
,
0
,
NULL
);
mshtml
_free
(
url
);
heap
_free
(
url
);
return
E_INVALIDARG
;
return
E_INVALIDARG
;
}
}
...
@@ -593,7 +593,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
...
@@ -593,7 +593,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
if
(
!
(
url_file
=
strrchrW
(
url_dll
,
'/'
)))
{
if
(
!
(
url_file
=
strrchrW
(
url_dll
,
'/'
)))
{
WARN
(
"wrong url: %s
\n
"
,
debugstr_w
(
url
));
WARN
(
"wrong url: %s
\n
"
,
debugstr_w
(
url
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
MK_E_SYNTAX
,
0
,
NULL
);
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
MK_E_SYNTAX
,
0
,
NULL
);
mshtml
_free
(
url
);
heap
_free
(
url
);
return
MK_E_SYNTAX
;
return
MK_E_SYNTAX
;
}
}
...
@@ -602,7 +602,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
...
@@ -602,7 +602,7 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
if
(
!
hdll
)
{
if
(
!
hdll
)
{
WARN
(
"Could not open dll: %s
\n
"
,
debugstr_w
(
url_dll
));
WARN
(
"Could not open dll: %s
\n
"
,
debugstr_w
(
url_dll
));
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
HRESULT_FROM_WIN32
(
GetLastError
()),
0
,
NULL
);
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
HRESULT_FROM_WIN32
(
GetLastError
()),
0
,
NULL
);
mshtml
_free
(
url
);
heap
_free
(
url
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
}
...
@@ -617,25 +617,25 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
...
@@ -617,25 +617,25 @@ static HRESULT WINAPI ResProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
WARN
(
"Could not find resource
\n
"
);
WARN
(
"Could not find resource
\n
"
);
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
HRESULT_FROM_WIN32
(
GetLastError
()),
0
,
NULL
);
HRESULT_FROM_WIN32
(
GetLastError
()),
0
,
NULL
);
mshtml
_free
(
url
);
heap
_free
(
url
);
return
HRESULT_FROM_WIN32
(
GetLastError
());
return
HRESULT_FROM_WIN32
(
GetLastError
());
}
}
}
}
if
(
This
->
data
)
{
if
(
This
->
data
)
{
WARN
(
"data already loaded
\n
"
);
WARN
(
"data already loaded
\n
"
);
mshtml
_free
(
This
->
data
);
heap
_free
(
This
->
data
);
}
}
This
->
data_len
=
SizeofResource
(
hdll
,
src
);
This
->
data_len
=
SizeofResource
(
hdll
,
src
);
This
->
data
=
mshtml
_alloc
(
This
->
data_len
);
This
->
data
=
heap
_alloc
(
This
->
data_len
);
memcpy
(
This
->
data
,
LoadResource
(
hdll
,
src
),
This
->
data_len
);
memcpy
(
This
->
data
,
LoadResource
(
hdll
,
src
),
This
->
data_len
);
This
->
cur
=
0
;
This
->
cur
=
0
;
FreeLibrary
(
hdll
);
FreeLibrary
(
hdll
);
hres
=
FindMimeFromData
(
NULL
,
url_file
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
hres
=
FindMimeFromData
(
NULL
,
url_file
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
mshtml
_free
(
url
);
heap
_free
(
url
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
mime
);
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_MIMETYPEAVAILABLE
,
mime
);
CoTaskMemFree
(
mime
);
CoTaskMemFree
(
mime
);
...
@@ -763,7 +763,7 @@ static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IU
...
@@ -763,7 +763,7 @@ static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IU
TRACE
(
"(%p)->(%p %s %p)
\n
"
,
iface
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%p)->(%p %s %p)
\n
"
,
iface
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppv
);
ret
=
mshtml
_alloc
(
sizeof
(
ResProtocol
));
ret
=
heap
_alloc
(
sizeof
(
ResProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
ResProtocolVtbl
;
ret
->
lpInternetProtocolVtbl
=
&
ResProtocolVtbl
;
ret
->
ref
=
0
;
ret
->
ref
=
0
;
ret
->
data
=
NULL
;
ret
->
data
=
NULL
;
...
@@ -784,7 +784,7 @@ static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IU
...
@@ -784,7 +784,7 @@ static HRESULT WINAPI ResProtocolFactory_CreateInstance(IClassFactory *iface, IU
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
LOCK_MODULE
();
LOCK_MODULE
();
else
else
mshtml
_free
(
ret
);
heap
_free
(
ret
);
return
hres
;
return
hres
;
}
}
...
...
dlls/mshtml/selection.c
View file @
a084d1db
...
@@ -100,7 +100,7 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
...
@@ -100,7 +100,7 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
nsISelection_Release
(
This
->
nsselection
);
nsISelection_Release
(
This
->
nsselection
);
if
(
This
->
doc
)
if
(
This
->
doc
)
list_remove
(
&
This
->
entry
);
list_remove
(
&
This
->
entry
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -243,7 +243,7 @@ static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl = {
...
@@ -243,7 +243,7 @@ static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl = {
IHTMLSelectionObject
*
HTMLSelectionObject_Create
(
HTMLDocument
*
doc
,
nsISelection
*
nsselection
)
IHTMLSelectionObject
*
HTMLSelectionObject_Create
(
HTMLDocument
*
doc
,
nsISelection
*
nsselection
)
{
{
HTMLSelectionObject
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLSelectionObject
));
HTMLSelectionObject
*
ret
=
heap
_alloc
(
sizeof
(
HTMLSelectionObject
));
ret
->
lpHTMLSelectionObjectVtbl
=
&
HTMLSelectionObjectVtbl
;
ret
->
lpHTMLSelectionObjectVtbl
=
&
HTMLSelectionObjectVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
...
dlls/mshtml/service.c
View file @
a084d1db
...
@@ -81,7 +81,7 @@ static ULONG WINAPI OleUndoManager_Release(IOleUndoManager *iface)
...
@@ -81,7 +81,7 @@ static ULONG WINAPI OleUndoManager_Release(IOleUndoManager *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
if
(
!
ref
)
mshtml
_free
(
This
);
heap
_free
(
This
);
return
ref
;
return
ref
;
}
}
...
@@ -195,7 +195,7 @@ static const IOleUndoManagerVtbl OleUndoManagerVtbl = {
...
@@ -195,7 +195,7 @@ static const IOleUndoManagerVtbl OleUndoManagerVtbl = {
static
IOleUndoManager
*
create_undomgr
(
void
)
static
IOleUndoManager
*
create_undomgr
(
void
)
{
{
UndoManager
*
ret
=
mshtml
_alloc
(
sizeof
(
UndoManager
));
UndoManager
*
ret
=
heap
_alloc
(
sizeof
(
UndoManager
));
ret
->
lpOleUndoManagerVtbl
=
&
OleUndoManagerVtbl
;
ret
->
lpOleUndoManagerVtbl
=
&
OleUndoManagerVtbl
;
ret
->
ref
=
1
;
ret
->
ref
=
1
;
...
...
dlls/mshtml/task.c
View file @
a084d1db
...
@@ -82,7 +82,7 @@ void remove_doc_tasks(const HTMLDocument *doc)
...
@@ -82,7 +82,7 @@ void remove_doc_tasks(const HTMLDocument *doc)
while
(
iter
->
next
&&
iter
->
next
->
doc
==
doc
)
{
while
(
iter
->
next
&&
iter
->
next
->
doc
==
doc
)
{
tmp
=
iter
->
next
;
tmp
=
iter
->
next
;
iter
->
next
=
tmp
->
next
;
iter
->
next
=
tmp
->
next
;
mshtml
_free
(
tmp
);
heap
_free
(
tmp
);
}
}
if
(
!
iter
->
next
)
if
(
!
iter
->
next
)
...
@@ -248,7 +248,7 @@ static LRESULT WINAPI hidden_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
...
@@ -248,7 +248,7 @@ static LRESULT WINAPI hidden_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
break
;
break
;
process_task
(
task
);
process_task
(
task
);
mshtml
_free
(
task
);
heap
_free
(
task
);
}
}
return
0
;
return
0
;
...
@@ -305,7 +305,7 @@ thread_data_t *get_thread_data(BOOL create)
...
@@ -305,7 +305,7 @@ thread_data_t *get_thread_data(BOOL create)
thread_data
=
TlsGetValue
(
mshtml_tls
);
thread_data
=
TlsGetValue
(
mshtml_tls
);
if
(
!
thread_data
&&
create
)
{
if
(
!
thread_data
&&
create
)
{
thread_data
=
mshtml
_alloc_zero
(
sizeof
(
thread_data_t
));
thread_data
=
heap
_alloc_zero
(
sizeof
(
thread_data_t
));
TlsSetValue
(
mshtml_tls
,
thread_data
);
TlsSetValue
(
mshtml_tls
,
thread_data
);
}
}
...
...
dlls/mshtml/txtrange.c
View file @
a084d1db
...
@@ -160,20 +160,20 @@ static inline void wstrbuf_init(wstrbuf_t *buf)
...
@@ -160,20 +160,20 @@ static inline void wstrbuf_init(wstrbuf_t *buf)
{
{
buf
->
len
=
0
;
buf
->
len
=
0
;
buf
->
size
=
16
;
buf
->
size
=
16
;
buf
->
buf
=
mshtml
_alloc
(
buf
->
size
*
sizeof
(
WCHAR
));
buf
->
buf
=
heap
_alloc
(
buf
->
size
*
sizeof
(
WCHAR
));
*
buf
->
buf
=
0
;
*
buf
->
buf
=
0
;
}
}
static
inline
void
wstrbuf_finish
(
wstrbuf_t
*
buf
)
static
inline
void
wstrbuf_finish
(
wstrbuf_t
*
buf
)
{
{
mshtml
_free
(
buf
->
buf
);
heap
_free
(
buf
->
buf
);
}
}
static
void
wstrbuf_append_len
(
wstrbuf_t
*
buf
,
LPCWSTR
str
,
int
len
)
static
void
wstrbuf_append_len
(
wstrbuf_t
*
buf
,
LPCWSTR
str
,
int
len
)
{
{
if
(
buf
->
len
+
len
>=
buf
->
size
)
{
if
(
buf
->
len
+
len
>=
buf
->
size
)
{
buf
->
size
=
2
*
buf
->
len
+
len
;
buf
->
size
=
2
*
buf
->
len
+
len
;
buf
->
buf
=
mshtml
_realloc
(
buf
->
buf
,
buf
->
size
*
sizeof
(
WCHAR
));
buf
->
buf
=
heap
_realloc
(
buf
->
buf
,
buf
->
size
*
sizeof
(
WCHAR
));
}
}
memcpy
(
buf
->
buf
+
buf
->
len
,
str
,
len
*
sizeof
(
WCHAR
));
memcpy
(
buf
->
buf
+
buf
->
len
,
str
,
len
*
sizeof
(
WCHAR
));
...
@@ -195,7 +195,7 @@ static void wstrbuf_append_nodetxt(wstrbuf_t *buf, LPCWSTR str, int len)
...
@@ -195,7 +195,7 @@ static void wstrbuf_append_nodetxt(wstrbuf_t *buf, LPCWSTR str, int len)
if
(
buf
->
len
+
len
>=
buf
->
size
)
{
if
(
buf
->
len
+
len
>=
buf
->
size
)
{
buf
->
size
=
2
*
buf
->
len
+
len
;
buf
->
size
=
2
*
buf
->
len
+
len
;
buf
->
buf
=
mshtml
_realloc
(
buf
->
buf
,
buf
->
size
*
sizeof
(
WCHAR
));
buf
->
buf
=
heap
_realloc
(
buf
->
buf
,
buf
->
size
*
sizeof
(
WCHAR
));
}
}
if
(
buf
->
len
&&
isspaceW
(
buf
->
buf
[
buf
->
len
-
1
]))
{
if
(
buf
->
len
&&
isspaceW
(
buf
->
buf
[
buf
->
len
-
1
]))
{
...
@@ -979,7 +979,7 @@ static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface)
...
@@ -979,7 +979,7 @@ static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface)
nsISelection_Release
(
This
->
nsrange
);
nsISelection_Release
(
This
->
nsrange
);
if
(
This
->
doc
)
if
(
This
->
doc
)
list_remove
(
&
This
->
entry
);
list_remove
(
&
This
->
entry
);
mshtml
_free
(
This
);
heap
_free
(
This
);
}
}
return
ref
;
return
ref
;
...
@@ -1757,7 +1757,7 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
...
@@ -1757,7 +1757,7 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
IHTMLTxtRange
*
HTMLTxtRange_Create
(
HTMLDocument
*
doc
,
nsIDOMRange
*
nsrange
)
IHTMLTxtRange
*
HTMLTxtRange_Create
(
HTMLDocument
*
doc
,
nsIDOMRange
*
nsrange
)
{
{
HTMLTxtRange
*
ret
=
mshtml
_alloc
(
sizeof
(
HTMLTxtRange
));
HTMLTxtRange
*
ret
=
heap
_alloc
(
sizeof
(
HTMLTxtRange
));
ret
->
lpHTMLTxtRangeVtbl
=
&
HTMLTxtRangeVtbl
;
ret
->
lpHTMLTxtRangeVtbl
=
&
HTMLTxtRangeVtbl
;
ret
->
lpOleCommandTargetVtbl
=
&
OleCommandTargetVtbl
;
ret
->
lpOleCommandTargetVtbl
=
&
OleCommandTargetVtbl
;
...
...
dlls/mshtml/view.c
View file @
a084d1db
...
@@ -368,7 +368,7 @@ static LRESULT WINAPI tooltips_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
...
@@ -368,7 +368,7 @@ static LRESULT WINAPI tooltips_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
static
void
create_tooltips_window
(
HTMLDocument
*
This
)
static
void
create_tooltips_window
(
HTMLDocument
*
This
)
{
{
tooltip_data
*
data
=
mshtml
_alloc
(
sizeof
(
*
data
));
tooltip_data
*
data
=
heap
_alloc
(
sizeof
(
*
data
));
This
->
tooltips_hwnd
=
CreateWindowExW
(
0
,
TOOLTIPS_CLASSW
,
NULL
,
TTS_NOPREFIX
|
WS_POPUP
,
This
->
tooltips_hwnd
=
CreateWindowExW
(
0
,
TOOLTIPS_CLASSW
,
NULL
,
TTS_NOPREFIX
|
WS_POPUP
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
10
,
10
,
This
->
hwnd
,
NULL
,
hInst
,
NULL
);
CW_USEDEFAULT
,
CW_USEDEFAULT
,
10
,
10
,
This
->
hwnd
,
NULL
,
hInst
,
NULL
);
...
...
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