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
32d372ed
Commit
32d372ed
authored
Aug 22, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement Cycle Collection for HTMLTextRange.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
98e0cd85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
range.c
dlls/mshtml/range.c
+11
-9
No files found.
dlls/mshtml/range.c
View file @
32d372ed
...
...
@@ -37,8 +37,6 @@ typedef struct {
IHTMLTxtRange
IHTMLTxtRange_iface
;
IOleCommandTarget
IOleCommandTarget_iface
;
LONG
ref
;
nsIDOMRange
*
nsrange
;
HTMLDocumentNode
*
doc
;
...
...
@@ -826,7 +824,7 @@ static HRESULT WINAPI HTMLTxtRange_QueryInterface(IHTMLTxtRange *iface, REFIID r
*
ppv
=
&
This
->
IHTMLTxtRange_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IOleCommandTarget
,
riid
))
{
*
ppv
=
&
This
->
IOleCommandTarget_iface
;
}
else
if
(
dispex_query_interface
_no_cc
(
&
This
->
dispex
,
riid
,
ppv
))
{
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
*
ppv
=
NULL
;
...
...
@@ -841,7 +839,7 @@ static HRESULT WINAPI HTMLTxtRange_QueryInterface(IHTMLTxtRange *iface, REFIID r
static
ULONG
WINAPI
HTMLTxtRange_AddRef
(
IHTMLTxtRange
*
iface
)
{
HTMLTxtRange
*
This
=
impl_from_IHTMLTxtRange
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -851,13 +849,10 @@ static ULONG WINAPI HTMLTxtRange_AddRef(IHTMLTxtRange *iface)
static
ULONG
WINAPI
HTMLTxtRange_Release
(
IHTMLTxtRange
*
iface
)
{
HTMLTxtRange
*
This
=
impl_from_IHTMLTxtRange
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_decr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
release_dispex
(
&
This
->
dispex
);
return
ref
;
}
...
...
@@ -1717,6 +1712,13 @@ static inline HTMLTxtRange *HTMLTxtRange_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLTxtRange
,
dispex
);
}
static
void
HTMLTxtRange_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLTxtRange
*
This
=
HTMLTxtRange_from_DispatchEx
(
dispex
);
if
(
This
->
nsrange
)
note_cc_edge
((
nsISupports
*
)
This
->
nsrange
,
"nsrange"
,
cb
);
}
static
void
HTMLTxtRange_unlink
(
DispatchEx
*
dispex
)
{
HTMLTxtRange
*
This
=
HTMLTxtRange_from_DispatchEx
(
dispex
);
...
...
@@ -1735,6 +1737,7 @@ static void HTMLTxtRange_destructor(DispatchEx *dispex)
static
const
dispex_static_data_vtbl_t
HTMLTxtRange_dispex_vtbl
=
{
.
destructor
=
HTMLTxtRange_destructor
,
.
traverse
=
HTMLTxtRange_traverse
,
.
unlink
=
HTMLTxtRange_unlink
};
...
...
@@ -1762,7 +1765,6 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTx
ret
->
IHTMLTxtRange_iface
.
lpVtbl
=
&
HTMLTxtRangeVtbl
;
ret
->
IOleCommandTarget_iface
.
lpVtbl
=
&
OleCommandTargetVtbl
;
ret
->
ref
=
1
;
if
(
nsrange
)
nsIDOMRange_AddRef
(
nsrange
);
...
...
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