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
f229469d
Commit
f229469d
authored
Oct 11, 2008
by
Michael Karcher
Committed by
Alexandre Julliard
Oct 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Use orphan node list.
parent
e497ed82
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
domdoc.c
dlls/msxml3/domdoc.c
+11
-0
node.c
dlls/msxml3/node.c
+11
-0
nodemap.c
dlls/msxml3/nodemap.c
+6
-0
No files found.
dlls/msxml3/domdoc.c
View file @
f229469d
...
...
@@ -953,6 +953,7 @@ static HRESULT WINAPI domdoc_createElement(
xml_name
=
xmlChar_from_wchar
((
WCHAR
*
)
tagname
);
xmlnode
=
xmlNewDocNode
(
get_doc
(
This
),
NULL
,
xml_name
,
NULL
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
TRACE
(
"created xmlptr %p
\n
"
,
xmlnode
);
elem_unk
=
create_element
(
xmlnode
,
NULL
);
...
...
@@ -984,6 +985,7 @@ static HRESULT WINAPI domdoc_createDocumentFragment(
if
(
!
xmlnode
)
return
E_FAIL
;
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
*
docFrag
=
(
IXMLDOMDocumentFragment
*
)
create_doc_fragment
(
xmlnode
);
return
S_OK
;
...
...
@@ -1014,6 +1016,7 @@ static HRESULT WINAPI domdoc_createTextNode(
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
*
text
=
(
IXMLDOMText
*
)
create_text
(
xmlnode
);
...
...
@@ -1045,6 +1048,7 @@ static HRESULT WINAPI domdoc_createComment(
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
*
comment
=
(
IXMLDOMComment
*
)
create_comment
(
xmlnode
);
...
...
@@ -1076,6 +1080,7 @@ static HRESULT WINAPI domdoc_createCDATASection(
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
*
cdata
=
(
IXMLDOMCDATASection
*
)
create_cdata
(
xmlnode
);
...
...
@@ -1106,6 +1111,7 @@ static HRESULT WINAPI domdoc_createProcessingInstruction(
xml_content
=
xmlChar_from_wchar
((
WCHAR
*
)
data
);
xmlnode
=
xmlNewDocPI
(
get_doc
(
This
),
xml_target
,
xml_content
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
TRACE
(
"created xmlptr %p
\n
"
,
xmlnode
);
*
pi
=
(
IXMLDOMProcessingInstruction
*
)
create_pi
(
xmlnode
);
...
...
@@ -1144,6 +1150,7 @@ static HRESULT WINAPI domdoc_createAttribute(
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
*
attribute
=
(
IXMLDOMAttribute
*
)
create_attribute
(
xmlnode
);
...
...
@@ -1175,6 +1182,7 @@ static HRESULT WINAPI domdoc_createEntityReference(
return
E_FAIL
;
xmlnode
->
doc
=
get_doc
(
This
);
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
*
entityRef
=
(
IXMLDOMEntityReference
*
)
create_doc_entity_ref
(
xmlnode
);
...
...
@@ -1267,7 +1275,10 @@ static HRESULT WINAPI domdoc_createNode(
HeapFree
(
GetProcessHeap
(),
0
,
xml_name
);
if
(
xmlnode
&&
*
node
)
{
xmldoc_add_orphan
(
xmlnode
->
doc
,
xmlnode
);
return
S_OK
;
}
return
E_FAIL
;
}
...
...
dlls/msxml3/node.c
View file @
f229469d
...
...
@@ -596,6 +596,10 @@ static HRESULT WINAPI xmlnode_insertBefore(
new_child_node
=
impl_from_IXMLDOMNode
(
new
)
->
node
;
TRACE
(
"new_child_node %p This->node %p
\n
"
,
new_child_node
,
This
->
node
);
if
(
!
new_child_node
->
parent
)
if
(
xmldoc_remove_orphan
(
new_child_node
->
doc
,
new_child_node
)
!=
S_OK
)
WARN
(
"%p is not an orphan of %p
\n
"
,
new_child_node
,
new_child_node
->
doc
);
if
(
before
)
{
before_node
=
impl_from_IXMLDOMNode
(
before
)
->
node
;
...
...
@@ -663,11 +667,17 @@ static HRESULT WINAPI xmlnode_replaceChild(
my_ancestor
=
my_ancestor
->
parent
;
}
if
(
!
new_child_ptr
->
parent
)
if
(
xmldoc_remove_orphan
(
new_child_ptr
->
doc
,
new_child_ptr
)
!=
S_OK
)
WARN
(
"%p is not an orphan of %p
\n
"
,
new_child_ptr
,
new_child_ptr
->
doc
);
leaving_doc
=
new_child_ptr
->
doc
;
xmldoc_add_ref
(
old_child_ptr
->
doc
);
xmlReplaceNode
(
old_child_ptr
,
new_child_ptr
);
xmldoc_release
(
leaving_doc
);
xmldoc_add_orphan
(
old_child_ptr
->
doc
,
old_child_ptr
);
if
(
outOldChild
)
{
IXMLDOMNode_AddRef
(
oldChild
);
...
...
@@ -790,6 +800,7 @@ static HRESULT WINAPI xmlnode_cloneNode(
if
(
pClone
)
{
pClone
->
doc
=
This
->
node
->
doc
;
xmldoc_add_orphan
(
pClone
->
doc
,
pClone
);
pNode
=
create_node
(
pClone
);
if
(
!
pNode
)
...
...
dlls/msxml3/nodemap.c
View file @
f229469d
...
...
@@ -265,6 +265,10 @@ static HRESULT WINAPI xmlnodemap_setNamedItem(
return
E_FAIL
;
}
if
(
!
ThisNew
->
node
->
parent
)
if
(
xmldoc_remove_orphan
(
ThisNew
->
node
->
doc
,
ThisNew
->
node
)
!=
S_OK
)
WARN
(
"%p is not an orphan of %p
\n
"
,
ThisNew
->
node
,
ThisNew
->
node
->
doc
);
nodeNew
=
xmlAddChild
(
node
,
ThisNew
->
node
);
if
(
namedItem
)
...
...
@@ -312,6 +316,8 @@ static HRESULT WINAPI xmlnodemap_removeNamedItem(
{
attr_copy
=
xmlCopyProp
(
NULL
,
attr
);
attr_copy
->
doc
=
node
->
doc
;
/* The cast here is OK, xmlFreeNode handles xmlAttrPtr pointers */
xmldoc_add_orphan
(
attr_copy
->
doc
,
(
xmlNodePtr
)
attr_copy
);
*
namedItem
=
create_node
(
(
xmlNodePtr
)
attr_copy
);
}
xmlRemoveProp
(
attr
);
...
...
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