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
35ebf675
Commit
35ebf675
authored
Oct 11, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDocumentEvent stub implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
131397e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
0 deletions
+89
-0
htmldoc.c
dlls/mshtml/htmldoc.c
+73
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
events.c
dlls/mshtml/tests/events.c
+15
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
35ebf675
...
...
@@ -4300,6 +4300,76 @@ static const IDocumentSelectorVtbl DocumentSelectorVtbl = {
DocumentSelector_querySelectorAll
};
static
inline
HTMLDocument
*
impl_from_IDocumentEvent
(
IDocumentEvent
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocument
,
IDocumentEvent_iface
);
}
static
HRESULT
WINAPI
DocumentEvent_QueryInterface
(
IDocumentEvent
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
return
htmldoc_query_interface
(
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
DocumentEvent_AddRef
(
IDocumentEvent
*
iface
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
return
htmldoc_addref
(
This
);
}
static
ULONG
WINAPI
DocumentEvent_Release
(
IDocumentEvent
*
iface
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
return
htmldoc_release
(
This
);
}
static
HRESULT
WINAPI
DocumentEvent_GetTypeInfoCount
(
IDocumentEvent
*
iface
,
UINT
*
pctinfo
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
DocumentEvent_GetTypeInfo
(
IDocumentEvent
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
DocumentEvent_GetIDsOfNames
(
IDocumentEvent
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
return
IDispatchEx_GetIDsOfNames
(
&
This
->
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
static
HRESULT
WINAPI
DocumentEvent_Invoke
(
IDocumentEvent
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
return
IDispatchEx_Invoke
(
&
This
->
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
DocumentEvent_createEvent
(
IDocumentEvent
*
iface
,
BSTR
eventType
,
IDOMEvent
**
p
)
{
HTMLDocument
*
This
=
impl_from_IDocumentEvent
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
eventType
),
p
);
return
E_NOTIMPL
;
}
static
const
IDocumentEventVtbl
DocumentEventVtbl
=
{
DocumentEvent_QueryInterface
,
DocumentEvent_AddRef
,
DocumentEvent_Release
,
DocumentEvent_GetTypeInfoCount
,
DocumentEvent_GetTypeInfo
,
DocumentEvent_GetIDsOfNames
,
DocumentEvent_Invoke
,
DocumentEvent_createEvent
};
static
void
HTMLDocument_on_advise
(
IUnknown
*
iface
,
cp_static_data_t
*
cp
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
((
IHTMLDocument2
*
)
iface
);
...
...
@@ -4652,6 +4722,8 @@ static BOOL htmldoc_qi(HTMLDocument *This, REFIID riid, void **ppv)
*
ppv
=
&
This
->
IHTMLDocument7_iface
;
else
if
(
IsEqualGUID
(
&
IID_IDocumentSelector
,
riid
))
*
ppv
=
&
This
->
IDocumentSelector_iface
;
else
if
(
IsEqualGUID
(
&
IID_IDocumentEvent
,
riid
))
*
ppv
=
&
This
->
IDocumentEvent_iface
;
else
if
(
IsEqualGUID
(
&
IID_IPersist
,
riid
))
*
ppv
=
&
This
->
IPersistFile_iface
;
else
if
(
IsEqualGUID
(
&
IID_IPersistMoniker
,
riid
))
...
...
@@ -4754,6 +4826,7 @@ static void init_doc(HTMLDocument *doc, IUnknown *outer, IDispatchEx *dispex)
doc
->
IHTMLDocument7_iface
.
lpVtbl
=
&
HTMLDocument7Vtbl
;
doc
->
IDispatchEx_iface
.
lpVtbl
=
&
DocDispatchExVtbl
;
doc
->
IDocumentSelector_iface
.
lpVtbl
=
&
DocumentSelectorVtbl
;
doc
->
IDocumentEvent_iface
.
lpVtbl
=
&
DocumentEventVtbl
;
doc
->
ISupportErrorInfo_iface
.
lpVtbl
=
&
SupportErrorInfoVtbl
;
doc
->
IProvideMultipleClassInfo_iface
.
lpVtbl
=
&
ProvideMultipleClassInfoVtbl
;
...
...
dlls/mshtml/mshtml_private.h
View file @
35ebf675
...
...
@@ -572,6 +572,7 @@ struct HTMLDocument {
IHTMLDocument6
IHTMLDocument6_iface
;
IHTMLDocument7
IHTMLDocument7_iface
;
IDocumentSelector
IDocumentSelector_iface
;
IDocumentEvent
IDocumentEvent_iface
;
IPersistMoniker
IPersistMoniker_iface
;
IPersistFile
IPersistFile_iface
;
IPersistHistory
IPersistHistory_iface
;
...
...
dlls/mshtml/tests/events.c
View file @
35ebf675
...
...
@@ -2530,6 +2530,19 @@ static void test_iframe_connections(IHTMLDocument2 *doc)
IHTMLDocument2_Release
(
iframes_doc
);
}
static
void
test_create_event
(
IHTMLDocument2
*
doc
)
{
IDocumentEvent
*
doc_event
;
HRESULT
hres
;
trace
(
"createEvent tests...
\n
"
);
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IDocumentEvent
,
(
void
**
)
&
doc_event
);
ok
(
hres
==
S_OK
,
"Could not get IDocumentEvent iface: %08x
\n
"
,
hres
);
IDocumentEvent_Release
(
doc_event
);
}
static
HRESULT
QueryInterface
(
REFIID
,
void
**
);
static
HRESULT
WINAPI
InPlaceFrame_QueryInterface
(
IOleInPlaceFrame
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -3201,6 +3214,8 @@ START_TEST(events)
run_test
(
empty_doc_str
,
test_submit
);
run_test
(
empty_doc_ie9_str
,
test_submit
);
run_test
(
iframe_doc_str
,
test_iframe_connections
);
if
(
is_ie9plus
)
run_test
(
empty_doc_ie9_str
,
test_create_event
);
test_empty_document
();
...
...
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