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
46ca3c43
Commit
46ca3c43
authored
Aug 26, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Update wine_url in nsIURL::SetQuery.
parent
d6215843
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
3 deletions
+43
-3
nsio.c
dlls/mshtml/nsio.c
+43
-3
No files found.
dlls/mshtml/nsio.c
View file @
46ca3c43
...
...
@@ -1856,14 +1856,54 @@ static nsresult NSAPI nsURL_GetQuery(nsIWineURI *iface, nsACString *aQuery)
static
nsresult
NSAPI
nsURL_SetQuery
(
nsIWineURI
*
iface
,
const
nsACString
*
aQuery
)
{
nsURI
*
This
=
NSURI_THIS
(
iface
);
const
WCHAR
*
ptr1
,
*
ptr2
;
const
char
*
query
;
WCHAR
*
new_url
,
*
ptr
;
DWORD
len
,
size
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_nsacstr
(
aQuery
));
if
(
This
->
nsurl
)
return
nsIURL_SetQuery
(
This
->
nsurl
,
aQuery
);
nsIURL_SetQuery
(
This
->
nsurl
,
aQuery
);
FIXME
(
"default action not implemented
\n
"
);
return
NS_ERROR_NOT_IMPLEMENTED
;
if
(
!
This
->
wine_url
)
return
NS_OK
;
nsACString_GetData
(
aQuery
,
&
query
);
size
=
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
query
,
-
1
,
NULL
,
0
);
ptr1
=
strchrW
(
This
->
wine_url
,
'?'
);
if
(
ptr1
)
{
size
+=
ptr1
-
This
->
wine_url
;
ptr2
=
strchrW
(
ptr1
,
'#'
);
if
(
ptr2
)
size
+=
strlenW
(
ptr2
);
}
else
{
ptr1
=
This
->
wine_url
+
strlenW
(
This
->
wine_url
);
ptr2
=
NULL
;
size
+=
strlenW
(
This
->
wine_url
);
}
if
(
*
query
)
size
++
;
new_url
=
heap_alloc
(
size
*
sizeof
(
WCHAR
));
memcpy
(
new_url
,
This
->
wine_url
,
(
ptr1
-
This
->
wine_url
)
*
sizeof
(
WCHAR
));
ptr
=
new_url
+
(
ptr1
-
This
->
wine_url
);
if
(
*
query
)
{
*
ptr
++
=
'?'
;
MultiByteToWideChar
(
CP_ACP
,
0
,
query
,
-
1
,
ptr
,
len
);
ptr
+=
len
-
1
;
}
if
(
ptr2
)
strcpyW
(
ptr
,
ptr2
);
else
*
ptr
=
0
;
TRACE
(
"setting %s
\n
"
,
debugstr_w
(
new_url
));
heap_free
(
This
->
wine_url
);
This
->
wine_url
=
new_url
;
return
NS_OK
;
}
static
nsresult
NSAPI
nsURL_GetRef
(
nsIWineURI
*
iface
,
nsACString
*
aRef
)
...
...
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