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
a03d0bca
Commit
a03d0bca
authored
Oct 16, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Oct 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Reimplement HTMLLocation::get_pathname.
parent
6a456fa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
25 deletions
+10
-25
htmllocation.c
dlls/mshtml/htmllocation.c
+6
-21
htmllocation.c
dlls/mshtml/tests/htmllocation.c
+4
-4
No files found.
dlls/mshtml/htmllocation.c
View file @
a03d0bca
...
...
@@ -428,10 +428,7 @@ static HRESULT WINAPI HTMLLocation_put_pathname(IHTMLLocation *iface, BSTR v)
static
HRESULT
WINAPI
HTMLLocation_get_pathname
(
IHTMLLocation
*
iface
,
BSTR
*
p
)
{
HTMLLocation
*
This
=
HTMLLOCATION_THIS
(
iface
);
WCHAR
buf
[
INTERNET_MAX_PATH_LENGTH
];
URL_COMPONENTSW
url
=
{
sizeof
(
url
)};
const
WCHAR
*
doc_url
;
DWORD
size
=
0
;
URL_COMPONENTSW
url
=
{
sizeof
(
URL_COMPONENTSW
)};
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
...
@@ -439,29 +436,17 @@ static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p)
if
(
!
p
)
return
E_POINTER
;
hres
=
get_url
(
This
,
&
doc_url
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
CoInternetParseUrl
(
doc_url
,
PARSE_PATH_FROM_URL
,
0
,
buf
,
sizeof
(
buf
),
&
size
,
0
);
if
(
SUCCEEDED
(
hres
))
{
*
p
=
SysAllocString
(
buf
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
url
.
dwUrlPathLength
=
1
;
url
.
dwExtraInfoLength
=
1
;
hres
=
get_url_components
(
This
,
&
url
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
url
.
dwUrlPathLength
)
{
*
p
=
NULL
;
return
S_OK
;
}
if
(
url
.
dwUrlPathLength
&&
url
.
lpszUrlPath
[
0
]
==
'/'
)
*
p
=
SysAllocStringLen
(
url
.
lpszUrlPath
+
1
,
url
.
dwUrlPathLength
-
1
)
;
else
*
p
=
SysAllocStringLen
(
url
.
lpszUrlPath
,
url
.
dwUrlPathLength
);
*
p
=
SysAllocStringLen
(
url
.
lpszUrlPath
,
url
.
dwUrlPathLength
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
return
S_OK
;
...
...
dlls/mshtml/tests/htmllocation.c
View file @
a03d0bca
...
...
@@ -61,7 +61,7 @@ static const struct location_test http_test = {
"www.winehq.org:80"
,
TRUE
,
"www.winehq.org"
,
TRUE
,
"80"
,
TRUE
,
""
,
FALS
E
,
""
,
TRU
E
,
"?search"
,
FALSE
,
"#hash"
,
FALSE
};
...
...
@@ -75,7 +75,7 @@ static const struct location_test http_file_test = {
"www.winehq.org:80"
,
TRUE
,
"www.winehq.org"
,
TRUE
,
"80"
,
TRUE
,
"file"
,
FALS
E
,
"file"
,
TRU
E
,
"?search"
,
FALSE
,
"#hash"
,
FALSE
};
...
...
@@ -89,7 +89,7 @@ static const struct location_test ftp_test = {
"ftp.winehq.org:21"
,
TRUE
,
"ftp.winehq.org"
,
TRUE
,
"21"
,
TRUE
,
""
,
FALS
E
,
""
,
TRU
E
,
NULL
,
FALSE
,
NULL
,
FALSE
};
...
...
@@ -103,7 +103,7 @@ static const struct location_test ftp_file_test = {
"ftp.winehq.org:21"
,
TRUE
,
"ftp.winehq.org"
,
TRUE
,
"21"
,
TRUE
,
"file"
,
FALS
E
,
"file"
,
TRU
E
,
NULL
,
FALSE
,
NULL
,
FALSE
};
...
...
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