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
201b1c2a
Commit
201b1c2a
authored
Dec 06, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite: Fix reported node type for attributes.
parent
f6e6b835
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
reader.c
dlls/xmllite/reader.c
+5
-1
reader.c
dlls/xmllite/tests/reader.c
+16
-0
No files found.
dlls/xmllite/reader.c
View file @
201b1c2a
...
...
@@ -937,7 +937,11 @@ static HRESULT WINAPI xmlreader_GetNodeType(IXmlReader* iface, XmlNodeType *node
{
xmlreader
*
This
=
impl_from_IXmlReader
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
node_type
);
*
node_type
=
This
->
nodetype
;
/* When we're on attribute always return attribute type, container node type is kept.
Note that container is not necessarily an element, and attribute doesn't mean it's
an attribute in XML spec terms. */
*
node_type
=
This
->
attr
?
XmlNodeType_Attribute
:
This
->
nodetype
;
return
This
->
state
==
XmlReadState_Closed
?
S_FALSE
:
S_OK
;
}
...
...
dlls/xmllite/tests/reader.c
View file @
201b1c2a
...
...
@@ -642,6 +642,12 @@ todo_wine
/* check attributes */
hr
=
IXmlReader_MoveToNextAttribute
(
reader
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
type
=
XmlNodeType_None
;
hr
=
IXmlReader_GetNodeType
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Attribute
,
"got %d
\n
"
,
type
);
ok_pos
(
reader
,
1
,
7
,
-
1
,
55
,
TRUE
);
/* try to move from last attribute */
...
...
@@ -652,6 +658,11 @@ todo_wine
hr
=
IXmlReader_MoveToNextAttribute
(
reader
);
ok
(
hr
==
S_FALSE
,
"got %08x
\n
"
,
hr
);
type
=
XmlNodeType_None
;
hr
=
IXmlReader_GetNodeType
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Attribute
,
"got %d
\n
"
,
type
);
hr
=
IXmlReader_MoveToFirstAttribute
(
reader
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok_pos
(
reader
,
1
,
7
,
-
1
,
55
,
TRUE
);
...
...
@@ -672,6 +683,11 @@ todo_wine {
hr
=
IXmlReader_MoveToElement
(
reader
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
type
=
XmlNodeType_None
;
hr
=
IXmlReader_GetNodeType
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_XmlDeclaration
,
"got %d
\n
"
,
type
);
IStream_Release
(
stream
);
IXmlReader_Release
(
reader
);
}
...
...
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