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
ff4fde9e
Commit
ff4fde9e
authored
Nov 07, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement isContentEditable for HTML elements.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
cb078982
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+13
-2
dom.c
dlls/mshtml/tests/dom.c
+16
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
ff4fde9e
...
...
@@ -4256,8 +4256,19 @@ static HRESULT WINAPI HTMLElement3_get_contentEditable(IHTMLElement3 *iface, BST
static
HRESULT
WINAPI
HTMLElement3_get_isContentEditable
(
IHTMLElement3
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLElement
*
This
=
impl_from_IHTMLElement3
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsresult
nsres
;
cpp_bool
r
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
html_element
)
{
FIXME
(
"non-HTML element
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLElement_GetIsContentEditable
(
This
->
html_element
,
&
r
);
*
p
=
variant_bool
(
NS_SUCCEEDED
(
nsres
)
&&
r
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLElement3_put_hideFocus
(
IHTMLElement3
*
iface
,
VARIANT_BOOL
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
ff4fde9e
...
...
@@ -3945,6 +3945,7 @@ static void test_contenteditable(IUnknown *unk)
IHTMLElement3
*
elem3
=
get_elem3_iface
(
unk
);
HRESULT
hres
;
BSTR
str
,
strDefault
;
VARIANT_BOOL
vbool
;
hres
=
IHTMLElement3_get_contentEditable
(
elem3
,
&
strDefault
);
ok
(
hres
==
S_OK
,
"get_contentEditable failed: 0x%08lx
\n
"
,
hres
);
...
...
@@ -3957,6 +3958,21 @@ static void test_contenteditable(IUnknown *unk)
ok
(
hres
==
S_OK
,
"get_contentEditable failed: 0x%08lx
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
str
,
L"true"
),
"Got %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
"true"
);
SysFreeString
(
str
);
hres
=
IHTMLElement3_get_isContentEditable
(
elem3
,
&
vbool
);
ok
(
hres
==
S_OK
,
"get_isContentEditable failed: 0x%08lx
\n
"
,
hres
);
ok
(
vbool
==
VARIANT_TRUE
,
"Got %d, expected VARIANT_TRUE
\n
"
,
vbool
);
str
=
SysAllocString
(
L"inherit"
);
hres
=
IHTMLElement3_put_contentEditable
(
elem3
,
str
);
ok
(
hres
==
S_OK
,
"put_contentEditable(%s) failed: 0x%08lx
\n
"
,
wine_dbgstr_w
(
str
),
hres
);
SysFreeString
(
str
);
hres
=
IHTMLElement3_get_contentEditable
(
elem3
,
&
str
);
ok
(
hres
==
S_OK
,
"get_contentEditable failed: 0x%08lx
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
str
,
L"inherit"
),
"Got %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
"inherit"
);
SysFreeString
(
str
);
hres
=
IHTMLElement3_get_isContentEditable
(
elem3
,
&
vbool
);
ok
(
hres
==
S_OK
,
"get_isContentEditable failed: 0x%08lx
\n
"
,
hres
);
ok
(
vbool
==
VARIANT_FALSE
,
"Got %d, expected VARIANT_FALSE
\n
"
,
vbool
);
/* Restore origin contentEditable */
hres
=
IHTMLElement3_put_contentEditable
(
elem3
,
strDefault
);
...
...
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