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
52cc865c
Commit
52cc865c
authored
Dec 13, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Deactivate plugin when detaching from document.
parent
c65f4c49
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
9 deletions
+34
-9
htmldoc.c
dlls/mshtml/htmldoc.c
+3
-1
htmlobject.c
dlls/mshtml/htmlobject.c
+1
-1
npplugin.c
dlls/mshtml/npplugin.c
+1
-0
pluginhost.c
dlls/mshtml/pluginhost.c
+28
-6
pluginhost.h
dlls/mshtml/pluginhost.h
+1
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
52cc865c
...
...
@@ -1898,9 +1898,11 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface)
detach_selection
(
This
);
detach_ranges
(
This
);
detach_plugin_hosts
(
This
);
release_nodes
(
This
);
while
(
!
list_empty
(
&
This
->
plugin_hosts
))
detach_plugin_host
(
LIST_ENTRY
(
list_head
(
&
This
->
plugin_hosts
),
PluginHost
,
entry
));
if
(
This
->
nsdoc
)
{
release_mutation
(
This
);
nsIDOMHTMLDocument_Release
(
This
->
nsdoc
);
...
...
dlls/mshtml/htmlobject.c
View file @
52cc865c
...
...
@@ -423,7 +423,7 @@ static void HTMLObjectElement_destructor(HTMLDOMNode *iface)
HTMLObjectElement
*
This
=
HTMLOBJECT_NODE_THIS
(
iface
);
if
(
This
->
plugin_container
.
plugin_host
)
This
->
plugin_container
.
plugin_host
->
element
=
NULL
;
detach_plugin_host
(
This
->
plugin_container
.
plugin_host
)
;
if
(
This
->
nsobject
)
nsIDOMHTMLObjectElement_Release
(
This
->
nsobject
);
...
...
dlls/mshtml/npplugin.c
View file @
52cc865c
...
...
@@ -296,6 +296,7 @@ static NPError CDECL NPP_Destroy(NPP instance, NPSavedData **save)
if
(
!
host
)
return
NPERR_GENERIC_ERROR
;
detach_plugin_host
(
host
);
IOleClientSite_Release
(
&
host
->
IOleClientSite_iface
);
instance
->
pdata
=
NULL
;
return
NPERR_NO_ERROR
;
...
...
dlls/mshtml/pluginhost.c
View file @
52cc865c
...
...
@@ -954,15 +954,37 @@ static HRESULT assoc_element(PluginHost *host, HTMLDocumentNode *doc, nsIDOMElem
return
S_OK
;
}
void
detach_plugin_host
s
(
HTMLDocumentNode
*
doc
)
void
detach_plugin_host
(
PluginHost
*
host
)
{
PluginHost
*
iter
;
HRESULT
hres
;
TRACE
(
"%p
\n
"
,
host
);
if
(
!
host
->
doc
)
return
;
if
(
host
->
ip_object
)
IOleInPlaceObject_InPlaceDeactivate
(
host
->
ip_object
);
while
(
!
list_empty
(
&
doc
->
plugin_hosts
))
{
iter
=
LIST_ENTRY
(
list_head
(
&
doc
->
plugin_hosts
),
PluginHost
,
entry
);
list_remove
(
&
iter
->
entry
);
iter
->
doc
=
NULL
;
if
(
host
->
plugin_unk
)
{
IOleObject
*
ole_obj
;
hres
=
IUnknown_QueryInterface
(
host
->
plugin_unk
,
&
IID_IOleObject
,
(
void
**
)
&
ole_obj
);
if
(
SUCCEEDED
(
hres
))
{
if
(
!
host
->
ip_object
)
IOleObject_Close
(
ole_obj
,
OLECLOSE_NOSAVE
);
IOleObject_SetClientSite
(
ole_obj
,
NULL
);
IOleObject_Release
(
ole_obj
);
}
}
if
(
host
->
element
)
{
host
->
element
->
plugin_host
=
NULL
;
host
->
element
=
NULL
;
}
list_remove
(
&
host
->
entry
);
host
->
doc
=
NULL
;
}
HRESULT
create_plugin_host
(
HTMLDocumentNode
*
doc
,
nsIDOMElement
*
nselem
,
IUnknown
*
unk
,
const
CLSID
*
clsid
,
PluginHost
**
ret
)
...
...
dlls/mshtml/pluginhost.h
View file @
52cc865c
...
...
@@ -52,6 +52,6 @@ extern const IID IID_HTMLPluginContainer;
HRESULT
create_plugin_host
(
HTMLDocumentNode
*
,
nsIDOMElement
*
,
IUnknown
*
,
const
CLSID
*
,
PluginHost
**
);
void
update_plugin_window
(
PluginHost
*
,
HWND
,
const
RECT
*
);
void
detach_plugin_host
s
(
HTMLDocumentNode
*
);
void
detach_plugin_host
(
PluginHost
*
);
HRESULT
create_param_prop_bag
(
nsIDOMHTMLElement
*
,
IPropertyBag
**
);
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