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
af7283de
Commit
af7283de
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 HTMLStyleSheet.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
4ee59922
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 @
af7283de
...
...
@@ -36,8 +36,6 @@ struct HTMLStyleSheet {
IHTMLStyleSheet
IHTMLStyleSheet_iface
;
IHTMLStyleSheet4
IHTMLStyleSheet4_iface
;
LONG
ref
;
nsIDOMCSSStyleSheet
*
nsstylesheet
;
};
...
...
@@ -986,7 +984,7 @@ static HRESULT WINAPI HTMLStyleSheet_QueryInterface(IHTMLStyleSheet *iface, REFI
*
ppv
=
&
This
->
IHTMLStyleSheet_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLStyleSheet4
,
riid
))
{
*
ppv
=
&
This
->
IHTMLStyleSheet4_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
;
...
...
@@ -1001,7 +999,7 @@ static HRESULT WINAPI HTMLStyleSheet_QueryInterface(IHTMLStyleSheet *iface, REFI
static
ULONG
WINAPI
HTMLStyleSheet_AddRef
(
IHTMLStyleSheet
*
iface
)
{
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -1011,13 +1009,10 @@ static ULONG WINAPI HTMLStyleSheet_AddRef(IHTMLStyleSheet *iface)
static
ULONG
WINAPI
HTMLStyleSheet_Release
(
IHTMLStyleSheet
*
iface
)
{
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
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
;
}
...
...
@@ -1499,6 +1494,13 @@ static inline HTMLStyleSheet *HTMLStyleSheet_from_DispatchEx(DispatchEx *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLStyleSheet
,
dispex
);
}
static
void
HTMLStyleSheet_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLStyleSheet
*
This
=
HTMLStyleSheet_from_DispatchEx
(
dispex
);
if
(
This
->
nsstylesheet
)
note_cc_edge
((
nsISupports
*
)
This
->
nsstylesheet
,
"nsstylesheet"
,
cb
);
}
static
void
HTMLStyleSheet_unlink
(
DispatchEx
*
dispex
)
{
HTMLStyleSheet
*
This
=
HTMLStyleSheet_from_DispatchEx
(
dispex
);
...
...
@@ -1519,6 +1521,7 @@ static void HTMLStyleSheet_init_dispex_info(dispex_data_t *info, compat_mode_t m
static
const
dispex_static_data_vtbl_t
HTMLStyleSheet_dispex_vtbl
=
{
.
destructor
=
HTMLStyleSheet_destructor
,
.
traverse
=
HTMLStyleSheet_traverse
,
.
unlink
=
HTMLStyleSheet_unlink
};
...
...
@@ -1544,7 +1547,6 @@ HRESULT create_style_sheet(nsIDOMStyleSheet *nsstylesheet, compat_mode_t compat_
style_sheet
->
IHTMLStyleSheet_iface
.
lpVtbl
=
&
HTMLStyleSheetVtbl
;
style_sheet
->
IHTMLStyleSheet4_iface
.
lpVtbl
=
&
HTMLStyleSheet4Vtbl
;
style_sheet
->
ref
=
1
;
style_sheet
->
nsstylesheet
=
NULL
;
init_dispatch
(
&
style_sheet
->
dispex
,
(
IUnknown
*
)
&
style_sheet
->
IHTMLStyleSheet_iface
,
...
...
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