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
85f07936
Commit
85f07936
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 IHTMLOptionElement::selected property implementation.
parent
c7a9e3a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
4 deletions
+48
-4
htmloption.c
dlls/mshtml/htmloption.c
+24
-4
dom.c
dlls/mshtml/tests/dom.c
+24
-0
No files found.
dlls/mshtml/htmloption.c
View file @
85f07936
...
...
@@ -98,15 +98,35 @@ static HRESULT WINAPI HTMLOptionElement_Invoke(IHTMLOptionElement *iface, DISPID
static
HRESULT
WINAPI
HTMLOptionElement_put_selected
(
IHTMLOptionElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLOptionElement
*
This
=
HTMLOPTION_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
v
);
nsres
=
nsIDOMHTMLOptionElement_SetSelected
(
This
->
nsoption
,
v
!=
VARIANT_FALSE
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetSelected failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLOptionElement_get_selected
(
IHTMLOptionElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLOptionElement
*
This
=
HTMLOPTION_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
PRBool
selected
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLOptionElement_GetSelected
(
This
->
nsoption
,
&
selected
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetSelected failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
selected
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLOptionElement_put_value
(
IHTMLOptionElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
85f07936
...
...
@@ -1135,6 +1135,27 @@ static void _test_option_put_value(unsigned line, IHTMLOptionElement *option, co
_test_option_value
(
line
,
option
,
value
);
}
#define test_option_selected(o,s) _test_option_selected(__LINE__,o,s)
static
void
_test_option_selected
(
unsigned
line
,
IHTMLOptionElement
*
option
,
VARIANT_BOOL
ex
)
{
VARIANT_BOOL
b
=
0x100
;
HRESULT
hres
;
hres
=
IHTMLOptionElement_get_selected
(
option
,
&
b
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_selected failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
b
==
ex
,
"selected = %x, expected %x
\n
"
,
b
,
ex
);
}
#define test_option_put_selected(o,s) _test_option_put_selected(__LINE__,o,s)
static
void
_test_option_put_selected
(
unsigned
line
,
IHTMLOptionElement
*
option
,
VARIANT_BOOL
b
)
{
HRESULT
hres
;
hres
=
IHTMLOptionElement_put_selected
(
option
,
b
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_selected failed: %08x
\n
"
,
hres
);
_test_option_selected
(
line
,
option
,
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
)
{
...
...
@@ -1183,6 +1204,7 @@ static IHTMLOptionElement *_create_option_elem(unsigned line, IHTMLDocument2 *do
_test_option_text
(
line
,
option
,
txt
);
_test_option_value
(
line
,
option
,
val
);
_test_option_selected
(
line
,
option
,
VARIANT_FALSE
);
return
option
;
}
...
...
@@ -2872,6 +2894,8 @@ static void test_create_option_elem(IHTMLDocument2 *doc)
test_option_put_text
(
option
,
"new text"
);
test_option_put_value
(
option
,
"new value"
);
test_option_put_selected
(
option
,
VARIANT_TRUE
);
test_option_put_selected
(
option
,
VARIANT_FALSE
);
IHTMLOptionElement_Release
(
option
);
}
...
...
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