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
e7d5c06b
Commit
e7d5c06b
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 HTMLRect.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
06b08c40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
htmlelem.c
dlls/mshtml/htmlelem.c
+11
-9
No files found.
dlls/mshtml/htmlelem.c
View file @
e7d5c06b
...
...
@@ -529,8 +529,6 @@ typedef struct {
IHTMLRect
IHTMLRect_iface
;
IHTMLRect2
IHTMLRect2_iface
;
LONG
ref
;
nsIDOMClientRect
*
nsrect
;
}
HTMLRect
;
...
...
@@ -551,7 +549,7 @@ static HRESULT WINAPI HTMLRect_QueryInterface(IHTMLRect *iface, REFIID riid, voi
*
ppv
=
&
This
->
IHTMLRect_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLRect2
,
riid
))
{
*
ppv
=
&
This
->
IHTMLRect2_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
{
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
...
...
@@ -566,7 +564,7 @@ static HRESULT WINAPI HTMLRect_QueryInterface(IHTMLRect *iface, REFIID riid, voi
static
ULONG
WINAPI
HTMLRect_AddRef
(
IHTMLRect
*
iface
)
{
HTMLRect
*
This
=
impl_from_IHTMLRect
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -576,13 +574,10 @@ static ULONG WINAPI HTMLRect_AddRef(IHTMLRect *iface)
static
ULONG
WINAPI
HTMLRect_Release
(
IHTMLRect
*
iface
)
{
HTMLRect
*
This
=
impl_from_IHTMLRect
(
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
;
}
...
...
@@ -840,6 +835,13 @@ static inline HTMLRect *HTMLRect_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLRect
,
dispex
);
}
static
void
HTMLRect_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLRect
*
This
=
HTMLRect_from_DispatchEx
(
dispex
);
if
(
This
->
nsrect
)
note_cc_edge
((
nsISupports
*
)
This
->
nsrect
,
"nsrect"
,
cb
);
}
static
void
HTMLRect_unlink
(
DispatchEx
*
dispex
)
{
HTMLRect
*
This
=
HTMLRect_from_DispatchEx
(
dispex
);
...
...
@@ -860,6 +862,7 @@ void HTMLRect_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
static
const
dispex_static_data_vtbl_t
HTMLRect_dispex_vtbl
=
{
.
destructor
=
HTMLRect_destructor
,
.
traverse
=
HTMLRect_traverse
,
.
unlink
=
HTMLRect_unlink
};
...
...
@@ -885,7 +888,6 @@ static HRESULT create_html_rect(nsIDOMClientRect *nsrect, compat_mode_t compat_m
rect
->
IHTMLRect_iface
.
lpVtbl
=
&
HTMLRectVtbl
;
rect
->
IHTMLRect2_iface
.
lpVtbl
=
&
HTMLRect2Vtbl
;
rect
->
ref
=
1
;
init_dispatch
(
&
rect
->
dispex
,
(
IUnknown
*
)
&
rect
->
IHTMLRect_iface
,
&
HTMLRect_dispex
,
compat_mode
);
...
...
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