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
a3037ec2
Commit
a3037ec2
authored
Mar 11, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Create top content window in init_browser.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a007de52
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
htmldoc.c
dlls/mshtml/htmldoc.c
+3
-10
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
nsembed.c
dlls/mshtml/nsembed.c
+16
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
a3037ec2
...
...
@@ -5443,9 +5443,7 @@ static dispex_static_data_t HTMLDocumentObj_dispex = {
static
HRESULT
create_document_object
(
BOOL
is_mhtml
,
IUnknown
*
outer
,
REFIID
riid
,
void
**
ppv
)
{
mozIDOMWindowProxy
*
mozwindow
;
HTMLDocumentObj
*
doc
;
nsresult
nsres
;
HRESULT
hres
;
if
(
outer
&&
!
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
...
...
@@ -5492,15 +5490,10 @@ static HRESULT create_document_object(BOOL is_mhtml, IUnknown *outer, REFIID rii
return
hres
;
}
nsres
=
nsIWebBrowser_GetContentDOMWindow
(
doc
->
nscontainer
->
webbrowser
,
&
mozwindow
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetContentDOMWindow failed: %08x
\n
"
,
nsres
);
doc
->
basedoc
.
window
=
doc
->
nscontainer
->
content_window
;
IHTMLWindow2_AddRef
(
&
doc
->
basedoc
.
window
->
base
.
IHTMLWindow2_iface
);
hres
=
create_outer_window
(
doc
->
nscontainer
,
mozwindow
,
NULL
,
&
doc
->
basedoc
.
window
);
if
(
FAILED
(
hres
))
{
htmldoc_release
(
&
doc
->
basedoc
);
return
hres
;
}
doc
->
basedoc
.
window
->
doc_obj
=
doc
;
if
(
!
doc
->
basedoc
.
doc_node
&&
doc
->
basedoc
.
window
->
base
.
inner_window
->
doc
)
{
doc
->
basedoc
.
doc_node
=
doc
->
basedoc
.
window
->
base
.
inner_window
->
doc
;
...
...
dlls/mshtml/mshtml_private.h
View file @
a3037ec2
...
...
@@ -713,6 +713,8 @@ struct GeckoBrowser {
nsIBaseWindow
*
window
;
nsIWebBrowserFocus
*
focus
;
HTMLOuterWindow
*
content_window
;
nsIEditor
*
editor
;
nsIController
*
editor_controller
;
...
...
dlls/mshtml/nsembed.c
View file @
a3037ec2
...
...
@@ -2029,9 +2029,11 @@ static const nsISupportsWeakReferenceVtbl nsSupportsWeakReferenceVtbl = {
static
HRESULT
init_browser
(
GeckoBrowser
*
browser
)
{
mozIDOMWindowProxy
*
mozwindow
;
nsIWebBrowserSetup
*
wbsetup
;
nsIScrollable
*
scrollable
;
nsresult
nsres
;
HRESULT
hres
;
nsres
=
nsIComponentManager_CreateInstanceByContractID
(
pCompMgr
,
NS_WEBBROWSER_CONTRACTID
,
NULL
,
&
IID_nsIWebBrowser
,
(
void
**
)
&
browser
->
webbrowser
);
...
...
@@ -2132,7 +2134,15 @@ static HRESULT init_browser(GeckoBrowser *browser)
ERR
(
"Could not get nsIScrollable: %08x
\n
"
,
nsres
);
}
return
S_OK
;
nsres
=
nsIWebBrowser_GetContentDOMWindow
(
browser
->
webbrowser
,
&
mozwindow
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetContentDOMWindow failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
hres
=
create_outer_window
(
browser
,
mozwindow
,
NULL
,
&
browser
->
content_window
);
mozIDOMWindowProxy_Release
(
mozwindow
);
return
hres
;
}
HRESULT
create_gecko_browser
(
HTMLDocumentObj
*
doc
,
GeckoBrowser
**
_ret
)
...
...
@@ -2174,6 +2184,11 @@ void detach_gecko_browser(GeckoBrowser *This)
This
->
doc
=
NULL
;
if
(
This
->
content_window
)
{
IHTMLWindow2_Release
(
&
This
->
content_window
->
base
.
IHTMLWindow2_iface
);
This
->
content_window
=
NULL
;
}
while
(
!
list_empty
(
&
This
->
document_nodes
))
{
HTMLDocumentNode
*
doc
=
LIST_ENTRY
(
list_head
(
&
This
->
document_nodes
),
HTMLDocumentNode
,
browser_entry
);
list_remove
(
&
doc
->
browser_entry
);
...
...
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