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
25d8616d
Commit
25d8616d
authored
May 11, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
May 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLTextAreaElement::readOnly property implementation.
parent
d9427e39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
4 deletions
+53
-4
htmltextarea.c
dlls/mshtml/htmltextarea.c
+24
-4
dom.c
dlls/mshtml/tests/dom.c
+29
-0
No files found.
dlls/mshtml/htmltextarea.c
View file @
25d8616d
...
...
@@ -265,15 +265,35 @@ static HRESULT WINAPI HTMLTextAreaElement_get_onselect(IHTMLTextAreaElement *ifa
static
HRESULT
WINAPI
HTMLTextAreaElement_put_readOnly
(
IHTMLTextAreaElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLTextAreaElement
*
This
=
HTMLTXTAREA_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
v
);
nsres
=
nsIDOMHTMLTextAreaElement_SetReadOnly
(
This
->
nstextarea
,
v
!=
VARIANT_FALSE
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetReadOnly failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLTextAreaElement_get_readOnly
(
IHTMLTextAreaElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLTextAreaElement
*
This
=
HTMLTXTAREA_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
PRBool
b
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLTextAreaElement_GetReadOnly
(
This
->
nstextarea
,
&
b
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetReadOnly failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLTextAreaElement_put_rows
(
IHTMLTextAreaElement
*
iface
,
LONG
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
25d8616d
...
...
@@ -1199,6 +1199,32 @@ static void _test_textarea_put_value(unsigned line, IUnknown *unk, const char *v
_test_textarea_value
(
line
,
unk
,
value
);
}
#define test_textarea_readonly(t,v) _test_textarea_readonly(__LINE__,t,v)
static
void
_test_textarea_readonly
(
unsigned
line
,
IUnknown
*
unk
,
VARIANT_BOOL
ex
)
{
IHTMLTextAreaElement
*
textarea
=
_get_textarea_iface
(
line
,
unk
);
VARIANT_BOOL
b
=
0x100
;
HRESULT
hres
;
hres
=
IHTMLTextAreaElement_get_readOnly
(
textarea
,
&
b
);
IHTMLTextAreaElement_Release
(
textarea
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_readOnly failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
b
==
ex
,
"readOnly = %x, expected %x
\n
"
,
b
,
ex
);
}
#define test_textarea_put_readonly(t,v) _test_textarea_put_readonly(__LINE__,t,v)
static
void
_test_textarea_put_readonly
(
unsigned
line
,
IUnknown
*
unk
,
VARIANT_BOOL
b
)
{
IHTMLTextAreaElement
*
textarea
=
_get_textarea_iface
(
line
,
unk
);
HRESULT
hres
;
hres
=
IHTMLTextAreaElement_put_readOnly
(
textarea
,
b
);
IHTMLTextAreaElement_Release
(
textarea
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_readOnly failed: %08x
\n
"
,
hres
);
_test_textarea_readonly
(
line
,
unk
,
b
);
}
#define test_comment_text(c,t) _test_comment_text(__LINE__,c,t)
static
void
_test_comment_text
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
extext
)
{
...
...
@@ -6183,6 +6209,9 @@ static void test_elems2(IHTMLDocument2 *doc)
if
(
elem
)
{
test_textarea_value
((
IUnknown
*
)
elem
,
NULL
);
test_textarea_put_value
((
IUnknown
*
)
elem
,
"test"
);
test_textarea_readonly
((
IUnknown
*
)
elem
,
VARIANT_FALSE
);
test_textarea_put_readonly
((
IUnknown
*
)
elem
,
VARIANT_TRUE
);
test_textarea_put_readonly
((
IUnknown
*
)
elem
,
VARIANT_FALSE
);
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