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
d4aee460
Commit
d4aee460
authored
Dec 05, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Dec 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Return failure in IHTMLDocument2::domain for detached documents.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
2e77a62f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
htmldoc.c
dlls/mshtml/htmldoc.c
+3
-3
navigation.js
dlls/mshtml/tests/navigation.js
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
d4aee460
...
...
@@ -1160,12 +1160,12 @@ static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p)
return
E_NOTIMPL
;
}
if
(
This
->
outer_window
&&
!
This
->
outer_window
->
uri
)
if
(
This
->
window
&&
(
!
This
->
window
->
base
.
outer_window
||
!
This
->
window
->
base
.
outer_window
->
uri
)
)
return
E_FAIL
;
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLDocument_GetDomain
(
This
->
html_document
,
&
nsstr
);
if
(
NS_SUCCEEDED
(
nsres
)
&&
This
->
outer_window
&&
This
->
outer_window
->
uri
)
{
if
(
NS_SUCCEEDED
(
nsres
)
&&
This
->
window
)
{
const
PRUnichar
*
str
;
HRESULT
hres
;
...
...
@@ -1173,7 +1173,7 @@ static HRESULT WINAPI HTMLDocument_get_domain(IHTMLDocument2 *iface, BSTR *p)
if
(
!*
str
)
{
TRACE
(
"Gecko returned empty string, fallback to loaded URL.
\n
"
);
nsAString_Finish
(
&
nsstr
);
hres
=
IUri_GetHost
(
This
->
outer_window
->
uri
,
p
);
hres
=
IUri_GetHost
(
This
->
window
->
base
.
outer_window
->
uri
,
p
);
return
FAILED
(
hres
)
?
hres
:
S_OK
;
}
}
...
...
dlls/mshtml/tests/navigation.js
View file @
d4aee460
...
...
@@ -119,6 +119,7 @@ function detached_iframe_doc() {
expect_exception
(
function
()
{
origDoc
.
onclick
;
},
true
);
expect_exception
(
function
()
{
origDoc
.
toString
;
},
true
);
expect_exception
(
function
()
{
origDoc
.
toString
();
},
true
);
expect_exception
(
function
()
{
origDoc
.
domain
;
});
expect_exception
(
function
()
{
origDoc
.
frames
;
});
expect_exception
(
function
()
{
origDoc
.
readyState
;
},
true
);
expect_exception
(
function
()
{
origDoc
.
URL
;
});
...
...
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