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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
htmldoc.c
dlls/mshtml/htmldoc.c
+15
-11
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)
...
@@ -1957,6 +1957,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
{
{
HTMLDocumentObj
*
doc
;
HTMLDocumentObj
*
doc
;
nsIDOMWindow
*
nswindow
=
NULL
;
nsIDOMWindow
*
nswindow
=
NULL
;
nsresult
nsres
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"(%p %s %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppvObject
);
TRACE
(
"(%p %s %p)
\n
"
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppvObject
);
...
@@ -1972,23 +1973,26 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
...
@@ -1972,23 +1973,26 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
doc
->
ref
=
1
;
doc
->
ref
=
1
;
doc
->
basedoc
.
doc_obj
=
doc
;
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
);
hres
=
htmldoc_query_interface
(
&
doc
->
basedoc
,
riid
,
ppvObject
);
htmldoc_release
(
&
doc
->
basedoc
);
htmldoc_release
(
&
doc
->
basedoc
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
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
);
nsres
=
nsIWebBrowser_GetContentDOMWindow
(
doc
->
nscontainer
->
webbrowser
,
&
nswindow
);
if
(
NS_FAILED
(
nsres
))
if
(
NS_FAILED
(
nsres
))
ERR
(
"GetContentDOMWindow failed: %08x
\n
"
,
nsres
);
ERR
(
"GetContentDOMWindow failed: %08x
\n
"
,
nsres
);
}
hres
=
HTMLWindow_Create
(
doc
,
nswindow
,
NULL
/* FIXME */
,
&
doc
->
basedoc
.
window
);
hres
=
HTMLWindow_Create
(
doc
,
nswindow
,
NULL
/* FIXME */
,
&
doc
->
basedoc
.
window
);
if
(
nswindow
)
if
(
nswindow
)
...
...
dlls/mshtml/tests/dom.c
View file @
8a860e4c
...
@@ -438,6 +438,8 @@ static IHTMLDocument2 *create_document(void)
...
@@ -438,6 +438,8 @@ static IHTMLDocument2 *create_document(void)
hres
=
CoCreateInstance
(
&
CLSID_HTMLDocument
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
hres
=
CoCreateInstance
(
&
CLSID_HTMLDocument
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IHTMLDocument2
,
(
void
**
)
&
doc
);
&
IID_IHTMLDocument2
,
(
void
**
)
&
doc
);
ok
(
hres
==
S_OK
,
"CoCreateInstance failed: %08x
\n
"
,
hres
);
ok
(
hres
==
S_OK
,
"CoCreateInstance failed: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
NULL
;
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IHTMLDocument5
,
(
void
**
)
&
doc5
);
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IHTMLDocument5
,
(
void
**
)
&
doc5
);
if
(
FAILED
(
hres
))
{
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