Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2a8d4a03
Commit
2a8d4a03
authored
Apr 20, 2014
by
Zhenbo Li
Committed by
Alexandre Julliard
Apr 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLElement3::contentEditable property implemention.
parent
2858f1ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
4 deletions
+49
-4
htmlelem3.c
dlls/mshtml/htmlelem3.c
+23
-4
dom.c
dlls/mshtml/tests/dom.c
+26
-0
No files found.
dlls/mshtml/htmlelem3.c
View file @
2a8d4a03
...
...
@@ -174,15 +174,34 @@ static HRESULT WINAPI HTMLElement3_setActive(IHTMLElement3 *iface)
static
HRESULT
WINAPI
HTMLElement3_put_contentEditable
(
IHTMLElement3
*
iface
,
BSTR
v
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement3
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsresult
nsres
;
nsAString
str
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
str
,
v
);
nsres
=
nsIDOMHTMLElement_SetContentEditable
(
This
->
nselem
,
&
str
);
nsAString_Finish
(
&
str
);
if
(
NS_FAILED
(
nsres
)){
ERR
(
"SetContentEditable(%s) failed!
\n
"
,
debugstr_w
(
v
));
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement3_get_contentEditable
(
IHTMLElement3
*
iface
,
BSTR
*
p
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement3
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsresult
nsres
;
nsAString
str
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetContentEditable
(
This
->
nselem
,
&
str
);
return
return_nsstr
(
nsres
,
&
str
,
p
);
}
static
HRESULT
WINAPI
HTMLElement3_get_isContentEditable
(
IHTMLElement3
*
iface
,
VARIANT_BOOL
*
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
2a8d4a03
...
...
@@ -3012,6 +3012,31 @@ static void _test_attr_specified(unsigned line, IHTMLDOMAttribute *attr, VARIANT
ok_
(
__FILE__
,
line
)(
specified
==
expected
,
"specified = %x, expected %x
\n
"
,
specified
,
expected
);
}
static
void
test_contenteditable
(
IUnknown
*
unk
)
{
IHTMLElement3
*
elem3
=
get_elem3_iface
(
unk
);
HRESULT
hres
;
BSTR
str
,
strDefault
;
hres
=
IHTMLElement3_get_contentEditable
(
elem3
,
&
strDefault
);
ok
(
hres
==
S_OK
,
"get_contentEditable failed: 0x%08x
\n
"
,
hres
);
str
=
a2bstr
(
"true"
);
hres
=
IHTMLElement3_put_contentEditable
(
elem3
,
str
);
ok
(
hres
==
S_OK
,
"put_contentEditable(%s) failed: 0x%08x
\n
"
,
wine_dbgstr_w
(
str
),
hres
);
SysFreeString
(
str
);
hres
=
IHTMLElement3_get_contentEditable
(
elem3
,
&
str
);
ok
(
hres
==
S_OK
,
"get_contentEditable failed: 0x%08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"true"
),
"Got %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
"true"
);
/* Restore origin contentEditable */
hres
=
IHTMLElement3_put_contentEditable
(
elem3
,
strDefault
);
ok
(
hres
==
S_OK
,
"put_contentEditable(%s) failed: 0x%08x
\n
"
,
wine_dbgstr_w
(
strDefault
),
hres
);
SysFreeString
(
strDefault
);
IHTMLElement3_Release
(
elem3
);
}
#define test_input_type(i,t) _test_input_type(__LINE__,i,t)
static
void
_test_input_type
(
unsigned
line
,
IHTMLInputElement
*
input
,
const
char
*
extype
)
{
...
...
@@ -6612,6 +6637,7 @@ static void test_elems(IHTMLDocument2 *doc)
if
(
elem
)
{
test_dynamic_properties
(
elem
);
test_attr_collection
(
elem
);
test_contenteditable
((
IUnknown
*
)
elem
);
IHTMLElement_Release
(
elem
);
}
...
...
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