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
2412c5f7
Commit
2412c5f7
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 HTMLStyleSheetRulesCollection.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
99d968c0
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 @
2412c5f7
...
...
@@ -59,8 +59,6 @@ struct HTMLStyleSheetRulesCollection {
DispatchEx
dispex
;
IHTMLStyleSheetRulesCollection
IHTMLStyleSheetRulesCollection_iface
;
LONG
ref
;
nsIDOMCSSRuleList
*
nslist
;
};
...
...
@@ -275,7 +273,7 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_QueryInterface(IHTMLStyleShe
*
ppv
=
&
This
->
IHTMLStyleSheetRulesCollection_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLStyleSheetRulesCollection
,
riid
))
{
*
ppv
=
&
This
->
IHTMLStyleSheetRulesCollection_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
;
...
...
@@ -290,7 +288,7 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_QueryInterface(IHTMLStyleShe
static
ULONG
WINAPI
HTMLStyleSheetRulesCollection_AddRef
(
IHTMLStyleSheetRulesCollection
*
iface
)
{
HTMLStyleSheetRulesCollection
*
This
=
impl_from_IHTMLStyleSheetRulesCollection
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -300,13 +298,10 @@ static ULONG WINAPI HTMLStyleSheetRulesCollection_AddRef(IHTMLStyleSheetRulesCol
static
ULONG
WINAPI
HTMLStyleSheetRulesCollection_Release
(
IHTMLStyleSheetRulesCollection
*
iface
)
{
HTMLStyleSheetRulesCollection
*
This
=
impl_from_IHTMLStyleSheetRulesCollection
(
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
;
}
...
...
@@ -399,6 +394,13 @@ static inline HTMLStyleSheetRulesCollection *HTMLStyleSheetRulesCollection_from_
return
CONTAINING_RECORD
(
iface
,
HTMLStyleSheetRulesCollection
,
dispex
);
}
static
void
HTMLStyleSheetRulesCollection_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLStyleSheetRulesCollection
*
This
=
HTMLStyleSheetRulesCollection_from_DispatchEx
(
dispex
);
if
(
This
->
nslist
)
note_cc_edge
((
nsISupports
*
)
This
->
nslist
,
"nslist"
,
cb
);
}
static
void
HTMLStyleSheetRulesCollection_unlink
(
DispatchEx
*
dispex
)
{
HTMLStyleSheetRulesCollection
*
This
=
HTMLStyleSheetRulesCollection_from_DispatchEx
(
dispex
);
...
...
@@ -489,6 +491,7 @@ static HRESULT HTMLStyleSheetRulesCollection_invoke(DispatchEx *dispex, DISPID i
static
const
dispex_static_data_vtbl_t
HTMLStyleSheetRulesCollection_dispex_vtbl
=
{
.
destructor
=
HTMLStyleSheetRulesCollection_destructor
,
.
traverse
=
HTMLStyleSheetRulesCollection_traverse
,
.
unlink
=
HTMLStyleSheetRulesCollection_unlink
,
.
get_dispid
=
HTMLStyleSheetRulesCollection_get_dispid
,
.
get_name
=
HTMLStyleSheetRulesCollection_get_name
,
...
...
@@ -514,7 +517,6 @@ static HRESULT create_style_sheet_rules_collection(nsIDOMCSSRuleList *nslist, co
return
E_OUTOFMEMORY
;
collection
->
IHTMLStyleSheetRulesCollection_iface
.
lpVtbl
=
&
HTMLStyleSheetRulesCollectionVtbl
;
collection
->
ref
=
1
;
collection
->
nslist
=
nslist
;
init_dispatch
(
&
collection
->
dispex
,
(
IUnknown
*
)
&
collection
->
IHTMLStyleSheetRulesCollection_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