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
14f2d1b1
Commit
14f2d1b1
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: Added OnUIActivation implementation.
parent
05061e26
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
5 deletions
+79
-5
pluginhost.c
dlls/mshtml/pluginhost.c
+34
-3
pluginhost.h
dlls/mshtml/pluginhost.h
+2
-0
activex.c
dlls/mshtml/tests/activex.c
+43
-2
No files found.
dlls/mshtml/pluginhost.c
View file @
14f2d1b1
...
...
@@ -651,8 +651,36 @@ static HRESULT WINAPI PHInPlaceSite_OnInPlaceActivate(IOleInPlaceSiteEx *iface)
static
HRESULT
WINAPI
PHInPlaceSite_OnUIActivate
(
IOleInPlaceSiteEx
*
iface
)
{
PluginHost
*
This
=
impl_from_IOleInPlaceSiteEx
(
iface
);
FIXME
(
"(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
DISPPARAMS
args
=
{
NULL
,
NULL
,
0
,
0
};
IDispatch
*
disp
;
ULONG
err
=
0
;
VARIANT
res
;
HRESULT
hres
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
!
This
->
plugin_unk
)
{
ERR
(
"No plugin object
\n
"
);
return
E_UNEXPECTED
;
}
This
->
ui_active
=
TRUE
;
hres
=
IUnknown_QueryInterface
(
This
->
plugin_unk
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not get IDispatch iface: %08x
\n
"
,
hres
);
return
hres
;
}
V_VT
(
&
res
)
=
VT_EMPTY
;
hres
=
IDispatch_Invoke
(
disp
,
DISPID_ENABLED
,
&
IID_NULL
,
0
/*FIXME*/
,
DISPATCH_PROPERTYGET
,
&
args
,
&
res
,
NULL
,
&
err
);
IDispatch_Release
(
disp
);
if
(
SUCCEEDED
(
hres
))
{
FIXME
(
"Got enabled %s
\n
"
,
debugstr_variant
(
&
res
));
VariantClear
(
&
res
);
}
return
S_OK
;
}
static
HRESULT
WINAPI
PHInPlaceSite_GetWindowContext
(
IOleInPlaceSiteEx
*
iface
,
...
...
@@ -1024,8 +1052,11 @@ void detach_plugin_host(PluginHost *host)
if
(
!
host
->
doc
)
return
;
if
(
host
->
ip_object
)
if
(
host
->
ip_object
)
{
if
(
host
->
ui_active
)
IOleInPlaceObject_UIDeactivate
(
host
->
ip_object
);
IOleInPlaceObject_InPlaceDeactivate
(
host
->
ip_object
);
}
if
(
host
->
plugin_unk
)
{
IOleObject
*
ole_obj
;
...
...
dlls/mshtml/pluginhost.h
View file @
14f2d1b1
...
...
@@ -33,8 +33,10 @@ typedef struct {
IUnknown
*
plugin_unk
;
IOleInPlaceObject
*
ip_object
;
CLSID
clsid
;
HWND
hwnd
;
RECT
rect
;
BOOL
ui_active
;
HTMLDocumentNode
*
doc
;
struct
list
entry
;
...
...
dlls/mshtml/tests/activex.c
View file @
14f2d1b1
...
...
@@ -63,6 +63,8 @@ DEFINE_EXPECT(QuickActivate);
DEFINE_EXPECT
(
IPersistPropertyBag_InitNew
);
DEFINE_EXPECT
(
IPersistPropertyBag_Load
);
DEFINE_EXPECT
(
Invoke_READYSTATE
);
DEFINE_EXPECT
(
Invoke_ENABLED
);
DEFINE_EXPECT
(
Invoke_VALID
);
DEFINE_EXPECT
(
DoVerb
);
DEFINE_EXPECT
(
SetExtent
);
DEFINE_EXPECT
(
GetExtent
);
...
...
@@ -72,6 +74,7 @@ DEFINE_EXPECT(Close);
DEFINE_EXPECT
(
InPlaceObject_GetWindow
);
DEFINE_EXPECT
(
SetObjectRects
);
DEFINE_EXPECT
(
InPlaceDeactivate
);
DEFINE_EXPECT
(
UIDeactivate
);
static
HWND
container_hwnd
,
plugin_hwnd
;
...
...
@@ -572,6 +575,18 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF
V_VT
(
pVarResult
)
=
VT_I4
;
V_I4
(
pVarResult
)
=
plugin_readystate
;
return
S_OK
;
case
DISPID_ENABLED
:
CHECK_EXPECT2
(
Invoke_ENABLED
);
ok
(
wFlags
==
DISPATCH_PROPERTYGET
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
!
pDispParams
->
cArgs
,
"pDispParams->cArgs = %d
\n
"
,
pDispParams
->
cArgs
);
ok
(
!
pDispParams
->
rgvarg
,
"pDispParams->rgvarg != NULL
\n
"
);
return
DISP_E_MEMBERNOTFOUND
;
case
DISPID_VALID
:
CHECK_EXPECT
(
Invoke_VALID
);
ok
(
wFlags
==
DISPATCH_PROPERTYGET
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
!
pDispParams
->
cArgs
,
"pDispParams->cArgs = %d
\n
"
,
pDispParams
->
cArgs
);
ok
(
!
pDispParams
->
rgvarg
,
"pDispParams->rgvarg != NULL
\n
"
);
return
DISP_E_MEMBERNOTFOUND
;
default:
ok
(
0
,
"unexpected call %d
\n
"
,
dispIdMember
);
}
...
...
@@ -1003,8 +1018,8 @@ static HRESULT WINAPI OleInPlaceObject_InPlaceDeactivate(IOleInPlaceObjectWindow
static
HRESULT
WINAPI
OleInPlaceObject_UIDeactivate
(
IOleInPlaceObjectWindowless
*
iface
)
{
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
CHECK_EXPECT2
(
UIDeactivate
);
return
S_OK
;
}
static
HRESULT
WINAPI
OleInPlaceObject_SetObjectRects
(
IOleInPlaceObjectWindowless
*
iface
,
...
...
@@ -1149,6 +1164,22 @@ static const IClassFactoryVtbl ClassFactoryVtbl = {
static
IClassFactory
activex_cf
=
{
&
ClassFactoryVtbl
};
static
void
test_ui_activate
(
void
)
{
IOleInPlaceSite
*
ip_site
;
HRESULT
hres
;
hres
=
IOleClientSite_QueryInterface
(
client_site
,
&
IID_IOleInPlaceSite
,
(
void
**
)
&
ip_site
);
ok
(
hres
==
S_OK
,
"Could not get IOleInPlaceSite iface: %08x
\n
"
,
hres
);
SET_EXPECT
(
Invoke_ENABLED
);
hres
=
IOleInPlaceSite_OnUIActivate
(
ip_site
);
ok
(
hres
==
S_OK
,
"OnUIActivate failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
Invoke_ENABLED
);
IOleInPlaceSite_Release
(
ip_site
);
}
static
HRESULT
cs_qi
(
REFIID
,
void
**
);
static
IOleDocumentView
*
view
;
...
...
@@ -1747,10 +1778,20 @@ static void test_object_ax(void)
CHECK_CALLED
(
InPlaceObject_GetWindow
);
CHECK_CALLED
(
SetObjectRects
);
test_ui_activate
();
SET_EXPECT
(
UIDeactivate
);
SET_EXPECT
(
Invoke_ENABLED
);
SET_EXPECT
(
Invoke_VALID
);
SET_EXPECT
(
InPlaceDeactivate
);
SET_EXPECT
(
Close
);
SET_EXPECT
(
SetClientSite_NULL
);
release_doc
(
doc
);
CHECK_CALLED
(
UIDeactivate
);
todo_wine
CHECK_CALLED
(
Invoke_ENABLED
);
todo_wine
CHECK_CALLED
(
Invoke_VALID
);
CHECK_CALLED
(
InPlaceDeactivate
);
CHECK_CALLED
(
Close
);
CHECK_CALLED
(
SetClientSite_NULL
);
...
...
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