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
c2ac0f50
Commit
c2ac0f50
authored
Aug 18, 2014
by
Zhenbo Li
Committed by
Alexandre Julliard
Aug 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLInputElement::readOnly property.
parent
6079c561
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
htmlinput.c
dlls/mshtml/htmlinput.c
+22
-4
dom.c
dlls/mshtml/tests/dom.c
+17
-0
No files found.
dlls/mshtml/htmlinput.c
View file @
c2ac0f50
...
...
@@ -412,15 +412,33 @@ static HRESULT WINAPI HTMLInputElement_get_defaultValue(IHTMLInputElement *iface
static
HRESULT
WINAPI
HTMLInputElement_put_readOnly
(
IHTMLInputElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLInputElement
*
This
=
impl_from_IHTMLInputElement
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
v
);
nsres
=
nsIDOMHTMLInputElement_SetReadOnly
(
This
->
nsinput
,
v
!=
VARIANT_FALSE
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Set ReadOnly Failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLInputElement_get_readOnly
(
IHTMLInputElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLInputElement
*
This
=
impl_from_IHTMLInputElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsresult
nsres
;
cpp_bool
b
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLInputElement_GetReadOnly
(
This
->
nsinput
,
&
b
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Get ReadOnly Failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLInputElement_createTextRange
(
IHTMLInputElement
*
iface
,
IHTMLTxtRange
**
range
)
...
...
dlls/mshtml/tests/dom.c
View file @
c2ac0f50
...
...
@@ -3362,6 +3362,20 @@ static void _test_input_get_size(unsigned line, IHTMLInputElement *input, LONG e
ok_
(
__FILE__
,
line
)
(
hres
==
E_INVALIDARG
,
"Expect ret E_INVALIDARG, got: %08x
\n
"
,
hres
);
}
#define test_input_readOnly(u,b) _test_input_readOnly(__LINE__,u,b)
static
void
_test_input_readOnly
(
unsigned
line
,
IHTMLInputElement
*
input
,
VARIANT_BOOL
v
)
{
HRESULT
hres
;
VARIANT_BOOL
b
=
100
;
hres
=
IHTMLInputElement_put_readOnly
(
input
,
v
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put readOnly failed: %08x
\n
"
,
hres
);
hres
=
IHTMLInputElement_get_readOnly
(
input
,
&
b
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get readOnly failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
v
==
b
,
"Expect %x, got %x
\n
"
,
v
,
b
);
}
#define test_elem_class(u,c) _test_elem_class(__LINE__,u,c)
static
void
_test_elem_class
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exclass
)
{
...
...
@@ -7012,6 +7026,9 @@ static void test_elems(IHTMLDocument2 *doc)
test_input_set_size
(
input
,
0
,
CTL_E_INVALIDPROPERTYVALUE
);
test_input_get_size
(
input
,
15
);
test_input_readOnly
(
input
,
VARIANT_TRUE
);
test_input_readOnly
(
input
,
VARIANT_FALSE
);
IHTMLInputElement_Release
(
input
);
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