mshtml: Use unlink and destructor in the vtbl for HTMLScreen.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
5a687bb49c
commit
94c85bf9bf
1 changed files with 17 additions and 4 deletions
|
@ -418,10 +418,8 @@ static ULONG WINAPI HTMLScreen_Release(IHTMLScreen *iface)
|
||||||
|
|
||||||
TRACE("(%p) ref=%ld\n", This, ref);
|
TRACE("(%p) ref=%ld\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref)
|
||||||
release_dispex(&This->dispex);
|
release_dispex(&This->dispex);
|
||||||
free(This);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
@ -571,13 +569,28 @@ static const IHTMLScreenVtbl HTMLSreenVtbl = {
|
||||||
HTMLScreen_get_fontSmoothingEnabled
|
HTMLScreen_get_fontSmoothingEnabled
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline HTMLScreen *HTMLScreen_from_DispatchEx(DispatchEx *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLScreen, dispex);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTMLScreen_destructor(DispatchEx *dispex)
|
||||||
|
{
|
||||||
|
HTMLScreen *This = HTMLScreen_from_DispatchEx(dispex);
|
||||||
|
free(This);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const dispex_static_data_vtbl_t HTMLScreen_dispex_vtbl = {
|
||||||
|
HTMLScreen_destructor,
|
||||||
|
};
|
||||||
|
|
||||||
static const tid_t HTMLScreen_iface_tids[] = {
|
static const tid_t HTMLScreen_iface_tids[] = {
|
||||||
IHTMLScreen_tid,
|
IHTMLScreen_tid,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
static dispex_static_data_t HTMLScreen_dispex = {
|
static dispex_static_data_t HTMLScreen_dispex = {
|
||||||
L"Screen",
|
L"Screen",
|
||||||
NULL,
|
&HTMLScreen_dispex_vtbl,
|
||||||
DispHTMLScreen_tid,
|
DispHTMLScreen_tid,
|
||||||
HTMLScreen_iface_tids
|
HTMLScreen_iface_tids
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue