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
3600fb3b
Commit
3600fb3b
authored
Oct 16, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLInputElement::[get|put]_defaultChecked implementation.
parent
f32511cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
4 deletions
+50
-4
htmlinput.c
dlls/mshtml/htmlinput.c
+24
-4
dom.c
dlls/mshtml/tests/dom.c
+26
-0
No files found.
dlls/mshtml/htmlinput.c
View file @
3600fb3b
...
...
@@ -381,15 +381,35 @@ static HRESULT WINAPI HTMLInputElement_get_indeterminate(IHTMLInputElement *ifac
static
HRESULT
WINAPI
HTMLInputElement_put_defaultChecked
(
IHTMLInputElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
v
);
nsres
=
nsIDOMHTMLInputElement_SetDefaultChecked
(
This
->
nsinput
,
v
!=
VARIANT_FALSE
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetDefaultChecked failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLInputElement_get_defaultChecked
(
IHTMLInputElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
PRBool
default_checked
=
FALSE
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLInputElement_GetDefaultChecked
(
This
->
nsinput
,
&
default_checked
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDefaultChecked failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
default_checked
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLInputElement_put_checked
(
IHTMLInputElement
*
iface
,
VARIANT_BOOL
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
3600fb3b
...
...
@@ -1405,6 +1405,28 @@ static void _test_input_set_disabled(unsigned line, IHTMLInputElement *input, VA
_test_input_get_disabled
(
line
,
input
,
b
);
}
#define test_input_get_defaultchecked(i,b) _test_input_get_defaultchecked(__LINE__,i,b)
static
void
_test_input_get_defaultchecked
(
unsigned
line
,
IHTMLInputElement
*
input
,
VARIANT_BOOL
exb
)
{
VARIANT_BOOL
checked
=
100
;
HRESULT
hres
;
hres
=
IHTMLInputElement_get_defaultChecked
(
input
,
&
checked
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_defaultChecked failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
checked
==
exb
,
"checked=%x, expected %x
\n
"
,
checked
,
exb
);
}
#define test_input_set_defaultchecked(i,b) _test_input_set_defaultchecked(__LINE__,i,b)
static
void
_test_input_set_defaultchecked
(
unsigned
line
,
IHTMLInputElement
*
input
,
VARIANT_BOOL
b
)
{
HRESULT
hres
;
hres
=
IHTMLInputElement_put_defaultChecked
(
input
,
b
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_defaultChecked failed: %08x
\n
"
,
hres
);
_test_input_get_defaultchecked
(
line
,
input
,
b
);
}
#define test_input_value(o,t) _test_input_value(__LINE__,o,t)
static
void
_test_input_value
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exval
)
{
...
...
@@ -3138,6 +3160,10 @@ static void test_elems(IHTMLDocument2 *doc)
test_elem_set_tabindex
((
IUnknown
*
)
elem
,
3
);
test_elem_title
((
IUnknown
*
)
elem
,
"test title"
);
test_input_get_defaultchecked
(
input
,
VARIANT_FALSE
);
test_input_set_defaultchecked
(
input
,
VARIANT_TRUE
);
test_input_set_defaultchecked
(
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