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
b115e967
Commit
b115e967
authored
Mar 10, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmllite/reader: Improve returned position for whitespace text nodes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9685fec1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
reader.c
dlls/xmllite/reader.c
+5
-0
reader.c
dlls/xmllite/tests/reader.c
+0
-1
No files found.
dlls/xmllite/reader.c
View file @
b115e967
...
...
@@ -2383,6 +2383,7 @@ static HRESULT reader_parse_cdata(xmlreader *reader)
/* [14] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*) */
static
HRESULT
reader_parse_chardata
(
xmlreader
*
reader
)
{
struct
reader_position
position
;
WCHAR
*
ptr
;
UINT
start
;
...
...
@@ -2404,6 +2405,7 @@ static HRESULT reader_parse_chardata(xmlreader *reader)
reader_set_strvalue
(
reader
,
StringValue_Value
,
NULL
);
}
position
=
reader
->
position
;
while
(
*
ptr
)
{
static
const
WCHAR
ampW
[]
=
{
'&'
,
0
};
...
...
@@ -2417,6 +2419,7 @@ static HRESULT reader_parse_chardata(xmlreader *reader)
{
strval
value
;
reader
->
empty_element
.
position
=
position
;
reader_init_strvalue
(
start
,
reader_get_cur
(
reader
)
-
start
,
&
value
);
reader_set_strvalue
(
reader
,
StringValue_Value
,
&
value
);
reader
->
resume
[
XmlReadResume_Body
]
=
0
;
...
...
@@ -3314,6 +3317,7 @@ static HRESULT WINAPI xmlreader_GetLineNumber(IXmlReader* iface, UINT *line_numb
case
XmlNodeType_Attribute
:
*
line_number
=
This
->
attr
->
position
.
line_number
;
break
;
case
XmlNodeType_Whitespace
:
case
XmlNodeType_XmlDeclaration
:
*
line_number
=
This
->
empty_element
.
position
.
line_number
;
break
;
...
...
@@ -3349,6 +3353,7 @@ static HRESULT WINAPI xmlreader_GetLinePosition(IXmlReader* iface, UINT *line_po
case
XmlNodeType_Attribute
:
*
line_position
=
This
->
attr
->
position
.
line_position
;
break
;
case
XmlNodeType_Whitespace
:
case
XmlNodeType_XmlDeclaration
:
*
line_position
=
This
->
empty_element
.
position
.
line_position
;
break
;
...
...
dlls/xmllite/tests/reader.c
View file @
b115e967
...
...
@@ -2531,7 +2531,6 @@ static void test_reader_position(void)
hr
=
IXmlReader_Read
(
reader
,
&
type
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
XmlNodeType_Whitespace
,
"got type %d
\n
"
,
type
);
todo_wine
TEST_READER_POSITION2
(
reader
,
1
,
35
,
2
,
6
);
hr
=
IXmlReader_Read
(
reader
,
&
type
);
...
...
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