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
2ca7683d
Commit
2ca7683d
authored
Aug 09, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLLocation::get_pathname implementation.
parent
3d1bb799
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
2 deletions
+44
-2
Makefile.in
dlls/mshtml/Makefile.in
+1
-0
htmllocation.c
dlls/mshtml/htmllocation.c
+38
-2
dom.c
dlls/mshtml/tests/dom.c
+5
-0
No files found.
dlls/mshtml/Makefile.in
View file @
2ca7683d
...
...
@@ -6,6 +6,7 @@ MODULE = mshtml.dll
IMPORTLIB
=
mshtml
IMPORTS
=
strmiids uuid urlmon shlwapi ole32 oleaut32 user32 gdi32 advapi32 kernel32
EXTRADEFS
=
-DCOM_NO_WINDOWS_H
DELAYIMPORTS
=
wininet
C_SRCS
=
\
conpoint.c
\
...
...
dlls/mshtml/htmllocation.c
View file @
2ca7683d
...
...
@@ -23,7 +23,10 @@
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "ole2.h"
#include "wininet.h"
#include "shlwapi.h"
#include "wine/debug.h"
...
...
@@ -195,8 +198,41 @@ 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
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
WCHAR
buf
[
INTERNET_MAX_PATH_LENGTH
];
URL_COMPONENTSW
url
=
{
sizeof
(
url
)};
DWORD
size
=
0
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
doc
||
!
This
->
doc
->
url
)
{
FIXME
(
"No current URL
\n
"
);
return
E_NOTIMPL
;
}
hres
=
CoInternetParseUrl
(
This
->
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
;
if
(
!
InternetCrackUrlW
(
This
->
doc
->
url
,
0
,
0
,
&
url
))
{
FIXME
(
"InternetCrackUrl failed
\n
"
);
return
E_FAIL
;
}
if
(
!
url
.
dwUrlPathLength
)
{
*
p
=
NULL
;
return
S_OK
;
}
*
p
=
SysAllocStringLen
(
url
.
lpszUrlPath
,
url
.
dwUrlPathLength
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLLocation_put_search
(
IHTMLLocation
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
2ca7683d
...
...
@@ -2383,6 +2383,7 @@ static void test_location(IHTMLDocument2 *doc)
{
IHTMLLocation
*
location
,
*
location2
;
IHTMLWindow2
*
window
;
BSTR
str
;
ULONG
ref
;
HRESULT
hres
;
...
...
@@ -2406,6 +2407,10 @@ static void test_location(IHTMLDocument2 *doc)
test_ifaces
((
IUnknown
*
)
location
,
location_iids
);
test_disp2
((
IUnknown
*
)
location
,
&
DIID_DispHTMLLocation
,
&
IID_IHTMLLocation
);
hres
=
IHTMLLocation_get_pathname
(
location
,
&
str
);
ok
(
hres
==
S_OK
,
"get_pathname failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"blank"
),
"unexpected pathname %s
\n
"
,
dbgstr_w
(
str
));
ref
=
IHTMLLocation_Release
(
location
);
ok
(
!
ref
,
"location chould be destroyed here
\n
"
);
}
...
...
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