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
b1a9b4fd
Commit
b1a9b4fd
authored
Oct 02, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use document.defaultView to get iframe contentWindow.
parent
d3a3af75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
htmliframe.c
dlls/mshtml/htmliframe.c
+37
-3
No files found.
dlls/mshtml/htmliframe.c
View file @
b1a9b4fd
...
...
@@ -43,6 +43,40 @@ typedef struct {
#define HTMLFRAMEBASE2(x) (&(x)->lpIHTMLFrameBase2Vtbl)
static
HRESULT
create_content_window
(
HTMLIFrame
*
This
,
nsIDOMHTMLDocument
*
nsdoc
,
HTMLWindow
**
ret
)
{
nsIDOMDocumentView
*
nsdocview
;
nsIDOMAbstractView
*
nsview
;
nsIDOMWindow
*
nswindow
;
nsresult
nsres
;
HRESULT
hres
;
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMDocumentView
,
(
void
**
)
&
nsdocview
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMDocumentView: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMDocumentView_GetDefaultView
(
nsdocview
,
&
nsview
);
nsIDOMDocumentView_Release
(
nsdocview
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDefaultView failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
nsres
=
nsIDOMAbstractView_QueryInterface
(
nsview
,
&
IID_nsIDOMWindow
,
(
void
**
)
&
nswindow
);
nsIDOMAbstractView_Release
(
nsview
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Coult not get nsIDOMWindow iface: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
hres
=
HTMLWindow_Create
(
This
->
element
.
node
.
doc
->
basedoc
.
doc_obj
,
nswindow
,
ret
);
nsIDOMWindow_Release
(
nswindow
);
return
hres
;
}
#define HTMLFRAMEBASE2_THIS(iface) DEFINE_THIS(HTMLIFrame, IHTMLFrameBase2, iface)
static
HRESULT
WINAPI
HTMLIFrameBase2_QueryInterface
(
IHTMLFrameBase2
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -130,10 +164,10 @@ static HRESULT WINAPI HTMLIFrameBase2_get_contentWindow(IHTMLFrameBase2 *iface,
return
E_FAIL
;
}
hres
=
HTMLWindow_Create
(
This
->
element
.
node
.
doc
->
basedoc
.
doc_obj
,
NULL
,
&
window
);
hres
=
create_content_window
(
This
,
nshtmldoc
,
&
window
);
if
(
FAILED
(
hres
))
{
nsIDOM
Document_Release
(
ns
doc
);
return
hres
;
nsIDOM
HTMLDocument_Release
(
nshtml
doc
);
return
E_FAIL
;
}
hres
=
create_doc_from_nsdoc
(
nshtmldoc
,
This
->
element
.
node
.
doc
->
basedoc
.
doc_obj
,
window
,
&
content_doc
);
...
...
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