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
b84bc52b
Commit
b84bc52b
authored
Nov 11, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added support for IDispatchEx to HTMLSelectionObject object.
parent
dcfa250c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
21 deletions
+38
-21
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
selection.c
dlls/mshtml/selection.c
+35
-21
dom.c
dlls/mshtml/tests/dom.c
+2
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
b84bc52b
...
...
@@ -174,6 +174,7 @@ typedef struct event_target_t event_target_t;
XIID(IHTMLScreen) \
XIID(IHTMLScriptElement) \
XIID(IHTMLSelectElement) \
XIID(IHTMLSelectionObject) \
XIID(IHTMLStorage) \
XIID(IHTMLStyle) \
XIID(IHTMLStyle2) \
...
...
dlls/mshtml/selection.c
View file @
b84bc52b
...
...
@@ -32,6 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mshtml
);
typedef
struct
{
DispatchEx
dispex
;
IHTMLSelectionObject
IHTMLSelectionObject_iface
;
LONG
ref
;
...
...
@@ -52,26 +53,24 @@ static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *i
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
*
ppv
=
NULL
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
)
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLSelectionObject
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IHTMLSelectionObject_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
);
return
E_NOINTERFACE
;
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
HTMLSelectionObject_AddRef
(
IHTMLSelectionObject
*
iface
)
...
...
@@ -96,6 +95,7 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
nsISelection_Release
(
This
->
nsselection
);
if
(
This
->
doc
)
list_remove
(
&
This
->
entry
);
release_dispex
(
&
This
->
dispex
);
heap_free
(
This
);
}
...
...
@@ -105,16 +105,16 @@ static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
static
HRESULT
WINAPI
HTMLSelectionObject_GetTypeInfoCount
(
IHTMLSelectionObject
*
iface
,
UINT
*
pctinfo
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
return
E_NOTIMPL
;
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
dispex
.
IDispatchEx_iface
,
pctinfo
)
;
}
static
HRESULT
WINAPI
HTMLSelectionObject_GetTypeInfo
(
IHTMLSelectionObject
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
return
IDispatchEx_GetTypeInfo
(
&
This
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
)
;
}
static
HRESULT
WINAPI
HTMLSelectionObject_GetIDsOfNames
(
IHTMLSelectionObject
*
iface
,
REFIID
riid
,
...
...
@@ -122,9 +122,9 @@ static HRESULT WINAPI HTMLSelectionObject_GetIDsOfNames(IHTMLSelectionObject *if
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
return
E_NOTIMPL
;
return
IDispatchEx_GetIDsOfNames
(
&
This
->
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
)
;
}
static
HRESULT
WINAPI
HTMLSelectionObject_Invoke
(
IHTMLSelectionObject
*
iface
,
DISPID
dispIdMember
,
...
...
@@ -132,9 +132,10 @@ static HRESULT WINAPI HTMLSelectionObject_Invoke(IHTMLSelectionObject *iface, DI
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject
(
iface
);
FIXME
(
"(%p)->(%d %s %d %d %p %p %p %p)
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
return
E_NOTIMPL
;
return
IDispatchEx_Invoke
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
HTMLSelectionObject_createRange
(
IHTMLSelectionObject
*
iface
,
IDispatch
**
range
)
...
...
@@ -233,6 +234,17 @@ static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl = {
HTMLSelectionObject_get_type
};
static
const
tid_t
HTMLSelectionObject_iface_tids
[]
=
{
IHTMLSelectionObject_tid
,
0
};
static
dispex_static_data_t
HTMLSelectionObject_dispex
=
{
NULL
,
IHTMLSelectionObject_tid
,
NULL
,
HTMLSelectionObject_iface_tids
};
HRESULT
HTMLSelectionObject_Create
(
HTMLDocumentNode
*
doc
,
nsISelection
*
nsselection
,
IHTMLSelectionObject
**
ret
)
{
HTMLSelectionObject
*
selection
;
...
...
@@ -241,6 +253,8 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect
if
(
!
selection
)
return
E_OUTOFMEMORY
;
init_dispex
(
&
selection
->
dispex
,
(
IUnknown
*
)
&
selection
->
IHTMLSelectionObject_iface
,
&
HTMLSelectionObject_dispex
);
selection
->
IHTMLSelectionObject_iface
.
lpVtbl
=
&
HTMLSelectionObjectVtbl
;
selection
->
ref
=
1
;
selection
->
nsselection
=
nsselection
;
/* We shouldn't call AddRef here */
...
...
dlls/mshtml/tests/dom.c
View file @
b84bc52b
...
...
@@ -4975,6 +4975,8 @@ static void test_txtrange(IHTMLDocument2 *doc)
hres
=
IHTMLDocument2_get_selection
(
doc
,
&
selection
);
ok
(
hres
==
S_OK
,
"IHTMLDocument2_get_selection failed: %08x
\n
"
,
hres
);
test_disp
((
IUnknown
*
)
selection
,
&
IID_IHTMLSelectionObject
,
"[object]"
);
hres
=
IHTMLSelectionObject_createRange
(
selection
,
&
disp_range
);
ok
(
hres
==
S_OK
,
"IHTMLSelectionObject_createRange failed: %08x
\n
"
,
hres
);
IHTMLSelectionObject_Release
(
selection
);
...
...
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