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
bf2e1f08
Commit
bf2e1f08
authored
Jan 19, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added ISupportErrorInfo for IHTMLDocument.
parent
e985ca06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
1 deletion
+66
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+37
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-1
htmldoc.c
dlls/mshtml/tests/htmldoc.c
+26
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
bf2e1f08
...
...
@@ -129,6 +129,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
}
else
if
(
IsEqualGUID
(
&
DIID_DispHTMLDocument
,
riid
))
{
TRACE
(
"(%p)->(DIID_DispHTMLDocument %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
HTMLDOC
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_ISupportErrorInfo
,
riid
))
{
TRACE
(
"(%p)->(IID_ISupportErrorInfo %p)
\n
"
,
This
,
ppvObject
);
*
ppvObject
=
SUPPERRINFO
(
This
);
}
else
if
(
IsEqualGUID
(
&
CLSID_CMarkup
,
riid
))
{
FIXME
(
"(%p)->(CLSID_CMarkup %p)
\n
"
,
This
,
ppvObject
);
return
E_NOINTERFACE
;
...
...
@@ -1572,6 +1575,39 @@ static const IHTMLDocument2Vtbl HTMLDocumentVtbl = {
HTMLDocument_createStyleSheet
};
#define SUPPINFO_THIS(iface) DEFINE_THIS(HTMLDocument, SupportErrorInfo, iface)
static
HRESULT
WINAPI
SupportErrorInfo_QueryInterface
(
ISupportErrorInfo
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLDocument
*
This
=
SUPPINFO_THIS
(
iface
);
return
IHTMLDocument_QueryInterface
(
HTMLDOC
(
This
),
riid
,
ppv
);
}
static
ULONG
WINAPI
SupportErrorInfo_AddRef
(
ISupportErrorInfo
*
iface
)
{
HTMLDocument
*
This
=
SUPPINFO_THIS
(
iface
);
return
IHTMLDocument_AddRef
(
HTMLDOC
(
This
));
}
static
ULONG
WINAPI
SupportErrorInfo_Release
(
ISupportErrorInfo
*
iface
)
{
HTMLDocument
*
This
=
SUPPINFO_THIS
(
iface
);
return
IHTMLDocument_Release
(
HTMLDOC
(
This
));
}
static
HRESULT
WINAPI
SupportErrorInfo_InterfaceSupportsErrorInfo
(
ISupportErrorInfo
*
iface
,
REFIID
riid
)
{
FIXME
(
"(%p)->(%s)
\n
"
,
iface
,
debugstr_guid
(
riid
));
return
S_FALSE
;
}
static
const
ISupportErrorInfoVtbl
SupportErrorInfoVtbl
=
{
SupportErrorInfo_QueryInterface
,
SupportErrorInfo_AddRef
,
SupportErrorInfo_Release
,
SupportErrorInfo_InterfaceSupportsErrorInfo
};
#define DISPEX_THIS(iface) DEFINE_THIS(HTMLDocument, IDispatchEx, iface)
static
HRESULT
WINAPI
DocDispatchEx_QueryInterface
(
IDispatchEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -1742,6 +1778,7 @@ static HRESULT alloc_doc(HTMLDocument **ret)
doc
=
heap_alloc_zero
(
sizeof
(
HTMLDocument
));
doc
->
lpHTMLDocument2Vtbl
=
&
HTMLDocumentVtbl
;
doc
->
lpIDispatchExVtbl
=
&
DocDispatchExVtbl
;
doc
->
lpSupportErrorInfoVtbl
=
&
SupportErrorInfoVtbl
;
doc
->
ref
=
1
;
doc
->
readystate
=
READYSTATE_UNINITIALIZED
;
doc
->
scriptmode
=
SCRIPTMODE_GECKO
;
...
...
dlls/mshtml/mshtml_private.h
View file @
bf2e1f08
...
...
@@ -238,7 +238,7 @@ struct HTMLDocument {
const
IPersistStreamInitVtbl
*
lpPersistStreamInitVtbl
;
const
ICustomDocVtbl
*
lpCustomDocVtbl
;
const
IDispatchExVtbl
*
lpIDispatchExVtbl
;
const
ISupportErrorInfoVtbl
*
lpSupportErrorInfoVtbl
;
LONG
ref
;
NSContainer
*
nscontainer
;
...
...
@@ -474,6 +474,8 @@ typedef struct {
#define DISPATCHEX(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl)
#define SUPPERRINFO(x) ((ISupportErrorInfo*) &(x)->lpSupportErrorInfoVtbl)
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
...
...
dlls/mshtml/tests/htmldoc.c
View file @
bf2e1f08
...
...
@@ -4135,6 +4135,31 @@ static void gecko_installer_workaround(BOOL disable)
RegCloseKey
(
hkey
);
}
static
void
test_HTMLDoc_ISupportErrorInfo
(
void
)
{
HRESULT
hres
;
IUnknown
*
unk
;
ISupportErrorInfo
*
sinfo
;
LONG
ref
;
hres
=
create_document
(
&
unk
);
if
(
FAILED
(
hres
))
return
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_ISupportErrorInfo
,
(
void
**
)
&
sinfo
);
ok
(
hres
==
S_OK
,
"got %x
\n
"
,
hres
);
ok
(
sinfo
!=
NULL
,
"got %p
\n
"
,
sinfo
);
if
(
sinfo
)
{
hres
=
ISupportErrorInfo_InterfaceSupportsErrorInfo
(
sinfo
,
&
IID_IErrorInfo
);
ok
(
hres
==
S_FALSE
,
"Expected S_OK, got %x
\n
"
,
hres
);
}
IUnknown_Release
(
sinfo
);
ref
=
IUnknown_Release
(
unk
);
ok
(
ref
==
0
,
"ref=%d, expected 0
\n
"
,
ref
);
}
START_TEST
(
htmldoc
)
{
gecko_installer_workaround
(
TRUE
);
...
...
@@ -4151,6 +4176,7 @@ START_TEST(htmldoc)
test_editing_mode
(
FALSE
);
test_editing_mode
(
TRUE
);
}
test_HTMLDoc_ISupportErrorInfo
();
DestroyWindow
(
container_hwnd
);
CoUninitialize
();
...
...
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