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
a8d0efc7
Commit
a8d0efc7
authored
Jun 26, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Return referenced instances from node constructors.
parent
d31176ec
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
26 deletions
+8
-26
htmldoc.c
dlls/mshtml/htmldoc.c
+0
-2
htmldoc3.c
dlls/mshtml/htmldoc3.c
+0
-1
htmldoc5.c
dlls/mshtml/htmldoc5.c
+0
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+0
-1
htmlimg.c
dlls/mshtml/htmlimg.c
+1
-0
htmlnode.c
dlls/mshtml/htmlnode.c
+6
-14
htmltextnode.c
dlls/mshtml/htmltextnode.c
+1
-7
No files found.
dlls/mshtml/htmldoc.c
View file @
a8d0efc7
...
...
@@ -1037,7 +1037,6 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
return
hres
;
*
newElem
=
&
elem
->
IHTMLElement_iface
;
IHTMLElement_AddRef
(
&
elem
->
IHTMLElement_iface
);
return
S_OK
;
}
...
...
@@ -2262,7 +2261,6 @@ HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node,
doc_frag
->
node
.
vtbl
=
&
HTMLDocumentFragmentImplVtbl
;
doc_frag
->
node
.
cp_container
=
&
doc_frag
->
basedoc
.
cp_container
;
htmldoc_addref
(
&
doc_frag
->
basedoc
);
*
ret
=
doc_frag
;
return
S_OK
;
}
...
...
dlls/mshtml/htmldoc3.c
View file @
a8d0efc7
...
...
@@ -135,7 +135,6 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
return
hres
;
*
newTextNode
=
&
node
->
IHTMLDOMNode_iface
;
IHTMLDOMNode_AddRef
(
&
node
->
IHTMLDOMNode_iface
);
return
S_OK
;
}
...
...
dlls/mshtml/htmldoc5.c
View file @
a8d0efc7
...
...
@@ -155,7 +155,6 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs
return
hres
;
*
ppRetNode
=
&
elem
->
node
.
IHTMLDOMNode_iface
;
IHTMLDOMNode_AddRef
(
&
elem
->
node
.
IHTMLDOMNode_iface
);
return
S_OK
;
}
...
...
dlls/mshtml/htmlelem.c
View file @
a8d0efc7
...
...
@@ -1618,7 +1618,6 @@ HRESULT HTMLElement_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HTMLDOMNode **
}
}
IHTMLElement_AddRef
(
&
new_elem
->
IHTMLElement_iface
);
*
ret
=
&
new_elem
->
node
;
return
S_OK
;
}
...
...
dlls/mshtml/htmlimg.c
View file @
a8d0efc7
...
...
@@ -841,6 +841,7 @@ static HRESULT WINAPI HTMLImageElementFactory_create(IHTMLImageElementFactory *i
hres
=
IHTMLElement_QueryInterface
(
&
elem
->
IHTMLElement_iface
,
&
IID_IHTMLImgElement
,
(
void
**
)
&
img
);
IHTMLElement_Release
(
&
elem
->
IHTMLElement_iface
);
if
(
FAILED
(
hres
))
{
ERR
(
"IHTMLElement_QueryInterface failed: 0x%08x
\n
"
,
hres
);
return
hres
;
...
...
dlls/mshtml/htmlnode.c
View file @
a8d0efc7
...
...
@@ -1007,14 +1007,7 @@ void HTMLDOMNode_destructor(HTMLDOMNode *This)
static
HRESULT
HTMLDOMNode_clone
(
HTMLDOMNode
*
This
,
nsIDOMNode
*
nsnode
,
HTMLDOMNode
**
ret
)
{
HRESULT
hres
;
hres
=
create_node
(
This
->
doc
,
nsnode
,
ret
);
if
(
FAILED
(
hres
))
return
hres
;
IHTMLDOMNode_AddRef
(
&
(
*
ret
)
->
IHTMLDOMNode_iface
);
return
S_OK
;
return
create_node
(
This
->
doc
,
nsnode
,
ret
);
}
static
const
NodeImplVtbl
HTMLDOMNodeImplVtbl
=
{
...
...
@@ -1027,9 +1020,12 @@ void HTMLDOMNode_Init(HTMLDocumentNode *doc, HTMLDOMNode *node, nsIDOMNode *nsno
{
node
->
IHTMLDOMNode_iface
.
lpVtbl
=
&
HTMLDOMNodeVtbl
;
node
->
IHTMLDOMNode2_iface
.
lpVtbl
=
&
HTMLDOMNode2Vtbl
;
node
->
ref
=
1
;
node
->
ref
=
2
;
node
->
doc
=
doc
;
if
(
&
doc
->
node
!=
node
)
node
->
ref
++
;
/* one extra for list entry reference */
if
(
nsnode
)
nsIDOMNode_AddRef
(
nsnode
);
node
->
nsnode
=
nsnode
;
...
...
@@ -1096,7 +1092,6 @@ static HRESULT create_node(HTMLDocumentNode *doc, nsIDOMNode *nsnode, HTMLDOMNod
HRESULT
get_node
(
HTMLDocumentNode
*
This
,
nsIDOMNode
*
nsnode
,
BOOL
create
,
HTMLDOMNode
**
ret
)
{
HTMLDOMNode
*
iter
=
This
->
nodes
;
HRESULT
hres
;
while
(
iter
)
{
if
(
iter
->
nsnode
==
nsnode
)
...
...
@@ -1111,10 +1106,7 @@ HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDO
return
S_OK
;
}
hres
=
create_node
(
This
,
nsnode
,
ret
);
if
(
SUCCEEDED
(
hres
))
IHTMLDOMNode_AddRef
(
&
(
*
ret
)
->
IHTMLDOMNode_iface
);
return
hres
;
return
create_node
(
This
,
nsnode
,
ret
);
}
/*
...
...
dlls/mshtml/htmltextnode.c
View file @
a8d0efc7
...
...
@@ -191,14 +191,8 @@ static void HTMLDOMTextNode_destructor(HTMLDOMNode *iface)
static
HRESULT
HTMLDOMTextNode_clone
(
HTMLDOMNode
*
iface
,
nsIDOMNode
*
nsnode
,
HTMLDOMNode
**
ret
)
{
HTMLDOMTextNode
*
This
=
impl_from_HTMLDOMNode
(
iface
);
HRESULT
hres
;
hres
=
HTMLDOMTextNode_Create
(
This
->
node
.
doc
,
nsnode
,
ret
);
if
(
FAILED
(
hres
))
return
hres
;
IHTMLDOMNode_AddRef
(
&
(
*
ret
)
->
IHTMLDOMNode_iface
);
return
S_OK
;
return
HTMLDOMTextNode_Create
(
This
->
node
.
doc
,
nsnode
,
ret
);
}
static
const
NodeImplVtbl
HTMLDOMTextNodeImplVtbl
=
{
...
...
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