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
5a07f80e
Commit
5a07f80e
authored
Jun 16, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLButtonElement::value property implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5f7a55f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
4 deletions
+56
-4
htmlinput.c
dlls/mshtml/htmlinput.c
+22
-4
dom.c
dlls/mshtml/tests/dom.c
+34
-0
No files found.
dlls/mshtml/htmlinput.c
View file @
5a07f80e
...
...
@@ -1634,15 +1634,33 @@ static HRESULT WINAPI HTMLButtonElement_get_type(IHTMLButtonElement *iface, BSTR
static
HRESULT
WINAPI
HTMLButtonElement_put_value
(
IHTMLButtonElement
*
iface
,
BSTR
v
)
{
HTMLButtonElement
*
This
=
impl_from_IHTMLButtonElement
(
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
=
nsIDOMHTMLButtonElement_SetValue
(
This
->
nsbutton
,
&
nsstr
);
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetValue failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLButtonElement_get_value
(
IHTMLButtonElement
*
iface
,
BSTR
*
p
)
{
HTMLButtonElement
*
This
=
impl_from_IHTMLButtonElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
value_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
value_str
,
NULL
);
nsres
=
nsIDOMHTMLButtonElement_GetValue
(
This
->
nsbutton
,
&
value_str
);
return
return_nsstr
(
nsres
,
&
value_str
,
p
);
}
static
HRESULT
WINAPI
HTMLButtonElement_put_name
(
IHTMLButtonElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
5a07f80e
...
...
@@ -6944,11 +6944,45 @@ static void _test_button_type(unsigned line, IHTMLElement *elem, const char *ext
IHTMLButtonElement_Release
(
button
);
}
#define test_button_value(a,b) _test_button_value(__LINE__,a,b)
static
void
_test_button_value
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
exvalue
)
{
IHTMLButtonElement
*
button
=
_get_button_iface
(
line
,
(
IUnknown
*
)
elem
);
BSTR
str
;
HRESULT
hres
;
hres
=
IHTMLButtonElement_get_value
(
button
,
&
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_value failed: %08x
\n
"
,
hres
);
if
(
exvalue
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
str
,
exvalue
),
"value = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
exvalue
);
else
ok_
(
__FILE__
,
line
)(
!
str
,
"value = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IHTMLButtonElement_Release
(
button
);
}
#define set_button_value(a,b) _set_button_value(__LINE__,a,b)
static
void
_set_button_value
(
unsigned
line
,
IHTMLElement
*
elem
,
const
char
*
value
)
{
IHTMLButtonElement
*
button
=
_get_button_iface
(
line
,
(
IUnknown
*
)
elem
);
BSTR
str
=
a2bstr
(
value
);
HRESULT
hres
;
hres
=
IHTMLButtonElement_put_value
(
button
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_value failed: %08x
\n
"
,
hres
);
IHTMLButtonElement_Release
(
button
);
_test_button_value
(
line
,
elem
,
value
);
}
static
void
test_button_elem
(
IHTMLElement
*
elem
)
{
test_button_name
(
elem
,
NULL
);
set_button_name
(
elem
,
"button name"
);
test_button_type
(
elem
,
"submit"
);
test_button_value
(
elem
,
NULL
);
set_button_value
(
elem
,
"val"
);
test_elem_istextedit
(
elem
,
VARIANT_TRUE
);
}
...
...
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