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
79f400c0
Commit
79f400c0
authored
Dec 15, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Forward PluginHost's QueryService calls to window object.
parent
94b591cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
4 deletions
+74
-4
pluginhost.c
dlls/mshtml/pluginhost.c
+8
-2
activex.c
dlls/mshtml/tests/activex.c
+66
-2
No files found.
dlls/mshtml/pluginhost.c
View file @
79f400c0
...
...
@@ -1020,8 +1020,14 @@ static HRESULT WINAPI PHServiceProvider_QueryService(IServiceProvider *iface, RE
return
IOleClientSite_QueryInterface
(
&
This
->
IOleClientSite_iface
,
riid
,
ppv
);
}
FIXME
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
TRACE
(
"(%p)->(%s %s %p)
\n
"
,
This
,
debugstr_guid
(
guidService
),
debugstr_guid
(
riid
),
ppv
);
if
(
!
This
->
doc
||
!
This
->
doc
->
basedoc
.
window
)
{
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
return
IServiceProvider_QueryService
(
SERVPROV
(
This
->
doc
->
basedoc
.
window
),
guidService
,
riid
,
ppv
);
}
static
const
IServiceProviderVtbl
ServiceProviderVtbl
=
{
...
...
dlls/mshtml/tests/activex.c
View file @
79f400c0
...
...
@@ -29,7 +29,10 @@
#include "mshtml.h"
#include "docobj.h"
#include "hlink.h"
#include "dispex.h"
#include "mshtmhst.h"
#include "activscp.h"
#include "objsafe.h"
#include "mshtml_test.h"
#define DEFINE_EXPECT(func) \
...
...
@@ -75,6 +78,7 @@ DEFINE_EXPECT(InPlaceObject_GetWindow);
DEFINE_EXPECT
(
SetObjectRects
);
DEFINE_EXPECT
(
InPlaceDeactivate
);
DEFINE_EXPECT
(
UIDeactivate
);
DEFINE_EXPECT
(
QueryService_TestActiveX
);
static
HWND
container_hwnd
,
plugin_hwnd
;
...
...
@@ -471,7 +475,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
hres
=
IOleClientSite_QueryInterface
(
client_site
,
&
IID_IServiceProvider
,
(
void
**
)
&
sp
);
ok
(
hres
==
S_OK
,
"Could not get IServiceProvider iface: %08x
\n
"
,
hres
);
hres
=
IServiceProvider_QueryService
(
sp
,
&
IID_IBindHost
,
&
SID_S
BindHost
,
(
void
**
)
&
bind_host2
);
hres
=
IServiceProvider_QueryService
(
sp
,
&
SID_SBindHost
,
&
IID_I
BindHost
,
(
void
**
)
&
bind_host2
);
ok
(
hres
==
S_OK
,
"QueryService(SID_SBindHost) failed: %08x
\n
"
,
hres
);
IServiceProvider_Release
(
sp
);
...
...
@@ -1166,9 +1170,11 @@ static IClassFactory activex_cf = { &ClassFactoryVtbl };
static
void
test_container
(
IHTMLDocument2
*
doc_obj
)
{
IHTMLWindow2
*
parent_window
;
IHTMLWindow2
*
parent_window
,
*
html_window
;
IServiceProvider
*
serv_prov
;
IOleContainer
*
container
;
IHTMLDocument2
*
doc
;
IUnknown
*
unk
;
HRESULT
hres
;
container
=
NULL
;
...
...
@@ -1186,6 +1192,23 @@ static void test_container(IHTMLDocument2 *doc_obj)
ok
(
iface_cmp
((
IUnknown
*
)
doc
,
(
IUnknown
*
)
container
),
"container != doc
\n
"
);
IHTMLDocument2_Release
(
doc
);
hres
=
IOleClientSite_QueryInterface
(
client_site
,
&
IID_IServiceProvider
,
(
void
**
)
&
serv_prov
);
ok
(
hres
==
S_OK
,
"Could not get IServiceProvider iface: %08x
\n
"
,
hres
);
hres
=
IServiceProvider_QueryService
(
serv_prov
,
&
IID_IHTMLWindow2
,
&
IID_IHTMLWindow2
,
(
void
**
)
&
html_window
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLWindow2 service: %08x
\n
"
,
hres
);
todo_wine
ok
(
!
iface_cmp
((
IUnknown
*
)
html_window
,
(
IUnknown
*
)
parent_window
),
"html_window != parent_window
\n
"
);
IHTMLWindow2_Release
(
html_window
);
SET_EXPECT
(
QueryService_TestActiveX
);
hres
=
IServiceProvider_QueryService
(
serv_prov
,
&
CLSID_TestActiveX
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
,
"QueryService(CLSID_TestActiveX) failed: %08x
\n
"
,
hres
);
ok
(
unk
==
(
IUnknown
*
)
&
OleObject
,
"unexpected unk %p
\n
"
,
unk
);
CHECK_CALLED
(
QueryService_TestActiveX
);
IServiceProvider_Release
(
serv_prov
);
IHTMLWindow2_Release
(
parent_window
);
IOleContainer_Release
(
container
);
}
...
...
@@ -1567,6 +1590,45 @@ static const IOleDocumentSiteVtbl DocumentSiteVtbl = {
static
IOleDocumentSite
DocumentSite
=
{
&
DocumentSiteVtbl
};
static
HRESULT
WINAPI
ServiceProvider_QueryInterface
(
IServiceProvider
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
return
cs_qi
(
riid
,
ppv
);
}
static
ULONG
WINAPI
ServiceProvider_AddRef
(
IServiceProvider
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
ServiceProvider_Release
(
IServiceProvider
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
ServiceProvider_QueryService
(
IServiceProvider
*
iface
,
REFGUID
guidService
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
&
CLSID_TestActiveX
,
guidService
))
{
CHECK_EXPECT
(
QueryService_TestActiveX
);
ok
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
),
"unexpected riid %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
&
OleObject
;
return
S_OK
;
}
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
static
const
IServiceProviderVtbl
ServiceProviderVtbl
=
{
ServiceProvider_QueryInterface
,
ServiceProvider_AddRef
,
ServiceProvider_Release
,
ServiceProvider_QueryService
};
static
IServiceProvider
ServiceProvider
=
{
&
ServiceProviderVtbl
};
static
HRESULT
cs_qi
(
REFIID
riid
,
void
**
ppv
)
{
*
ppv
=
NULL
;
...
...
@@ -1577,6 +1639,8 @@ static HRESULT cs_qi(REFIID riid, void **ppv)
*
ppv
=
&
DocumentSite
;
else
if
(
IsEqualGUID
(
&
IID_IOleWindow
,
riid
)
||
IsEqualGUID
(
&
IID_IOleInPlaceSite
,
riid
))
*
ppv
=
&
InPlaceSite
;
else
if
(
IsEqualGUID
(
riid
,
&
IID_IServiceProvider
))
*
ppv
=
&
ServiceProvider
;
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
...
...
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