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
93740566
Commit
93740566
authored
Mar 20, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLSelectionObject2 stub implementation.
parent
88edfb57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
1 deletion
+103
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
selection.c
dlls/mshtml/selection.c
+92
-1
dom.c
dlls/mshtml/tests/dom.c
+10
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
93740566
...
...
@@ -177,6 +177,7 @@ typedef struct event_target_t event_target_t;
XIID(IHTMLScriptElement) \
XIID(IHTMLSelectElement) \
XIID(IHTMLSelectionObject) \
XIID(IHTMLSelectionObject2) \
XIID(IHTMLStorage) \
XIID(IHTMLStyle) \
XIID(IHTMLStyle2) \
...
...
dlls/mshtml/selection.c
View file @
93740566
...
...
@@ -34,6 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef
struct
{
DispatchEx
dispex
;
IHTMLSelectionObject
IHTMLSelectionObject_iface
;
IHTMLSelectionObject2
IHTMLSelectionObject2_iface
;
LONG
ref
;
...
...
@@ -61,6 +62,8 @@ static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *i
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLSelectionObject
,
riid
))
{
*
ppv
=
&
This
->
IHTMLSelectionObject_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLSelectionObject2
,
riid
))
{
*
ppv
=
&
This
->
IHTMLSelectionObject2_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
...
...
@@ -234,13 +237,100 @@ static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl = {
HTMLSelectionObject_get_type
};
static
inline
HTMLSelectionObject
*
impl_from_IHTMLSelectionObject2
(
IHTMLSelectionObject2
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLSelectionObject
,
IHTMLSelectionObject2_iface
);
}
static
HRESULT
WINAPI
HTMLSelectionObject2_QueryInterface
(
IHTMLSelectionObject2
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
return
IHTMLSelectionObject_QueryInterface
(
&
This
->
IHTMLSelectionObject_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
HTMLSelectionObject2_AddRef
(
IHTMLSelectionObject2
*
iface
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
return
IHTMLSelectionObject_AddRef
(
&
This
->
IHTMLSelectionObject_iface
);
}
static
ULONG
WINAPI
HTMLSelectionObject2_Release
(
IHTMLSelectionObject2
*
iface
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
return
IHTMLSelectionObject_Release
(
&
This
->
IHTMLSelectionObject_iface
);
}
static
HRESULT
WINAPI
HTMLSelectionObject2_GetTypeInfoCount
(
IHTMLSelectionObject2
*
iface
,
UINT
*
pctinfo
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
HTMLSelectionObject2_GetTypeInfo
(
IHTMLSelectionObject2
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
HTMLSelectionObject2_GetIDsOfNames
(
IHTMLSelectionObject2
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
return
IDispatchEx_GetIDsOfNames
(
&
This
->
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
static
HRESULT
WINAPI
HTMLSelectionObject2_Invoke
(
IHTMLSelectionObject2
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
return
IDispatchEx_Invoke
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
HTMLSelectionObject2_createRangeCollection
(
IHTMLSelectionObject2
*
iface
,
IDispatch
**
rangeCollection
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
rangeCollection
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLSelectionObject2_get_typeDetail
(
IHTMLSelectionObject2
*
iface
,
BSTR
*
p
)
{
HTMLSelectionObject
*
This
=
impl_from_IHTMLSelectionObject2
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
const
IHTMLSelectionObject2Vtbl
HTMLSelectionObject2Vtbl
=
{
HTMLSelectionObject2_QueryInterface
,
HTMLSelectionObject2_AddRef
,
HTMLSelectionObject2_Release
,
HTMLSelectionObject2_GetTypeInfoCount
,
HTMLSelectionObject2_GetTypeInfo
,
HTMLSelectionObject2_GetIDsOfNames
,
HTMLSelectionObject2_Invoke
,
HTMLSelectionObject2_createRangeCollection
,
HTMLSelectionObject2_get_typeDetail
};
static
const
tid_t
HTMLSelectionObject_iface_tids
[]
=
{
IHTMLSelectionObject_tid
,
IHTMLSelectionObject2_tid
,
0
};
static
dispex_static_data_t
HTMLSelectionObject_dispex
=
{
NULL
,
IHTMLSelectionObject_tid
,
IHTMLSelectionObject_tid
,
/* FIXME: We have a test for that, but it doesn't expose IHTMLSelectionObject2 iface. */
NULL
,
HTMLSelectionObject_iface_tids
};
...
...
@@ -256,6 +346,7 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect
init_dispex
(
&
selection
->
dispex
,
(
IUnknown
*
)
&
selection
->
IHTMLSelectionObject_iface
,
&
HTMLSelectionObject_dispex
);
selection
->
IHTMLSelectionObject_iface
.
lpVtbl
=
&
HTMLSelectionObjectVtbl
;
selection
->
IHTMLSelectionObject2_iface
.
lpVtbl
=
&
HTMLSelectionObject2Vtbl
;
selection
->
ref
=
1
;
selection
->
nsselection
=
nsselection
;
/* We shouldn't call AddRef here */
...
...
dlls/mshtml/tests/dom.c
View file @
93740566
...
...
@@ -430,6 +430,15 @@ static const IID * const img_factory_iids[] = {
NULL
};
static
const
IID
*
const
selection_iids
[]
=
{
&
IID_IUnknown
,
&
IID_IDispatch
,
&
IID_IDispatchEx
,
&
IID_IHTMLSelectionObject
,
&
IID_IHTMLSelectionObject2
,
NULL
};
typedef
struct
{
const
char
*
tag
;
REFIID
*
iids
;
...
...
@@ -5151,6 +5160,7 @@ static void test_txtrange(IHTMLDocument2 *doc)
ok
(
hres
==
S_OK
,
"IHTMLDocument2_get_selection failed: %08x
\n
"
,
hres
);
test_disp
((
IUnknown
*
)
selection
,
&
IID_IHTMLSelectionObject
,
"[object]"
);
test_ifaces
((
IUnknown
*
)
selection
,
selection_iids
);
hres
=
IHTMLSelectionObject_createRange
(
selection
,
&
disp_range
);
ok
(
hres
==
S_OK
,
"IHTMLSelectionObject_createRange failed: %08x
\n
"
,
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