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
f750bc40
Commit
f750bc40
authored
Sep 16, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Get rid of htmldoc_vtbl_t.
parent
10c714b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
90 deletions
+27
-90
htmldoc.c
dlls/mshtml/htmldoc.c
+22
-80
mshtml_private.h
dlls/mshtml/mshtml_private.h
+5
-10
No files found.
dlls/mshtml/htmldoc.c
View file @
f750bc40
...
...
@@ -1728,13 +1728,14 @@ static dispex_static_data_t HTMLDocument_dispex = {
HTMLDocument_iface_tids
};
static
void
init_doc
(
HTMLDocument
*
doc
,
const
htmldoc_vtbl_t
*
vtb
l
)
static
void
init_doc
(
HTMLDocument
*
doc
,
IUnknown
*
unk_imp
l
)
{
doc
->
vtbl
=
vtbl
;
doc
->
lpHTMLDocument2Vtbl
=
&
HTMLDocumentVtbl
;
doc
->
lpIDispatchExVtbl
=
&
DocDispatchExVtbl
;
doc
->
lpSupportErrorInfoVtbl
=
&
SupportErrorInfoVtbl
;
doc
->
unk_impl
=
unk_impl
;
HTMLDocument_HTMLDocument3_Init
(
doc
);
HTMLDocument_HTMLDocument5_Init
(
doc
);
HTMLDocument_Persist_Init
(
doc
);
...
...
@@ -1768,37 +1769,6 @@ static void destroy_htmldoc(HTMLDocument *This)
nsIDOMHTMLDocument_Release
(
This
->
nsdoc
);
}
#define HTMLDOCNODE_THIS(base) DEFINE_THIS2(HTMLDocumentNode, basedoc, base)
static
HRESULT
HTMLDocumentNode_QueryInterface
(
HTMLDocument
*
base
,
REFIID
riid
,
void
**
ppv
)
{
HTMLDocumentNode
*
This
=
HTMLDOCNODE_THIS
(
base
);
return
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
&
This
->
node
),
riid
,
ppv
);
}
static
ULONG
HTMLDocumentNode_AddRef
(
HTMLDocument
*
base
)
{
HTMLDocumentNode
*
This
=
HTMLDOCNODE_THIS
(
base
);
return
IHTMLDOMNode_AddRef
(
HTMLDOMNODE
(
&
This
->
node
));
}
static
ULONG
HTMLDocumentNode_Release
(
HTMLDocument
*
base
)
{
HTMLDocumentNode
*
This
=
HTMLDOCNODE_THIS
(
base
);
return
IHTMLDOMNode_Release
(
HTMLDOMNODE
(
&
This
->
node
));
}
#undef HTMLDOCNODE_THIS
static
const
htmldoc_vtbl_t
HTMLDocumentNodeVtbl
=
{
HTMLDocumentNode_QueryInterface
,
HTMLDocumentNode_AddRef
,
HTMLDocumentNode_Release
};
#define HTMLDOCNODE_NODE_THIS(iface) DEFINE_THIS2(HTMLDocumentNode, node, iface)
static
HRESULT
HTMLDocumentNode_QI
(
HTMLDOMNode
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -1839,7 +1809,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
doc
->
basedoc
.
doc_node
=
doc
;
doc
->
basedoc
.
doc_obj
=
doc_obj
;
init_doc
(
&
doc
->
basedoc
,
&
HTMLDocumentNodeVtbl
);
init_doc
(
&
doc
->
basedoc
,
(
IUnknown
*
)
HTMLDOMNODE
(
&
doc
->
node
)
);
doc
->
ref
=
1
;
nsIDOMHTMLDocument_AddRef
(
nsdoc
);
...
...
@@ -1866,42 +1836,6 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
static
HRESULT
WINAPI
CustomDoc_QueryInterface
(
ICustomDoc
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
return
IHTMLDocument2_QueryInterface
(
HTMLDOC
(
&
This
->
basedoc
),
riid
,
ppv
);
}
static
ULONG
WINAPI
CustomDoc_AddRef
(
ICustomDoc
*
iface
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
return
IHTMLDocument2_AddRef
(
HTMLDOC
(
&
This
->
basedoc
));
}
static
ULONG
WINAPI
CustomDoc_Release
(
ICustomDoc
*
iface
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
return
IHTMLDocument_Release
(
HTMLDOC
(
&
This
->
basedoc
));
}
static
HRESULT
WINAPI
CustomDoc_SetUIHandler
(
ICustomDoc
*
iface
,
IDocHostUIHandler
*
pUIHandler
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pUIHandler
);
return
E_NOTIMPL
;
}
#undef CUSTOMDOC_THIS
static
const
ICustomDocVtbl
CustomDocVtbl
=
{
CustomDoc_QueryInterface
,
CustomDoc_AddRef
,
CustomDoc_Release
,
CustomDoc_SetUIHandler
};
#define HTMLDOCOBJ_THIS(base) DEFINE_THIS2(HTMLDocumentObj, basedoc, base)
static
HRESULT
HTMLDocumentObj_QueryInterface
(
HTMLDocument
*
base
,
REFIID
riid
,
void
**
ppv
)
{
HTMLDocumentObj
*
This
=
HTMLDOCOBJ_THIS
(
base
);
if
(
htmldoc_qi
(
&
This
->
basedoc
,
riid
,
ppv
))
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
...
...
@@ -1919,9 +1853,9 @@ static HRESULT HTMLDocumentObj_QueryInterface(HTMLDocument *base, REFIID riid, v
return
S_OK
;
}
static
ULONG
HTMLDocumentObj_AddRef
(
HTMLDocument
*
bas
e
)
static
ULONG
WINAPI
CustomDoc_AddRef
(
ICustomDoc
*
ifac
e
)
{
HTMLDocumentObj
*
This
=
HTMLDOCOBJ_THIS
(
bas
e
);
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
ifac
e
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
...
...
@@ -1929,9 +1863,9 @@ static ULONG HTMLDocumentObj_AddRef(HTMLDocument *base)
return
ref
;
}
static
ULONG
HTMLDocumentObj_Release
(
HTMLDocument
*
bas
e
)
static
ULONG
WINAPI
CustomDoc_Release
(
ICustomDoc
*
ifac
e
)
{
HTMLDocumentObj
*
This
=
HTMLDOCOBJ_THIS
(
bas
e
);
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
ifac
e
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
...
...
@@ -1975,12 +1909,20 @@ static ULONG HTMLDocumentObj_Release(HTMLDocument *base)
return
ref
;
}
#undef HTMLDOCOBJ_THIS
static
HRESULT
WINAPI
CustomDoc_SetUIHandler
(
ICustomDoc
*
iface
,
IDocHostUIHandler
*
pUIHandler
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pUIHandler
);
return
E_NOTIMPL
;
}
#undef CUSTOMDOC_THIS
static
const
htmldoc_vtbl_t
HTMLDocumentObjVtbl
=
{
HTMLDocumentObj_QueryInterface
,
HTMLDocumentObj_AddRef
,
HTMLDocumentObj_Release
static
const
ICustomDocVtbl
CustomDocVtbl
=
{
CustomDoc_QueryInterface
,
CustomDoc_AddRef
,
CustomDoc_Release
,
CustomDoc_SetUIHandler
};
HRESULT
HTMLDocument_Create
(
IUnknown
*
pUnkOuter
,
REFIID
riid
,
void
**
ppvObject
)
...
...
@@ -1995,7 +1937,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
if
(
!
doc
)
return
E_OUTOFMEMORY
;
init_doc
(
&
doc
->
basedoc
,
&
HTMLDocumentObjVtbl
);
init_doc
(
&
doc
->
basedoc
,
(
IUnknown
*
)
CUSTOMDOC
(
doc
)
);
doc
->
lpCustomDocVtbl
=
&
CustomDocVtbl
;
doc
->
ref
=
1
;
...
...
dlls/mshtml/mshtml_private.h
View file @
f750bc40
...
...
@@ -246,15 +246,8 @@ struct ConnectionPoint {
ConnectionPoint
*
next
;
};
typedef
struct
{
HRESULT
(
*
query_interface
)(
HTMLDocument
*
,
REFIID
,
void
**
);
ULONG
(
*
addref
)(
HTMLDocument
*
);
ULONG
(
*
release
)(
HTMLDocument
*
);
}
htmldoc_vtbl_t
;
struct
HTMLDocument
{
DispatchEx
dispex
;
const
htmldoc_vtbl_t
*
vtbl
;
const
IHTMLDocument2Vtbl
*
lpHTMLDocument2Vtbl
;
const
IHTMLDocument3Vtbl
*
lpHTMLDocument3Vtbl
;
const
IHTMLDocument4Vtbl
*
lpHTMLDocument4Vtbl
;
...
...
@@ -277,6 +270,8 @@ struct HTMLDocument {
const
IDispatchExVtbl
*
lpIDispatchExVtbl
;
const
ISupportErrorInfoVtbl
*
lpSupportErrorInfoVtbl
;
IUnknown
*
unk_impl
;
HTMLDocumentObj
*
doc_obj
;
HTMLDocumentNode
*
doc_node
;
...
...
@@ -292,17 +287,17 @@ struct HTMLDocument {
static
inline
HRESULT
htmldoc_query_interface
(
HTMLDocument
*
This
,
REFIID
riid
,
void
**
ppv
)
{
return
This
->
vtbl
->
query_interface
(
This
,
riid
,
ppv
);
return
IUnknown_QueryInterface
(
This
->
unk_impl
,
riid
,
ppv
);
}
static
inline
ULONG
htmldoc_addref
(
HTMLDocument
*
This
)
{
return
This
->
vtbl
->
addref
(
This
);
return
IUnknown_AddRef
(
This
->
unk_impl
);
}
static
inline
ULONG
htmldoc_release
(
HTMLDocument
*
This
)
{
return
This
->
vtbl
->
release
(
This
);
return
IUnknown_Release
(
This
->
unk_impl
);
}
struct
HTMLDocumentObj
{
...
...
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