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
44dbb88c
Commit
44dbb88c
authored
Mar 10, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLElement7::spellcheck property implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
926d662e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
4 deletions
+74
-4
htmlelem.c
dlls/mshtml/htmlelem.c
+31
-4
dom.c
dlls/mshtml/tests/dom.c
+43
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
44dbb88c
...
...
@@ -5414,15 +5414,42 @@ static HRESULT WINAPI HTMLElement7_get_xmsAcceleratorKey(IHTMLElement7 *iface, B
static
HRESULT
WINAPI
HTMLElement7_put_spellcheck
(
IHTMLElement7
*
iface
,
VARIANT
v
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement7
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
if
(
!
This
->
html_element
)
{
FIXME
(
"non-HTML element
\n
"
);
return
E_NOTIMPL
;
}
if
(
V_VT
(
&
v
)
!=
VT_BOOL
)
{
FIXME
(
"unsupported argument %s
\n
"
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
return
map_nsresult
(
nsIDOMHTMLElement_SetSpellcheck
(
This
->
html_element
,
!!
V_BOOL
(
&
v
)));
}
static
HRESULT
WINAPI
HTMLElement7_get_spellcheck
(
IHTMLElement7
*
iface
,
VARIANT
*
p
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement7
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
cpp_bool
spellcheck
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
html_element
)
{
FIXME
(
"non-HTML element
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLElement_GetSpellcheck
(
This
->
html_element
,
&
spellcheck
);
if
(
NS_FAILED
(
nsres
))
return
map_nsresult
(
nsres
);
V_VT
(
p
)
=
VT_BOOL
;
V_BOOL
(
p
)
=
spellcheck
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement7_put_onmsmanipulationstatechanged
(
IHTMLElement7
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
44dbb88c
...
...
@@ -8369,6 +8369,48 @@ static void test_iframe_elem(IHTMLElement *elem)
IHTMLDocument2_Release
(
content_doc
);
}
static
void
test_elem_spellcheck
(
IHTMLElement
*
iface
)
{
IHTMLElement7
*
elem
;
VARIANT
v
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
iface
,
&
IID_IHTMLElement7
,
(
void
**
)
&
elem
);
if
(
hres
==
E_NOINTERFACE
)
{
win_skip
(
"IHTMLElement7 not supported
\n
"
);
return
;
}
ok
(
hres
==
S_OK
,
"Could not get IHTMLElement7 interface: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLElement7_get_spellcheck
(
elem
,
&
v
);
ok
(
hres
==
S_OK
,
"get_spellcheck failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
&&
!
V_BOOL
(
&
v
),
"spellcheck = %s
\n
"
,
wine_dbgstr_variant
(
&
v
));
V_VT
(
&
v
)
=
VT_BOOL
;
V_BOOL
(
&
v
)
=
VARIANT_TRUE
;
hres
=
IHTMLElement7_put_spellcheck
(
elem
,
v
);
ok
(
hres
==
S_OK
,
"put_spellcheck failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLElement7_get_spellcheck
(
elem
,
&
v
);
ok
(
hres
==
S_OK
,
"get_spellcheck failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
&&
V_BOOL
(
&
v
)
==
VARIANT_TRUE
,
"spellcheck = %s
\n
"
,
wine_dbgstr_variant
(
&
v
));
V_VT
(
&
v
)
=
VT_BOOL
;
V_BOOL
(
&
v
)
=
VARIANT_FALSE
;
hres
=
IHTMLElement7_put_spellcheck
(
elem
,
v
);
ok
(
hres
==
S_OK
,
"put_spellcheck failed: %08x
\n
"
,
hres
);
V_VT
(
&
v
)
=
VT_ERROR
;
hres
=
IHTMLElement7_get_spellcheck
(
elem
,
&
v
);
ok
(
hres
==
S_OK
,
"get_spellcheck failed: %08x
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
&&
!
V_BOOL
(
&
v
),
"spellcheck = %s
\n
"
,
wine_dbgstr_variant
(
&
v
));
IHTMLElement7_Release
(
elem
);
}
#define test_stylesheet_csstext(a,b,c) _test_stylesheet_csstext(__LINE__,a,b,c)
static
void
_test_stylesheet_csstext
(
unsigned
line
,
IHTMLStyleSheet
*
stylesheet
,
const
WCHAR
*
exstr
,
BOOL
is_todo
)
{
...
...
@@ -8981,6 +9023,7 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_client_size
((
IUnknown
*
)
elem
);
test_input_type
(
input
,
L"text"
);
test_elem_istextedit
(
elem
,
VARIANT_TRUE
);
test_elem_spellcheck
(
elem
);
test_node_get_value_str
((
IUnknown
*
)
elem
,
NULL
);
test_node_put_value_str
((
IUnknown
*
)
elem
,
L"test"
);
...
...
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