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
4418f928
Commit
4418f928
authored
Oct 20, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Oct 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Return proper errors when navigating with no browser.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
110dad9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-1
navigate.c
dlls/mshtml/navigate.c
+3
-0
events.c
dlls/mshtml/tests/events.c
+20
-1
No files found.
dlls/mshtml/htmlwindow.c
View file @
4418f928
...
...
@@ -2832,7 +2832,7 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface,
FIXME
(
"unimplemented flags %lx
\n
"
,
flags
&
~
2
);
if
(
!
window
||
!
window
->
browser
)
return
E_
UNEXPECTED
;
return
E_
FAIL
;
if
(
window
->
browser
->
doc
->
hostui
)
{
hres
=
IDocHostUIHandler_TranslateUrl
(
window
->
browser
->
doc
->
hostui
,
0
,
url
,
&
translated_url
);
...
...
dlls/mshtml/navigate.c
View file @
4418f928
...
...
@@ -2679,6 +2679,9 @@ HRESULT navigate_url(HTMLOuterWindow *window, const WCHAR *new_url, IUri *base_u
BSTR
display_uri
;
HRESULT
hres
;
if
(
!
window
->
browser
)
return
E_UNEXPECTED
;
if
(
new_url
&&
base_uri
)
hres
=
CoInternetCombineUrlEx
(
base_uri
,
new_url
,
URL_ESCAPE_SPACES_ONLY
|
URL_DONT_ESCAPE_EXTRA_INFO
,
&
nav_uri
,
0
);
...
...
dlls/mshtml/tests/events.c
View file @
4418f928
...
...
@@ -6003,12 +6003,13 @@ static void test_document_close(void)
{
IHTMLPrivateWindow
*
priv_window
;
IHTMLDocument2
*
doc
,
*
doc_node
;
IHTMLLocation
*
location
;
IHTMLDocument3
*
doc3
;
IHTMLElement
*
elem
;
DWORD
cookie
;
BSTR
bstr
,
bstr2
;
HRESULT
hres
;
VARIANT
v
;
BSTR
bstr
;
LONG
ref
;
MSG
msg
;
...
...
@@ -6091,6 +6092,24 @@ static void test_document_close(void)
IHTMLDocument2_Release
(
doc_node
);
IHTMLDocument2_Release
(
doc
);
bstr
=
SysAllocString
(
L"about:blank"
);
hres
=
IHTMLWindow2_get_location
(
window
,
&
location
);
ok
(
hres
==
S_OK
,
"get_location failed: %08lx
\n
"
,
hres
);
hres
=
IHTMLLocation_put_href
(
location
,
bstr
);
ok
(
hres
==
E_UNEXPECTED
||
broken
(
hres
==
E_ABORT
),
"put_href returned: %08lx
\n
"
,
hres
);
IHTMLLocation_Release
(
location
);
V_VT
(
&
v
)
=
VT_EMPTY
;
bstr2
=
SysAllocString
(
L""
);
hres
=
IHTMLWindow2_QueryInterface
(
window
,
&
IID_IHTMLPrivateWindow
,
(
void
**
)
&
priv_window
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLPrivateWindow) interface: %08lx
\n
"
,
hres
);
hres
=
IHTMLPrivateWindow_SuperNavigate
(
priv_window
,
bstr
,
bstr2
,
NULL
,
NULL
,
&
v
,
&
v
,
0
);
ok
(
hres
==
E_FAIL
,
"SuperNavigate returned: %08lx
\n
"
,
hres
);
IHTMLPrivateWindow_Release
(
priv_window
);
SysFreeString
(
bstr2
);
SysFreeString
(
bstr
);
IHTMLWindow2_Release
(
window
);
window
=
NULL
;
...
...
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