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
c4e6f044
Commit
c4e6f044
authored
Nov 07, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement HTMLLocation_put_hash.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
b1fd8dae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
htmllocation.c
dlls/mshtml/htmllocation.c
+23
-2
documentmode.js
dlls/mshtml/tests/documentmode.js
+12
-0
No files found.
dlls/mshtml/htmllocation.c
View file @
c4e6f044
...
...
@@ -524,8 +524,29 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
static
HRESULT
WINAPI
HTMLLocation_put_hash
(
IHTMLLocation
*
iface
,
BSTR
v
)
{
HTMLLocation
*
This
=
impl_from_IHTMLLocation
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
WCHAR
*
hash
=
v
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
window
||
!
This
->
window
->
base
.
outer_window
)
{
FIXME
(
"No window available
\n
"
);
return
E_FAIL
;
}
if
(
hash
[
0
]
!=
'#'
)
{
unsigned
size
=
(
1
/* # */
+
wcslen
(
v
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
!
(
hash
=
heap_alloc
(
size
)))
return
E_OUTOFMEMORY
;
hash
[
0
]
=
'#'
;
memcpy
(
hash
+
1
,
v
,
size
-
sizeof
(
WCHAR
));
}
hres
=
navigate_url
(
This
->
window
->
base
.
outer_window
,
hash
,
This
->
window
->
base
.
outer_window
->
uri
,
BINDING_NAVIGATED
);
if
(
hash
!=
v
)
heap_free
(
hash
);
return
hres
;
}
static
HRESULT
WINAPI
HTMLLocation_get_hash
(
IHTMLLocation
*
iface
,
BSTR
*
p
)
...
...
dlls/mshtml/tests/documentmode.js
View file @
c4e6f044
...
...
@@ -895,6 +895,18 @@ async_test("script_load", function() {
external
.
writeStream
(
"simple"
,
"ready_states += 'exec,';"
);
});
sync_test
(
"location"
,
function
()
{
document
.
body
.
innerHTML
=
'<a name="testanchor">test</a>'
;
ok
(
location
.
hash
===
""
,
"initial location.hash = "
+
location
.
hash
);
location
.
hash
=
"TestAnchor"
;
ok
(
location
.
hash
===
"#TestAnchor"
,
"location.hash after set to TestAnchor = "
+
location
.
hash
);
location
.
hash
=
"##foo"
;
ok
(
location
.
hash
===
"##foo"
,
"location.hash after set to ##foo = "
+
location
.
hash
);
location
.
hash
=
"#testanchor"
;
ok
(
location
.
hash
===
"#testanchor"
,
"location.hash after set to #testanchor = "
+
location
.
hash
);
});
sync_test
(
"navigator"
,
function
()
{
var
v
=
document
.
documentMode
,
re
;
var
app
=
navigator
.
appVersion
;
...
...
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