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
4ebf01f6
Commit
4ebf01f6
authored
Oct 19, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Oct 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLLocation::get_hash.
parent
7a6381e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
htmllocation.c
dlls/mshtml/htmllocation.c
+24
-2
htmllocation.c
dlls/mshtml/tests/htmllocation.c
+6
-6
No files found.
dlls/mshtml/htmllocation.c
View file @
4ebf01f6
...
...
@@ -480,12 +480,34 @@ static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
static
HRESULT
WINAPI
HTMLLocation_get_hash
(
IHTMLLocation
*
iface
,
BSTR
*
p
)
{
HTMLLocation
*
This
=
HTMLLOCATION_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
URL_COMPONENTSW
url
=
{
sizeof
(
URL_COMPONENTSW
)};
const
WCHAR
hash
[]
=
{
'#'
,
0
};
DWORD
hash_pos
=
0
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_POINTER
;
return
E_NOTIMPL
;
url
.
dwExtraInfoLength
=
1
;
hres
=
get_url_components
(
This
,
&
url
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
url
.
dwExtraInfoLength
){
*
p
=
NULL
;
return
S_OK
;
}
hash_pos
=
strcspnW
(
url
.
lpszExtraInfo
,
hash
);
url
.
dwExtraInfoLength
-=
hash_pos
;
*
p
=
SysAllocStringLen
(
url
.
lpszExtraInfo
+
hash_pos
,
url
.
dwExtraInfoLength
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLLocation_reload
(
IHTMLLocation
*
iface
,
VARIANT_BOOL
flag
)
...
...
dlls/mshtml/tests/htmllocation.c
View file @
4ebf01f6
...
...
@@ -63,7 +63,7 @@ static const struct location_test http_test = {
"80"
,
TRUE
,
""
,
TRUE
,
"?search"
,
FALSE
,
"#hash"
,
FALS
E
"#hash"
,
TRU
E
};
static
const
WCHAR
http_file_url
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'w'
,
'w'
,
'w'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
'/'
,
'f'
,
'i'
,
'l'
,
'e'
,
'?'
,
's'
,
'e'
,
'a'
,
'r'
,
'c'
,
'h'
,
'#'
,
'h'
,
'a'
,
's'
,
'h'
,
0
};
...
...
@@ -77,7 +77,7 @@ static const struct location_test http_file_test = {
"80"
,
TRUE
,
"file"
,
TRUE
,
"?search"
,
FALSE
,
"#hash"
,
FALS
E
"#hash"
,
TRU
E
};
static
const
WCHAR
ftp_url
[]
=
{
'f'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'f'
,
't'
,
'p'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
'/'
,
0
};
...
...
@@ -91,7 +91,7 @@ static const struct location_test ftp_test = {
"21"
,
TRUE
,
""
,
TRUE
,
NULL
,
FALSE
,
NULL
,
FALS
E
NULL
,
TRU
E
};
static
const
WCHAR
ftp_file_url
[]
=
{
'f'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'f'
,
't'
,
'p'
,
'.'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
'/'
,
'f'
,
'i'
,
'l'
,
'e'
,
0
};
...
...
@@ -105,7 +105,7 @@ static const struct location_test ftp_file_test = {
"21"
,
TRUE
,
"file"
,
TRUE
,
NULL
,
FALSE
,
NULL
,
FALS
E
NULL
,
TRU
E
};
static
const
WCHAR
file_url
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'C'
,
':'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'w'
,
'i'
,
'n'
,
'.'
,
'i'
,
'n'
,
'i'
,
0
};
...
...
@@ -119,7 +119,7 @@ static const struct location_test file_test = {
""
,
TRUE
,
"C:
\\
windows
\\
win.ini"
,
TRUE
,
NULL
,
FALSE
,
NULL
,
FALS
E
NULL
,
TRU
E
};
static
int
str_eq_wa
(
LPCWSTR
strw
,
const
char
*
stra
)
...
...
@@ -315,7 +315,7 @@ static void test_hash(IHTMLLocation *loc, const struct location_test *test)
test
->
name
,
E_POINTER
,
hres
);
hres
=
IHTMLLocation_get_hash
(
loc
,
&
str
);
todo_wine
ok
(
hres
==
S_OK
,
"%s: get_hash failed: 0x%08x
\n
"
,
test
->
name
,
hres
);
ok
(
hres
==
S_OK
,
"%s: get_hash failed: 0x%08x
\n
"
,
test
->
name
,
hres
);
if
(
hres
==
S_OK
){
if
(
test
->
hash_ok
)
ok
(
str_eq_wa
(
str
,
test
->
hash
),
...
...
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