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
f2c4a122
Commit
f2c4a122
authored
Jan 03, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: COM cleanup for the ICustomDoc iface.
parent
7cd11df8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
htmldoc.c
dlls/mshtml/htmldoc.c
+13
-12
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-3
No files found.
dlls/mshtml/htmldoc.c
View file @
f2c4a122
...
...
@@ -2054,18 +2054,21 @@ HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node,
* ICustomDoc implementation
*/
#define CUSTOMDOC_THIS(iface) DEFINE_THIS(HTMLDocumentObj, CustomDoc, iface)
static
inline
HTMLDocumentObj
*
impl_from_ICustomDoc
(
ICustomDoc
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocumentObj
,
ICustomDoc_iface
);
}
static
HRESULT
WINAPI
CustomDoc_QueryInterface
(
ICustomDoc
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
HTMLDocumentObj
*
This
=
impl_from_ICustomDoc
(
iface
);
if
(
htmldoc_qi
(
&
This
->
basedoc
,
riid
,
ppv
))
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
if
(
IsEqualGUID
(
&
IID_ICustomDoc
,
riid
))
{
TRACE
(
"(%p)->(IID_ICustomDoc %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CUSTOMDOC
(
This
)
;
*
ppv
=
&
This
->
ICustomDoc_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
...
...
@@ -2080,7 +2083,7 @@ static HRESULT WINAPI CustomDoc_QueryInterface(ICustomDoc *iface, REFIID riid, v
static
ULONG
WINAPI
CustomDoc_AddRef
(
ICustomDoc
*
iface
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
HTMLDocumentObj
*
This
=
impl_from_ICustomDoc
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
...
...
@@ -2090,7 +2093,7 @@ static ULONG WINAPI CustomDoc_AddRef(ICustomDoc *iface)
static
ULONG
WINAPI
CustomDoc_Release
(
ICustomDoc
*
iface
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
HTMLDocumentObj
*
This
=
impl_from_ICustomDoc
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %u
\n
"
,
This
,
ref
);
...
...
@@ -2112,7 +2115,7 @@ static ULONG WINAPI CustomDoc_Release(ICustomDoc *iface)
if
(
This
->
client
)
IOleObject_SetClientSite
(
&
This
->
basedoc
.
IOleObject_iface
,
NULL
);
if
(
This
->
hostui
)
ICustomDoc_SetUIHandler
(
CUSTOMDOC
(
This
)
,
NULL
);
ICustomDoc_SetUIHandler
(
&
This
->
ICustomDoc_iface
,
NULL
);
if
(
This
->
in_place_active
)
IOleInPlaceObjectWindowless_InPlaceDeactivate
(
&
This
->
basedoc
.
IOleInPlaceObjectWindowless_iface
);
if
(
This
->
ipsite
)
...
...
@@ -2139,7 +2142,7 @@ static ULONG WINAPI CustomDoc_Release(ICustomDoc *iface)
static
HRESULT
WINAPI
CustomDoc_SetUIHandler
(
ICustomDoc
*
iface
,
IDocHostUIHandler
*
pUIHandler
)
{
HTMLDocumentObj
*
This
=
CUSTOMDOC_THIS
(
iface
);
HTMLDocumentObj
*
This
=
impl_from_ICustomDoc
(
iface
);
IOleCommandTarget
*
cmdtrg
;
HRESULT
hres
;
...
...
@@ -2167,8 +2170,6 @@ static HRESULT WINAPI CustomDoc_SetUIHandler(ICustomDoc *iface, IDocHostUIHandle
return
S_OK
;
}
#undef CUSTOMDOC_THIS
static
const
ICustomDocVtbl
CustomDocVtbl
=
{
CustomDoc_QueryInterface
,
CustomDoc_AddRef
,
...
...
@@ -2203,10 +2204,10 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
if
(
!
doc
)
return
E_OUTOFMEMORY
;
init_dispex
(
&
doc
->
dispex
,
(
IUnknown
*
)
CUSTOMDOC
(
doc
)
,
&
HTMLDocumentObj_dispex
);
init_doc
(
&
doc
->
basedoc
,
(
IUnknown
*
)
CUSTOMDOC
(
doc
)
,
&
doc
->
dispex
.
IDispatchEx_iface
);
init_dispex
(
&
doc
->
dispex
,
(
IUnknown
*
)
&
doc
->
ICustomDoc_iface
,
&
HTMLDocumentObj_dispex
);
init_doc
(
&
doc
->
basedoc
,
(
IUnknown
*
)
&
doc
->
ICustomDoc_iface
,
&
doc
->
dispex
.
IDispatchEx_iface
);
doc
->
lpCustomDoc
Vtbl
=
&
CustomDocVtbl
;
doc
->
ICustomDoc_iface
.
lp
Vtbl
=
&
CustomDocVtbl
;
doc
->
ref
=
1
;
doc
->
basedoc
.
doc_obj
=
doc
;
...
...
dlls/mshtml/mshtml_private.h
View file @
f2c4a122
...
...
@@ -406,7 +406,7 @@ static inline ULONG htmldoc_release(HTMLDocument *This)
struct
HTMLDocumentObj
{
HTMLDocument
basedoc
;
DispatchEx
dispex
;
const
ICustomDocVtbl
*
lpCustomDocVtbl
;
ICustomDoc
ICustomDoc_iface
;
LONG
ref
;
...
...
@@ -624,8 +624,6 @@ struct HTMLDocumentNode {
struct
list
plugin_hosts
;
};
#define CUSTOMDOC(x) ((ICustomDoc*) &(x)->lpCustomDocVtbl)
#define NSEVENTLIST(x) ((nsIDOMEventListener*) &(x)->lpDOMEventListenerVtbl)
#define HTTPNEG(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl)
...
...
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