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
8fce0286
Commit
8fce0286
authored
May 31, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
May 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDispatchEx support to HTMLMimeTypesCollection object.
parent
aa29f5e0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
8 deletions
+46
-8
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
omnavigator.c
dlls/mshtml/omnavigator.c
+24
-8
dom.c
dlls/mshtml/tests/dom.c
+21
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
8fce0286
...
...
@@ -138,6 +138,7 @@ typedef struct event_target_t event_target_t;
XIID(IHTMLImgElement) \
XIID(IHTMLInputElement) \
XIID(IHTMLLocation) \
XIID(IHTMLMimeTypesCollection) \
XIID(IHTMLObjectElement) \
XIID(IHTMLOptionElement) \
XIID(IHTMLPluginsCollection) \
...
...
dlls/mshtml/omnavigator.c
View file @
8fce0286
...
...
@@ -199,6 +199,7 @@ static HRESULT create_plugins_collection(OmNavigator *navigator, HTMLPluginsColl
}
struct
HTMLMimeTypesCollection
{
DispatchEx
dispex
;
IHTMLMimeTypesCollection
IHTMLMimeTypesCollection_iface
;
LONG
ref
;
...
...
@@ -221,6 +222,8 @@ static HRESULT WINAPI HTMLMimeTypesCollection_QueryInterface(IHTMLMimeTypesColle
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLMimeTypesCollection
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLMimeTypesCollection %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IHTMLMimeTypesCollection_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
*
ppv
=
NULL
;
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
...
...
@@ -251,6 +254,7 @@ static ULONG WINAPI HTMLMimeTypesCollection_Release(IHTMLMimeTypesCollection *if
if
(
!
ref
)
{
if
(
This
->
navigator
)
This
->
navigator
->
mime_types
=
NULL
;
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
}
...
...
@@ -260,24 +264,22 @@ static ULONG WINAPI HTMLMimeTypesCollection_Release(IHTMLMimeTypesCollection *if
static
HRESULT
WINAPI
HTMLMimeTypesCollection_GetTypeInfoCount
(
IHTMLMimeTypesCollection
*
iface
,
UINT
*
pctinfo
)
{
HTMLMimeTypesCollection
*
This
=
impl_from_IHTMLMimeTypesCollection
(
iface
);
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
HTMLMimeTypesCollection_GetTypeInfo
(
IHTMLMimeTypesCollection
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLMimeTypesCollection
*
This
=
impl_from_IHTMLMimeTypesCollection
(
iface
);
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
return
IDispatchEx_GetTypeInfo
(
&
This
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
HTMLMimeTypesCollection_GetIDsOfNames
(
IHTMLMimeTypesCollection
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLMimeTypesCollection
*
This
=
impl_from_IHTMLMimeTypesCollection
(
iface
);
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
return
IDispatchEx_GetIDsOfNames
(
&
This
->
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
)
;
}
static
HRESULT
WINAPI
HTMLMimeTypesCollection_Invoke
(
IHTMLMimeTypesCollection
*
iface
,
DISPID
dispIdMember
,
...
...
@@ -285,8 +287,8 @@ static HRESULT WINAPI HTMLMimeTypesCollection_Invoke(IHTMLMimeTypesCollection *i
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLMimeTypesCollection
*
This
=
impl_from_IHTMLMimeTypesCollection
(
iface
);
FIXME
(
"%p
\n
"
,
This
);
return
E_NOTIMPL
;
return
IDispatchEx_Invoke
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
)
;
}
static
HRESULT
WINAPI
HTMLMimeTypesCollection_get_length
(
IHTMLMimeTypesCollection
*
iface
,
LONG
*
p
)
...
...
@@ -307,6 +309,17 @@ static const IHTMLMimeTypesCollectionVtbl HTMLMimeTypesCollectionVtbl = {
HTMLMimeTypesCollection_get_length
};
static
const
tid_t
HTMLMimeTypesCollection_iface_tids
[]
=
{
IHTMLMimeTypesCollection_tid
,
0
};
static
dispex_static_data_t
HTMLMimeTypesCollection_dispex
=
{
NULL
,
IHTMLMimeTypesCollection_tid
,
NULL
,
HTMLMimeTypesCollection_iface_tids
};
static
HRESULT
create_mime_types_collection
(
OmNavigator
*
navigator
,
HTMLMimeTypesCollection
**
ret
)
{
HTMLMimeTypesCollection
*
col
;
...
...
@@ -319,6 +332,9 @@ static HRESULT create_mime_types_collection(OmNavigator *navigator, HTMLMimeType
col
->
ref
=
1
;
col
->
navigator
=
navigator
;
init_dispex
(
&
col
->
dispex
,
(
IUnknown
*
)
&
col
->
IHTMLMimeTypesCollection_iface
,
&
HTMLMimeTypesCollection_dispex
);
*
ret
=
col
;
return
S_OK
;
}
...
...
dlls/mshtml/tests/dom.c
View file @
8fce0286
...
...
@@ -3827,6 +3827,26 @@ static void test_plugins_col(IOmNavigator *nav)
ok
(
!
ref
,
"ref=%d
\n
"
,
ref
);
}
static
void
test_mime_types_col
(
IOmNavigator
*
nav
)
{
IHTMLMimeTypesCollection
*
col
,
*
col2
;
ULONG
ref
;
HRESULT
hres
;
hres
=
IOmNavigator_get_mimeTypes
(
nav
,
&
col
);
ok
(
hres
==
S_OK
,
"get_mimeTypes failed: %08x
\n
"
,
hres
);
hres
=
IOmNavigator_get_mimeTypes
(
nav
,
&
col2
);
ok
(
hres
==
S_OK
,
"get_mimeTypes failed: %08x
\n
"
,
hres
);
ok
(
iface_cmp
((
IUnknown
*
)
col
,
(
IUnknown
*
)
col2
),
"col != col2
\n
"
);
IHTMLMimeTypesCollection_Release
(
col2
);
test_disp
((
IUnknown
*
)
col
,
&
IID_IHTMLMimeTypesCollection
,
"[object]"
);
ref
=
IHTMLMimeTypesCollection_Release
(
col
);
ok
(
!
ref
,
"ref=%d
\n
"
,
ref
);
}
static
void
test_navigator
(
IHTMLDocument2
*
doc
)
{
IHTMLWindow2
*
window
;
...
...
@@ -3914,6 +3934,7 @@ static void test_navigator(IHTMLDocument2 *doc)
}
test_plugins_col
(
navigator
);
test_mime_types_col
(
navigator
);
ref
=
IOmNavigator_Release
(
navigator
);
ok
(
!
ref
,
"navigator should be destroyed here
\n
"
);
...
...
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