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
10c714b4
Commit
10c714b4
authored
Sep 16, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshmtl: Moved ICustomDoc implementation to HTMLDocumentObj.
parent
2fb0d1e4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
45 deletions
+56
-45
htmldoc.c
dlls/mshtml/htmldoc.c
+49
-3
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
oleobj.c
dlls/mshtml/oleobj.c
+0
-41
dom.c
dlls/mshtml/tests/dom.c
+6
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
10c714b4
...
...
@@ -1682,9 +1682,6 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
}
else
if
(
IsEqualGUID
(
&
IID_IPersistStreamInit
,
riid
))
{
TRACE
(
"(%p)->(IID_IPersistStreamInit %p)
\n
"
,
This
,
ppv
);
*
ppv
=
PERSTRINIT
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_ICustomDoc
,
riid
))
{
TRACE
(
"(%p)->(IID_ICustomDoc %p)
\n
"
,
This
,
ppv
);
*
ppv
=
CUSTOMDOC
(
This
);
}
else
if
(
IsEqualGUID
(
&
DIID_DispHTMLDocument
,
riid
))
{
TRACE
(
"(%p)->(DIID_DispHTMLDocument %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOC
(
This
);
...
...
@@ -1860,6 +1857,46 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
return
S_OK
;
}
/**********************************************************
* ICustomDoc implementation
*/
#define CUSTOMDOC_THIS(iface) DEFINE_THIS(HTMLDocumentObj, CustomDoc, iface)
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
)
...
...
@@ -1869,9 +1906,17 @@ static HRESULT HTMLDocumentObj_QueryInterface(HTMLDocument *base, REFIID riid, v
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
);
}
else
{
FIXME
(
"Unimplemented interface %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
HTMLDocumentObj_AddRef
(
HTMLDocument
*
base
)
...
...
@@ -1952,6 +1997,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
init_doc
(
&
doc
->
basedoc
,
&
HTMLDocumentObjVtbl
);
doc
->
lpCustomDocVtbl
=
&
CustomDocVtbl
;
doc
->
ref
=
1
;
doc
->
basedoc
.
doc_obj
=
doc
;
...
...
dlls/mshtml/mshtml_private.h
View file @
10c714b4
...
...
@@ -274,7 +274,6 @@ struct HTMLDocument {
const
IOleControlVtbl
*
lpOleControlVtbl
;
const
IHlinkTargetVtbl
*
lpHlinkTargetVtbl
;
const
IPersistStreamInitVtbl
*
lpPersistStreamInitVtbl
;
const
ICustomDocVtbl
*
lpCustomDocVtbl
;
const
IDispatchExVtbl
*
lpIDispatchExVtbl
;
const
ISupportErrorInfoVtbl
*
lpSupportErrorInfoVtbl
;
...
...
@@ -308,6 +307,7 @@ static inline ULONG htmldoc_release(HTMLDocument *This)
struct
HTMLDocumentObj
{
HTMLDocument
basedoc
;
const
ICustomDocVtbl
*
lpCustomDocVtbl
;
LONG
ref
;
...
...
dlls/mshtml/oleobj.c
View file @
10c714b4
...
...
@@ -705,46 +705,6 @@ static const IOleControlVtbl OleControlVtbl = {
OleControl_FreezeEvents
};
/**********************************************************
* ICustomDoc implementation
*/
#define CUSTOMDOC_THIS(iface) DEFINE_THIS(HTMLDocument, CustomDoc, iface)
static
HRESULT
WINAPI
CustomDoc_QueryInterface
(
ICustomDoc
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLDocument
*
This
=
CUSTOMDOC_THIS
(
iface
);
return
IHTMLDocument2_QueryInterface
(
HTMLDOC
(
This
),
riid
,
ppv
);
}
static
ULONG
WINAPI
CustomDoc_AddRef
(
ICustomDoc
*
iface
)
{
HTMLDocument
*
This
=
CUSTOMDOC_THIS
(
iface
);
return
IHTMLDocument2_AddRef
(
HTMLDOC
(
This
));
}
static
ULONG
WINAPI
CustomDoc_Release
(
ICustomDoc
*
iface
)
{
HTMLDocument
*
This
=
CUSTOMDOC_THIS
(
iface
);
return
IHTMLDocument_Release
(
HTMLDOC
(
This
));
}
static
HRESULT
WINAPI
CustomDoc_SetUIHandler
(
ICustomDoc
*
iface
,
IDocHostUIHandler
*
pUIHandler
)
{
HTMLDocument
*
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
};
void
HTMLDocument_LockContainer
(
HTMLDocumentObj
*
This
,
BOOL
fLock
)
{
IOleContainer
*
container
;
...
...
@@ -766,5 +726,4 @@ void HTMLDocument_OleObj_Init(HTMLDocument *This)
This
->
lpOleObjectVtbl
=
&
OleObjectVtbl
;
This
->
lpOleDocumentVtbl
=
&
OleDocumentVtbl
;
This
->
lpOleControlVtbl
=
&
OleControlVtbl
;
This
->
lpCustomDocVtbl
=
&
CustomDocVtbl
;
}
dlls/mshtml/tests/dom.c
View file @
10c714b4
...
...
@@ -4095,6 +4095,7 @@ static void test_window(IHTMLDocument2 *doc)
IHTMLWindow2
*
window
,
*
window2
,
*
self
;
IHTMLDocument2
*
doc2
=
NULL
;
IDispatch
*
disp
;
IUnknown
*
unk
;
BSTR
str
;
HRESULT
hres
;
...
...
@@ -4110,6 +4111,11 @@ static void test_window(IHTMLDocument2 *doc)
test_ifaces
((
IUnknown
*
)
doc2
,
doc_node_iids
);
test_ifaces
((
IUnknown
*
)
doc
,
doc_obj_iids
);
unk
=
(
void
*
)
0xdeadbeef
;
hres
=
IHTMLDocument2_QueryInterface
(
doc2
,
&
IID_ICustomDoc
,
(
void
**
)
&
unk
);
ok
(
hres
==
E_NOINTERFACE
,
"QueryInterface(IID_ICustomDoc) returned: %08x
\n
"
,
hres
);
ok
(
!
unk
,
"unk = %p
\n
"
,
unk
);
IHTMLDocument_Release
(
doc2
);
hres
=
IHTMLWindow2_get_window
(
window
,
&
window2
);
...
...
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