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
cb14ca2a
Commit
cb14ca2a
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::documentElement for detached documents.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
1f051768
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
htmldoc.c
dlls/mshtml/htmldoc.c
+7
-3
navigation.js
dlls/mshtml/tests/navigation.js
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
cb14ca2a
...
...
@@ -2364,9 +2364,13 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
outer_window
&&
This
->
outer_window
->
readystate
==
READYSTATE_UNINITIALIZED
)
{
*
p
=
NULL
;
return
S_OK
;
if
(
This
->
window
)
{
if
(
!
This
->
window
->
base
.
outer_window
)
return
E_FAIL
;
if
(
This
->
window
->
base
.
outer_window
->
readystate
==
READYSTATE_UNINITIALIZED
)
{
*
p
=
NULL
;
return
S_OK
;
}
}
if
(
!
This
->
dom_document
)
{
...
...
dlls/mshtml/tests/navigation.js
View file @
cb14ca2a
...
...
@@ -121,6 +121,7 @@ function detached_iframe_doc() {
expect_exception
(
function
()
{
origDoc
.
toString
();
},
true
);
expect_exception
(
function
()
{
origDoc
.
cookie
;
});
expect_exception
(
function
()
{
origDoc
.
cookie
=
"test=val"
;
});
expect_exception
(
function
()
{
origDoc
.
documentElement
;
});
expect_exception
(
function
()
{
origDoc
.
domain
;
});
expect_exception
(
function
()
{
origDoc
.
frames
;
});
expect_exception
(
function
()
{
origDoc
.
readyState
;
},
true
);
...
...
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