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
56ced91b
Commit
56ced91b
authored
Aug 21, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement Cycle Collection for HTMLStyleSheetRule.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
2412c5f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+11
-9
No files found.
dlls/mshtml/htmlstylesheet.c
View file @
56ced91b
...
...
@@ -66,8 +66,6 @@ struct HTMLStyleSheetRule {
DispatchEx
dispex
;
IHTMLStyleSheetRule
IHTMLStyleSheetRule_iface
;
LONG
ref
;
nsIDOMCSSRule
*
nsstylesheetrule
;
};
...
...
@@ -87,7 +85,7 @@ static HRESULT WINAPI HTMLStyleSheetRule_QueryInterface(IHTMLStyleSheetRule *ifa
*
ppv
=
&
This
->
IHTMLStyleSheetRule_iface
;
else
if
(
IsEqualGUID
(
&
IID_IHTMLStyleSheetRule
,
riid
))
*
ppv
=
&
This
->
IHTMLStyleSheetRule_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
{
...
...
@@ -103,7 +101,7 @@ static HRESULT WINAPI HTMLStyleSheetRule_QueryInterface(IHTMLStyleSheetRule *ifa
static
ULONG
WINAPI
HTMLStyleSheetRule_AddRef
(
IHTMLStyleSheetRule
*
iface
)
{
HTMLStyleSheetRule
*
This
=
impl_from_IHTMLStyleSheetRule
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -113,13 +111,10 @@ static ULONG WINAPI HTMLStyleSheetRule_AddRef(IHTMLStyleSheetRule *iface)
static
ULONG
WINAPI
HTMLStyleSheetRule_Release
(
IHTMLStyleSheetRule
*
iface
)
{
HTMLStyleSheetRule
*
This
=
impl_from_IHTMLStyleSheetRule
(
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
;
}
...
...
@@ -201,6 +196,13 @@ static inline HTMLStyleSheetRule *HTMLStyleSheetRule_from_DispatchEx(DispatchEx
return
CONTAINING_RECORD
(
iface
,
HTMLStyleSheetRule
,
dispex
);
}
static
void
HTMLStyleSheetRule_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLStyleSheetRule
*
This
=
HTMLStyleSheetRule_from_DispatchEx
(
dispex
);
if
(
This
->
nsstylesheetrule
)
note_cc_edge
((
nsISupports
*
)
This
->
nsstylesheetrule
,
"nsstylesheetrule"
,
cb
);
}
static
void
HTMLStyleSheetRule_unlink
(
DispatchEx
*
dispex
)
{
HTMLStyleSheetRule
*
This
=
HTMLStyleSheetRule_from_DispatchEx
(
dispex
);
...
...
@@ -215,6 +217,7 @@ static void HTMLStyleSheetRule_destructor(DispatchEx *dispex)
static
const
dispex_static_data_vtbl_t
HTMLStyleSheetRule_dispex_vtbl
=
{
.
destructor
=
HTMLStyleSheetRule_destructor
,
.
traverse
=
HTMLStyleSheetRule_traverse
,
.
unlink
=
HTMLStyleSheetRule_unlink
};
...
...
@@ -239,7 +242,6 @@ static HRESULT create_style_sheet_rule(nsIDOMCSSRule *nsstylesheetrule, compat_m
return
E_OUTOFMEMORY
;
rule
->
IHTMLStyleSheetRule_iface
.
lpVtbl
=
&
HTMLStyleSheetRuleVtbl
;
rule
->
ref
=
1
;
rule
->
nsstylesheetrule
=
NULL
;
init_dispatch
(
&
rule
->
dispex
,
(
IUnknown
*
)
&
rule
->
IHTMLStyleSheetRule_iface
,
&
HTMLStyleSheetRule_dispex
,
...
...
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