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
2ee74c59
Commit
2ee74c59
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 HTMLAttributeCollection.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
4b2bcdb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
htmlelem.c
dlls/mshtml/htmlelem.c
+14
-7
mshtml_private.h
dlls/mshtml/mshtml_private.h
+0
-2
No files found.
dlls/mshtml/htmlelem.c
View file @
2ee74c59
...
...
@@ -8549,7 +8549,7 @@ static HRESULT WINAPI HTMLAttributeCollection_QueryInterface(IHTMLAttributeColle
*
ppv
=
&
This
->
IHTMLAttributeCollection2_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLAttributeCollection3
,
riid
))
{
*
ppv
=
&
This
->
IHTMLAttributeCollection3_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
;
...
...
@@ -8564,7 +8564,7 @@ static HRESULT WINAPI HTMLAttributeCollection_QueryInterface(IHTMLAttributeColle
static
ULONG
WINAPI
HTMLAttributeCollection_AddRef
(
IHTMLAttributeCollection
*
iface
)
{
HTMLAttributeCollection
*
This
=
impl_from_IHTMLAttributeCollection
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
LONG
ref
=
dispex_ref_incr
(
&
This
->
dispex
);
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
...
...
@@ -8574,13 +8574,10 @@ static ULONG WINAPI HTMLAttributeCollection_AddRef(IHTMLAttributeCollection *ifa
static
ULONG
WINAPI
HTMLAttributeCollection_Release
(
IHTMLAttributeCollection
*
iface
)
{
HTMLAttributeCollection
*
This
=
impl_from_IHTMLAttributeCollection
(
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
;
}
...
...
@@ -8928,6 +8925,15 @@ static inline HTMLAttributeCollection *HTMLAttributeCollection_from_DispatchEx(D
return
CONTAINING_RECORD
(
iface
,
HTMLAttributeCollection
,
dispex
);
}
static
void
HTMLAttributeCollection_traverse
(
DispatchEx
*
dispex
,
nsCycleCollectionTraversalCallback
*
cb
)
{
HTMLAttributeCollection
*
This
=
HTMLAttributeCollection_from_DispatchEx
(
dispex
);
HTMLDOMAttribute
*
attr
;
LIST_FOR_EACH_ENTRY
(
attr
,
&
This
->
attrs
,
HTMLDOMAttribute
,
entry
)
note_cc_edge
((
nsISupports
*
)
&
attr
->
IHTMLDOMAttribute_iface
,
"attr"
,
cb
);
}
static
void
HTMLAttributeCollection_unlink
(
DispatchEx
*
dispex
)
{
HTMLAttributeCollection
*
This
=
HTMLAttributeCollection_from_DispatchEx
(
dispex
);
...
...
@@ -9013,6 +9019,7 @@ static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCI
static
const
dispex_static_data_vtbl_t
HTMLAttributeCollection_dispex_vtbl
=
{
.
destructor
=
HTMLAttributeCollection_destructor
,
.
traverse
=
HTMLAttributeCollection_traverse
,
.
unlink
=
HTMLAttributeCollection_unlink
,
.
get_dispid
=
HTMLAttributeCollection_get_dispid
,
.
get_name
=
HTMLAttributeCollection_get_name
,
...
...
@@ -9050,7 +9057,6 @@ HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **a
This
->
attrs
->
IHTMLAttributeCollection_iface
.
lpVtbl
=
&
HTMLAttributeCollectionVtbl
;
This
->
attrs
->
IHTMLAttributeCollection2_iface
.
lpVtbl
=
&
HTMLAttributeCollection2Vtbl
;
This
->
attrs
->
IHTMLAttributeCollection3_iface
.
lpVtbl
=
&
HTMLAttributeCollection3Vtbl
;
This
->
attrs
->
ref
=
2
;
This
->
attrs
->
elem
=
This
;
list_init
(
&
This
->
attrs
->
attrs
);
...
...
@@ -9058,5 +9064,6 @@ HRESULT HTMLElement_get_attr_col(HTMLDOMNode *iface, HTMLAttributeCollection **a
&
HTMLAttributeCollection_dispex
,
dispex_compat_mode
(
&
iface
->
event_target
.
dispex
));
*
ac
=
This
->
attrs
;
IHTMLAttributeCollection_AddRef
(
&
This
->
attrs
->
IHTMLAttributeCollection_iface
);
return
S_OK
;
}
dlls/mshtml/mshtml_private.h
View file @
2ee74c59
...
...
@@ -1160,8 +1160,6 @@ struct HTMLAttributeCollection {
IHTMLAttributeCollection2
IHTMLAttributeCollection2_iface
;
IHTMLAttributeCollection3
IHTMLAttributeCollection3_iface
;
LONG
ref
;
HTMLElement
*
elem
;
struct
list
attrs
;
};
...
...
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