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
8a860e4c
Commit
8a860e4c
authored
Oct 25, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fail to create HTMLDocument if Gecko is not available.
parent
125c5645
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
htmldoc.c
dlls/mshtml/htmldoc.c
+12
-8
dom.c
dlls/mshtml/tests/dom.c
+2
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
8a860e4c
...
...
@@ -1957,6 +1957,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
{
HTMLDocumentObj
*
doc
;
nsIDOMWindow
*
nswindow
=
NULL
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p %s %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppvObject
);
...
...
@@ -1972,23 +1973,26 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
doc
->
ref
=
1
;
doc
->
basedoc
.
doc_obj
=
doc
;
list_init
(
&
doc
->
bindings
);
doc
->
usermode
=
UNKNOWN_USERMODE
;
doc
->
readystate
=
READYSTATE_UNINITIALIZED
;
doc
->
nscontainer
=
NSContainer_Create
(
doc
,
NULL
);
if
(
!
doc
->
nscontainer
)
{
ERR
(
"Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE
\n
"
);
htmldoc_release
(
&
doc
->
basedoc
);
return
CLASS_E_CLASSNOTAVAILABLE
;
}
hres
=
htmldoc_query_interface
(
&
doc
->
basedoc
,
riid
,
ppvObject
);
htmldoc_release
(
&
doc
->
basedoc
);
if
(
FAILED
(
hres
))
return
hres
;
doc
->
nscontainer
=
NSContainer_Create
(
doc
,
NULL
);
list_init
(
&
doc
->
bindings
);
doc
->
usermode
=
UNKNOWN_USERMODE
;
doc
->
readystate
=
READYSTATE_UNINITIALIZED
;
if
(
doc
->
nscontainer
)
{
nsresult
nsres
;
nsres
=
nsIWebBrowser_GetContentDOMWindow
(
doc
->
nscontainer
->
webbrowser
,
&
nswindow
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetContentDOMWindow failed: %08x
\n
"
,
nsres
);
}
hres
=
HTMLWindow_Create
(
doc
,
nswindow
,
NULL
/* FIXME */
,
&
doc
->
basedoc
.
window
);
if
(
nswindow
)
...
...
dlls/mshtml/tests/dom.c
View file @
8a860e4c
...
...
@@ -438,6 +438,8 @@ static IHTMLDocument2 *create_document(void)
hres
=
CoCreateInstance
(
&
CLSID_HTMLDocument
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IHTMLDocument2
,
(
void
**
)
&
doc
);
ok
(
hres
==
S_OK
,
"CoCreateInstance failed: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
NULL
;
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IHTMLDocument5
,
(
void
**
)
&
doc5
);
if
(
FAILED
(
hres
))
{
...
...
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