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
75f2ae34
Commit
75f2ae34
authored
Sep 15, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Sep 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Unlink document nodes and fragments using the dispex.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
71f0ea7e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
31 deletions
+16
-31
htmldoc.c
dlls/mshtml/htmldoc.c
+16
-24
htmlnode.c
dlls/mshtml/htmlnode.c
+0
-5
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-2
No files found.
dlls/mshtml/htmldoc.c
View file @
75f2ae34
...
...
@@ -5843,26 +5843,12 @@ static HRESULT HTMLDocumentNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HT
return
E_NOTIMPL
;
}
static
void
HTMLDocumentNode_unlink
(
HTMLDOMNode
*
iface
)
{
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
if
(
This
->
dom_document
)
{
release_document_mutation
(
This
);
detach_document_node
(
This
);
This
->
dom_document
=
NULL
;
This
->
html_document
=
NULL
;
This
->
window
=
NULL
;
}
}
static
const
NodeImplVtbl
HTMLDocumentNodeImplVtbl
=
{
.
clsid
=
&
CLSID_HTMLDocument
,
.
qi
=
HTMLDocumentNode_QI
,
.
destructor
=
HTMLDocumentNode_destructor
,
.
cpc_entries
=
HTMLDocumentNode_cpc
,
.
clone
=
HTMLDocumentNode_clone
,
.
unlink
=
HTMLDocumentNode_unlink
};
static
HRESULT
HTMLDocumentFragment_clone
(
HTMLDOMNode
*
iface
,
nsIDOMNode
*
nsnode
,
HTMLDOMNode
**
ret
)
...
...
@@ -5879,11 +5865,23 @@ static HRESULT HTMLDocumentFragment_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode
return
S_OK
;
}
static
void
HTMLDocumentFragment_unlink
(
HTMLDOMNode
*
iface
)
static
inline
HTMLDocumentNode
*
impl_from_DispatchEx
(
DispatchEx
*
iface
)
{
HTMLDocumentNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
return
CONTAINING_RECORD
(
iface
,
HTMLDocumentNode
,
node
.
event_target
.
dispex
);
}
if
(
This
->
window
)
{
static
void
HTMLDocumentNode_unlink
(
DispatchEx
*
dispex
)
{
HTMLDocumentNode
*
This
=
impl_from_DispatchEx
(
dispex
);
HTMLDOMNode_unlink
(
dispex
);
if
(
This
->
dom_document
)
{
release_document_mutation
(
This
);
detach_document_node
(
This
);
This
->
dom_document
=
NULL
;
This
->
html_document
=
NULL
;
This
->
window
=
NULL
;
}
else
if
(
This
->
window
)
{
detach_document_node
(
This
);
/* document fragments own reference to inner window */
...
...
@@ -5892,11 +5890,6 @@ static void HTMLDocumentFragment_unlink(HTMLDOMNode *iface)
}
}
static
inline
HTMLDocumentNode
*
impl_from_DispatchEx
(
DispatchEx
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocumentNode
,
node
.
event_target
.
dispex
);
}
static
HRESULT
HTMLDocumentNode_get_name
(
DispatchEx
*
dispex
,
DISPID
id
,
BSTR
*
name
)
{
HTMLDocumentNode
*
This
=
impl_from_DispatchEx
(
dispex
);
...
...
@@ -6071,7 +6064,7 @@ static const event_target_vtbl_t HTMLDocumentNode_event_target_vtbl = {
.
query_interface
=
HTMLDOMNode_query_interface
,
.
destructor
=
HTMLDOMNode_destructor
,
.
traverse
=
HTMLDOMNode_traverse
,
.
unlink
=
HTMLD
OM
Node_unlink
,
.
unlink
=
HTMLD
ocument
Node_unlink
,
.
get_name
=
HTMLDocumentNode_get_name
,
.
invoke
=
HTMLDocumentNode_invoke
,
.
next_dispid
=
HTMLDocumentNode_next_dispid
,
...
...
@@ -6090,7 +6083,6 @@ static const NodeImplVtbl HTMLDocumentFragmentImplVtbl = {
.
destructor
=
HTMLDocumentNode_destructor
,
.
cpc_entries
=
HTMLDocumentNode_cpc
,
.
clone
=
HTMLDocumentFragment_clone
,
.
unlink
=
HTMLDocumentFragment_unlink
};
static
const
tid_t
HTMLDocumentNode_iface_tids
[]
=
{
...
...
dlls/mshtml/htmlnode.c
View file @
75f2ae34
...
...
@@ -1414,8 +1414,6 @@ void HTMLDOMNode_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCallback
{
HTMLDOMNode
*
This
=
HTMLDOMNode_from_DispatchEx
(
dispex
);
if
(
This
->
vtbl
->
traverse
)
This
->
vtbl
->
traverse
(
This
,
cb
);
if
(
This
->
nsnode
)
note_cc_edge
((
nsISupports
*
)
This
->
nsnode
,
"nsnode"
,
cb
);
if
(
This
->
doc
&&
&
This
->
doc
->
node
!=
This
)
...
...
@@ -1426,9 +1424,6 @@ void HTMLDOMNode_unlink(DispatchEx *dispex)
{
HTMLDOMNode
*
This
=
HTMLDOMNode_from_DispatchEx
(
dispex
);
if
(
This
->
vtbl
->
unlink
)
This
->
vtbl
->
unlink
(
This
);
release_event_target
(
&
This
->
event_target
);
unlink_ref
(
&
This
->
nsnode
);
...
...
dlls/mshtml/mshtml_private.h
View file @
75f2ae34
...
...
@@ -828,8 +828,6 @@ typedef struct {
HRESULT
(
*
get_name
)(
HTMLDOMNode
*
,
DISPID
,
BSTR
*
);
HRESULT
(
*
invoke
)(
HTMLDOMNode
*
,
DISPID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
bind_to_tree
)(
HTMLDOMNode
*
);
void
(
*
traverse
)(
HTMLDOMNode
*
,
nsCycleCollectionTraversalCallback
*
);
void
(
*
unlink
)(
HTMLDOMNode
*
);
BOOL
(
*
is_text_edit
)(
HTMLDOMNode
*
);
BOOL
(
*
is_settable
)(
HTMLDOMNode
*
,
DISPID
);
}
NodeImplVtbl
;
...
...
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