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
14e62a0e
Commit
14e62a0e
authored
Mar 13, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLTextAreaElement::defaultValue property implementation.
parent
0e24c333
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
4 deletions
+59
-4
htmltextarea.c
dlls/mshtml/htmltextarea.c
+17
-4
dom.c
dlls/mshtml/tests/dom.c
+42
-0
No files found.
dlls/mshtml/htmltextarea.c
View file @
14e62a0e
...
...
@@ -229,15 +229,28 @@ static HRESULT WINAPI HTMLTextAreaElement_get_form(IHTMLTextAreaElement *iface,
static
HRESULT
WINAPI
HTMLTextAreaElement_put_defaultValue
(
IHTMLTextAreaElement
*
iface
,
BSTR
v
)
{
HTMLTextAreaElement
*
This
=
impl_from_IHTMLTextAreaElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
nsstr
,
v
);
nsres
=
nsIDOMHTMLTextAreaElement_SetDefaultValue
(
This
->
nstextarea
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
return
NS_SUCCEEDED
(
nsres
)
?
S_OK
:
E_FAIL
;
}
static
HRESULT
WINAPI
HTMLTextAreaElement_get_defaultValue
(
IHTMLTextAreaElement
*
iface
,
BSTR
*
p
)
{
HTMLTextAreaElement
*
This
=
impl_from_IHTMLTextAreaElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLTextAreaElement_GetDefaultValue
(
This
->
nstextarea
,
&
nsstr
);
return
return_nsstr
(
nsres
,
&
nsstr
,
p
);
}
static
HRESULT
WINAPI
HTMLTextAreaElement_select
(
IHTMLTextAreaElement
*
iface
)
...
...
dlls/mshtml/tests/dom.c
View file @
14e62a0e
...
...
@@ -1670,6 +1670,38 @@ static void _test_textarea_put_value(unsigned line, IUnknown *unk, const char *v
_test_textarea_value
(
line
,
unk
,
value
);
}
#define test_textarea_defaultvalue(t,v) _test_textarea_defaultvalue(__LINE__,t,v)
static
void
_test_textarea_defaultvalue
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exval
)
{
IHTMLTextAreaElement
*
textarea
=
_get_textarea_iface
(
line
,
unk
);
BSTR
value
=
(
void
*
)
0xdeadbeef
;
HRESULT
hres
;
hres
=
IHTMLTextAreaElement_get_defaultValue
(
textarea
,
&
value
);
IHTMLTextAreaElement_Release
(
textarea
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_defaultValue failed: %08x
\n
"
,
hres
);
if
(
exval
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
value
,
exval
),
"defaultValue = %s, expected %s
\n
"
,
wine_dbgstr_w
(
value
),
exval
);
else
ok_
(
__FILE__
,
line
)(
!
value
,
"value = %p
\n
"
,
value
);
SysFreeString
(
value
);
}
#define test_textarea_put_defaultvalue(t,v) _test_textarea_put_defaultvalue(__LINE__,t,v)
static
void
_test_textarea_put_defaultvalue
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
value
)
{
IHTMLTextAreaElement
*
textarea
=
_get_textarea_iface
(
line
,
unk
);
BSTR
tmp
=
a2bstr
(
value
);
HRESULT
hres
;
hres
=
IHTMLTextAreaElement_put_defaultValue
(
textarea
,
tmp
);
IHTMLTextAreaElement_Release
(
textarea
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_defaultValue failed: %08x
\n
"
,
hres
);
SysFreeString
(
tmp
);
_test_textarea_defaultvalue
(
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
)
{
...
...
@@ -8172,6 +8204,9 @@ static void test_elems2(IHTMLDocument2 *doc)
test_textarea_value
((
IUnknown
*
)
elem
,
NULL
);
test_textarea_put_value
((
IUnknown
*
)
elem
,
"test"
);
test_textarea_defaultvalue
((
IUnknown
*
)
elem
,
NULL
);
test_textarea_put_defaultvalue
((
IUnknown
*
)
elem
,
"defval text"
);
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
);
...
...
@@ -8185,6 +8220,13 @@ static void test_elems2(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem
);
}
test_elem_set_innerhtml
((
IUnknown
*
)
div
,
"<textarea id=
\"
ta
\"
>default text</textarea>"
);
elem
=
get_elem_by_id
(
doc
,
"ta"
,
TRUE
);
if
(
elem
)
{
test_textarea_defaultvalue
((
IUnknown
*
)
elem
,
"default text"
);
IHTMLElement_Release
(
elem
);
}
test_elem_set_innerhtml
((
IUnknown
*
)
div
,
"<form id=
\"
fid
\"
><textarea id=
\"
ta
\"
></textarea></form>"
);
elem
=
get_elem_by_id
(
doc
,
"ta"
,
TRUE
);
if
(
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