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
829f24c1
Commit
829f24c1
authored
Jun 27, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Get rid of no longer needed unk_ref from HTMLElementCollection.
parent
c2ca817d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
33 deletions
+23
-33
htmldoc.c
dlls/mshtml/htmldoc.c
+5
-5
htmldoc3.c
dlls/mshtml/htmldoc3.c
+1
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+1
-2
htmlelem2.c
dlls/mshtml/htmlelem2.c
+1
-2
htmlelemcol.c
dlls/mshtml/htmlelemcol.c
+11
-17
htmltable.c
dlls/mshtml/htmltable.c
+1
-2
htmltablerow.c
dlls/mshtml/htmltablerow.c
+1
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-2
No files found.
dlls/mshtml/htmldoc.c
View file @
829f24c1
...
...
@@ -213,7 +213,7 @@ static HRESULT WINAPI HTMLDocument_get_images(IHTMLDocument2 *iface, IHTMLElemen
}
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
&
This
->
IHTMLDocument2_iface
,
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
...
...
@@ -245,7 +245,7 @@ static HRESULT WINAPI HTMLDocument_get_applets(IHTMLDocument2 *iface, IHTMLEleme
}
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
&
This
->
IHTMLDocument2_iface
,
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
...
...
@@ -277,7 +277,7 @@ static HRESULT WINAPI HTMLDocument_get_links(IHTMLDocument2 *iface, IHTMLElement
}
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
&
This
->
IHTMLDocument2_iface
,
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
...
...
@@ -309,7 +309,7 @@ static HRESULT WINAPI HTMLDocument_get_forms(IHTMLDocument2 *iface, IHTMLElement
}
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
&
This
->
IHTMLDocument2_iface
,
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
...
...
@@ -341,7 +341,7 @@ static HRESULT WINAPI HTMLDocument_get_anchors(IHTMLDocument2 *iface, IHTMLEleme
}
if
(
nscoll
)
{
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
(
IUnknown
*
)
&
This
->
IHTMLDocument2_iface
,
nscoll
);
*
p
=
create_collection_from_htmlcol
(
This
->
doc_node
,
nscoll
);
nsIDOMElement_Release
(
nscoll
);
}
...
...
dlls/mshtml/htmldoc3.c
View file @
829f24c1
...
...
@@ -572,8 +572,7 @@ static HRESULT WINAPI HTMLDocument3_getElementsByTagName(IHTMLDocument3 *iface,
return
E_FAIL
;
}
*
pelColl
=
create_collection_from_nodelist
(
This
->
doc_node
,
(
IUnknown
*
)
&
This
->
IHTMLDocument3_iface
,
nslist
);
*
pelColl
=
create_collection_from_nodelist
(
This
->
doc_node
,
nslist
);
nsIDOMNodeList_Release
(
nslist
);
return
S_OK
;
...
...
dlls/mshtml/htmlelem.c
View file @
829f24c1
...
...
@@ -1412,8 +1412,7 @@ static HRESULT WINAPI HTMLElement_get_children(IHTMLElement *iface, IDispatch **
return
E_FAIL
;
}
*
p
=
(
IDispatch
*
)
create_collection_from_nodelist
(
This
->
node
.
doc
,
(
IUnknown
*
)
&
This
->
IHTMLElement_iface
,
nsnode_list
);
*
p
=
(
IDispatch
*
)
create_collection_from_nodelist
(
This
->
node
.
doc
,
nsnode_list
);
nsIDOMNodeList_Release
(
nsnode_list
);
return
S_OK
;
...
...
dlls/mshtml/htmlelem2.c
View file @
829f24c1
...
...
@@ -1252,8 +1252,7 @@ static HRESULT WINAPI HTMLElement2_getElementsByTagName(IHTMLElement2 *iface, BS
return
E_FAIL
;
}
*
pelColl
=
create_collection_from_nodelist
(
This
->
node
.
doc
,
(
IUnknown
*
)
&
This
->
IHTMLElement_iface
,
nslist
);
*
pelColl
=
create_collection_from_nodelist
(
This
->
node
.
doc
,
nslist
);
nsIDOMNodeList_Release
(
nslist
);
return
S_OK
;
}
...
...
dlls/mshtml/htmlelemcol.c
View file @
829f24c1
...
...
@@ -35,7 +35,6 @@ typedef struct {
DispatchEx
dispex
;
IHTMLElementCollection
IHTMLElementCollection_iface
;
IUnknown
*
ref_unk
;
HTMLElement
**
elems
;
DWORD
len
;
...
...
@@ -54,8 +53,7 @@ static inline HTMLElement *elem_from_HTMLDOMNode(HTMLDOMNode *iface)
return
CONTAINING_RECORD
(
iface
,
HTMLElement
,
node
);
}
static
IHTMLElementCollection
*
HTMLElementCollection_Create
(
IUnknown
*
ref_unk
,
HTMLElement
**
elems
,
DWORD
len
);
static
IHTMLElementCollection
*
HTMLElementCollection_Create
(
HTMLElement
**
elems
,
DWORD
len
);
static
void
elem_vector_add
(
elem_vector_t
*
buf
,
HTMLElement
*
elem
)
{
...
...
@@ -141,9 +139,9 @@ static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface)
for
(
i
=
0
;
i
<
This
->
len
;
i
++
)
node_release
(
&
This
->
elems
[
i
]
->
node
);
IUnknown_Release
(
This
->
ref_unk
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
->
elems
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
}
...
...
@@ -331,7 +329,7 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface,
if
(
buf
.
len
>
1
)
{
elem_vector_normalize
(
&
buf
);
*
pdisp
=
(
IDispatch
*
)
HTMLElementCollection_Create
(
This
->
ref_unk
,
buf
.
buf
,
buf
.
len
);
*
pdisp
=
(
IDispatch
*
)
HTMLElementCollection_Create
(
buf
.
buf
,
buf
.
len
);
}
else
{
if
(
buf
.
len
==
1
)
{
/* Already AddRef-ed */
...
...
@@ -393,7 +391,7 @@ static HRESULT WINAPI HTMLElementCollection_tags(IHTMLElementCollection *iface,
TRACE
(
"fount %d tags
\n
"
,
buf
.
len
);
*
pdisp
=
(
IDispatch
*
)
HTMLElementCollection_Create
(
This
->
ref_unk
,
buf
.
buf
,
buf
.
len
);
*
pdisp
=
(
IDispatch
*
)
HTMLElementCollection_Create
(
buf
.
buf
,
buf
.
len
);
return
S_OK
;
}
...
...
@@ -547,10 +545,10 @@ IHTMLElementCollection *create_all_collection(HTMLDOMNode *node, BOOL include_ro
create_all_list
(
node
->
doc
,
node
,
&
buf
);
elem_vector_normalize
(
&
buf
);
return
HTMLElementCollection_Create
(
(
IUnknown
*
)
&
node
->
IHTMLDOMNode_iface
,
buf
.
buf
,
buf
.
len
);
return
HTMLElementCollection_Create
(
buf
.
buf
,
buf
.
len
);
}
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocumentNode
*
doc
,
IUnknown
*
unk
,
nsIDOMNodeList
*
nslist
)
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocumentNode
*
doc
,
nsIDOMNodeList
*
nslist
)
{
PRUint32
length
=
0
,
i
;
HTMLDOMNode
*
node
;
...
...
@@ -582,10 +580,10 @@ IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode *doc, I
buf
.
buf
=
NULL
;
}
return
HTMLElementCollection_Create
(
unk
,
buf
.
buf
,
buf
.
len
);
return
HTMLElementCollection_Create
(
buf
.
buf
,
buf
.
len
);
}
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocumentNode
*
doc
,
IUnknown
*
unk
,
nsIDOMHTMLCollection
*
nscol
)
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLCollection
*
nscol
)
{
PRUint32
length
=
0
,
i
;
elem_vector_t
buf
;
...
...
@@ -617,11 +615,10 @@ IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode *doc, IU
return
NULL
;
}
return
HTMLElementCollection_Create
(
unk
,
buf
.
buf
,
buf
.
len
);
return
HTMLElementCollection_Create
(
buf
.
buf
,
buf
.
len
);
}
static
IHTMLElementCollection
*
HTMLElementCollection_Create
(
IUnknown
*
ref_unk
,
HTMLElement
**
elems
,
DWORD
len
)
static
IHTMLElementCollection
*
HTMLElementCollection_Create
(
HTMLElement
**
elems
,
DWORD
len
)
{
HTMLElementCollection
*
ret
=
heap_alloc_zero
(
sizeof
(
HTMLElementCollection
));
...
...
@@ -633,9 +630,6 @@ static IHTMLElementCollection *HTMLElementCollection_Create(IUnknown *ref_unk,
init_dispex
(
&
ret
->
dispex
,
(
IUnknown
*
)
&
ret
->
IHTMLElementCollection_iface
,
&
HTMLElementCollection_dispex
);
IUnknown_AddRef
(
ref_unk
);
ret
->
ref_unk
=
ref_unk
;
TRACE
(
"ret=%p len=%d
\n
"
,
ret
,
len
);
return
&
ret
->
IHTMLElementCollection_iface
;
...
...
dlls/mshtml/htmltable.c
View file @
829f24c1
...
...
@@ -300,8 +300,7 @@ static HRESULT WINAPI HTMLTable_get_rows(IHTMLTable *iface, IHTMLElementCollecti
return
E_FAIL
;
}
*
p
=
create_collection_from_htmlcol
(
This
->
element
.
node
.
doc
,
(
IUnknown
*
)
&
This
->
IHTMLTable_iface
,
nscol
);
*
p
=
create_collection_from_htmlcol
(
This
->
element
.
node
.
doc
,
nscol
);
nsIDOMHTMLCollection_Release
(
nscol
);
return
S_OK
;
...
...
dlls/mshtml/htmltablerow.c
View file @
829f24c1
...
...
@@ -210,7 +210,7 @@ static HRESULT WINAPI HTMLTableRow_get_cells(IHTMLTableRow *iface, IHTMLElementC
return
E_FAIL
;
}
*
p
=
create_collection_from_htmlcol
(
This
->
element
.
node
.
doc
,
(
IUnknown
*
)
&
This
->
IHTMLTableRow_iface
,
nscol
);
*
p
=
create_collection_from_htmlcol
(
This
->
element
.
node
.
doc
,
nscol
);
nsIDOMHTMLCollection_Release
(
nscol
);
return
S_OK
;
...
...
dlls/mshtml/mshtml_private.h
View file @
829f24c1
...
...
@@ -862,8 +862,8 @@ HRESULT search_window_props(HTMLInnerWindow*,BSTR,DWORD,DISPID*) DECLSPEC_HIDDEN
HRESULT
wrap_iface
(
IUnknown
*
,
IUnknown
*
,
IUnknown
**
)
DECLSPEC_HIDDEN
;
IHTMLElementCollection
*
create_all_collection
(
HTMLDOMNode
*
,
BOOL
)
DECLSPEC_HIDDEN
;
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocumentNode
*
,
IUnknown
*
,
nsIDOMNodeList
*
)
DECLSPEC_HIDDEN
;
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocumentNode
*
,
IUnknown
*
,
nsIDOMHTMLCollection
*
)
DECLSPEC_HIDDEN
;
IHTMLElementCollection
*
create_collection_from_nodelist
(
HTMLDocumentNode
*
,
nsIDOMNodeList
*
)
DECLSPEC_HIDDEN
;
IHTMLElementCollection
*
create_collection_from_htmlcol
(
HTMLDocumentNode
*
,
nsIDOMHTMLCollection
*
)
DECLSPEC_HIDDEN
;
/* commands */
typedef
struct
{
...
...
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