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
fd423937
Commit
fd423937
authored
Apr 22, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: getPrefix() should check all pushed contexts as well.
parent
43241140
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
15 deletions
+7
-15
mxnamespace.c
dlls/msxml3/mxnamespace.c
+7
-6
domdoc.c
dlls/msxml3/tests/domdoc.c
+0
-9
No files found.
dlls/msxml3/mxnamespace.c
View file @
fd423937
...
...
@@ -144,16 +144,20 @@ static HRESULT get_declared_prefix_idx(const struct nscontext *ctxt, LONG index,
}
/* returned stored pointer, caller needs to copy it */
static
HRESULT
get_declared_prefix_uri
(
const
struct
nscontext
*
ctxt
,
const
WCHAR
*
uri
,
BSTR
*
prefix
)
static
HRESULT
get_declared_prefix_uri
(
const
struct
list
*
ctxts
,
const
WCHAR
*
uri
,
BSTR
*
prefix
)
{
int
i
;
struct
nscontext
*
ctxt
;
LIST_FOR_EACH_ENTRY
(
ctxt
,
ctxts
,
struct
nscontext
,
entry
)
{
int
i
;
for
(
i
=
0
;
i
<
ctxt
->
count
;
i
++
)
if
(
!
strcmpW
(
ctxt
->
ns
[
i
].
uri
,
uri
))
{
*
prefix
=
ctxt
->
ns
[
i
].
prefix
;
return
S_OK
;
}
}
*
prefix
=
NULL
;
return
E_FAIL
;
...
...
@@ -321,7 +325,6 @@ static HRESULT WINAPI namespacemanager_getPrefix(IMXNamespaceManager *iface,
const
WCHAR
*
uri
,
LONG
index
,
WCHAR
*
prefix
,
int
*
prefix_len
)
{
namespacemanager
*
This
=
impl_from_IMXNamespaceManager
(
iface
);
struct
nscontext
*
ctxt
;
HRESULT
hr
;
BSTR
prfx
;
...
...
@@ -329,9 +332,7 @@ static HRESULT WINAPI namespacemanager_getPrefix(IMXNamespaceManager *iface,
if
(
!
uri
||
!*
uri
||
!
prefix_len
)
return
E_INVALIDARG
;
ctxt
=
LIST_ENTRY
(
list_head
(
&
This
->
ctxts
),
struct
nscontext
,
entry
);
hr
=
get_declared_prefix_uri
(
ctxt
,
uri
,
&
prfx
);
hr
=
get_declared_prefix_uri
(
&
This
->
ctxts
,
uri
,
&
prfx
);
if
(
hr
==
S_OK
)
{
/* TODO: figure out what index argument is for */
...
...
dlls/msxml3/tests/domdoc.c
View file @
fd423937
...
...
@@ -10741,12 +10741,9 @@ todo_wine {
len
=
100
;
buffW
[
0
]
=
0x1
;
hr
=
IMXNamespaceManager_getPrefix
(
nsmgr
,
_bstr_
(
"ns1 uri"
),
0
,
buffW
,
&
len
);
todo_wine
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
==
S_OK
)
{
ok
(
!
lstrcmpW
(
buffW
,
_bstr_
(
"ns1"
)),
"got %s
\n
"
,
wine_dbgstr_w
(
buffW
));
ok
(
len
==
3
,
"got %d
\n
"
,
len
);
}
hr
=
IMXNamespaceManager_declarePrefix
(
nsmgr
,
_bstr_
(
"ns2"
),
_bstr_
(
"ns2 uri"
));
EXPECT_HR
(
hr
,
S_OK
);
...
...
@@ -10766,22 +10763,16 @@ todo_wine
len
=
100
;
buffW
[
0
]
=
0x1
;
hr
=
IMXNamespaceManager_getPrefix
(
nsmgr
,
_bstr_
(
"ns2 uri"
),
0
,
buffW
,
&
len
);
todo_wine
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
==
S_OK
)
{
ok
(
!
lstrcmpW
(
buffW
,
_bstr_
(
"ns2"
)),
"got %s
\n
"
,
wine_dbgstr_w
(
buffW
));
ok
(
len
==
3
,
"got %d
\n
"
,
len
);
}
len
=
100
;
buffW
[
0
]
=
0x1
;
hr
=
IMXNamespaceManager_getPrefix
(
nsmgr
,
_bstr_
(
"ns1 uri"
),
0
,
buffW
,
&
len
);
todo_wine
EXPECT_HR
(
hr
,
S_OK
);
if
(
hr
==
S_OK
)
{
ok
(
!
lstrcmpW
(
buffW
,
_bstr_
(
"ns1"
)),
"got %s
\n
"
,
wine_dbgstr_w
(
buffW
));
ok
(
len
==
3
,
"got %d
\n
"
,
len
);
}
hr
=
IMXNamespaceManager_popContext
(
nsmgr
);
EXPECT_HR
(
hr
,
S_OK
);
...
...
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