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
6419ac0f
Commit
6419ac0f
authored
Aug 07, 2015
by
Zhenbo Li
Committed by
Alexandre Julliard
Aug 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLSelectElement::size property implementation.
parent
312534f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
4 deletions
+59
-4
htmlselect.c
dlls/mshtml/htmlselect.c
+26
-4
dom.c
dlls/mshtml/tests/dom.c
+33
-0
No files found.
dlls/mshtml/htmlselect.c
View file @
6419ac0f
...
@@ -142,15 +142,37 @@ static HRESULT WINAPI HTMLSelectElement_Invoke(IHTMLSelectElement *iface, DISPID
...
@@ -142,15 +142,37 @@ static HRESULT WINAPI HTMLSelectElement_Invoke(IHTMLSelectElement *iface, DISPID
static
HRESULT
WINAPI
HTMLSelectElement_put_size
(
IHTMLSelectElement
*
iface
,
LONG
v
)
static
HRESULT
WINAPI
HTMLSelectElement_put_size
(
IHTMLSelectElement
*
iface
,
LONG
v
)
{
{
HTMLSelectElement
*
This
=
impl_from_IHTMLSelectElement
(
iface
);
HTMLSelectElement
*
This
=
impl_from_IHTMLSelectElement
(
iface
);
FIXME
(
"(%p)->(%d)
\n
"
,
This
,
v
);
nsresult
nsres
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
v
);
if
(
v
<
0
)
return
CTL_E_INVALIDPROPERTYVALUE
;
nsres
=
nsIDOMHTMLSelectElement_SetSize
(
This
->
nsselect
,
v
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetSize failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLSelectElement_get_size
(
IHTMLSelectElement
*
iface
,
LONG
*
p
)
static
HRESULT
WINAPI
HTMLSelectElement_get_size
(
IHTMLSelectElement
*
iface
,
LONG
*
p
)
{
{
HTMLSelectElement
*
This
=
impl_from_IHTMLSelectElement
(
iface
);
HTMLSelectElement
*
This
=
impl_from_IHTMLSelectElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
DWORD
val
;
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_INVALIDARG
;
nsres
=
nsIDOMHTMLSelectElement_GetSize
(
This
->
nsselect
,
&
val
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetSize failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
val
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLSelectElement_put_multiple
(
IHTMLSelectElement
*
iface
,
VARIANT_BOOL
v
)
static
HRESULT
WINAPI
HTMLSelectElement_put_multiple
(
IHTMLSelectElement
*
iface
,
VARIANT_BOOL
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
6419ac0f
...
@@ -2193,6 +2193,30 @@ static void _test_select_set_multiple(unsigned line, IHTMLSelectElement *select,
...
@@ -2193,6 +2193,30 @@ static void _test_select_set_multiple(unsigned line, IHTMLSelectElement *select,
_test_select_multiple
(
line
,
select
,
val
);
_test_select_multiple
(
line
,
select
,
val
);
}
}
#define test_select_size(s,v) _test_select_size(__LINE__,s,v)
static
void
_test_select_size
(
unsigned
line
,
IHTMLSelectElement
*
select
,
LONG
exval
)
{
HRESULT
hres
;
LONG
val
;
hres
=
IHTMLSelectElement_get_size
(
select
,
NULL
);
ok_
(
__FILE__
,
line
)
(
hres
==
E_INVALIDARG
,
"got %08x, expected E_INVALIDARG
\n
"
,
hres
);
val
=
0xdeadbeef
;
hres
=
IHTMLSelectElement_get_size
(
select
,
&
val
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_size failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
val
==
exval
,
"size = %d, expected %d
\n
"
,
val
,
exval
);
}
#define test_select_set_size(s,v,e) _test_select_set_size(__LINE__,s,v,e)
static
void
_test_select_set_size
(
unsigned
line
,
IHTMLSelectElement
*
select
,
LONG
val
,
HRESULT
exhres
)
{
HRESULT
hres
;
hres
=
IHTMLSelectElement_put_size
(
select
,
val
);
ok_
(
__FILE__
,
line
)
(
hres
==
exhres
,
"put_size(%d) got %08x, expect %08x
\n
"
,
val
,
hres
,
exhres
);
}
#define test_range_text(r,t) _test_range_text(__LINE__,r,t)
#define test_range_text(r,t) _test_range_text(__LINE__,r,t)
static
void
_test_range_text
(
unsigned
line
,
IHTMLTxtRange
*
range
,
const
char
*
extext
)
static
void
_test_range_text
(
unsigned
line
,
IHTMLTxtRange
*
range
,
const
char
*
extext
)
{
{
...
@@ -4882,6 +4906,15 @@ static void test_select_elem(IHTMLSelectElement *select)
...
@@ -4882,6 +4906,15 @@ static void test_select_elem(IHTMLSelectElement *select)
test_select_set_value
(
select
,
"val1"
);
test_select_set_value
(
select
,
"val1"
);
test_select_value
(
select
,
"val1"
);
test_select_value
(
select
,
"val1"
);
test_select_size
(
select
,
0
);
test_select_set_size
(
select
,
1
,
S_OK
);
test_select_size
(
select
,
1
);
test_select_set_size
(
select
,
-
1
,
CTL_E_INVALIDPROPERTYVALUE
);
test_select_size
(
select
,
1
);
test_select_set_size
(
select
,
3
,
S_OK
);
test_select_size
(
select
,
3
);
test_select_get_disabled
(
select
,
VARIANT_FALSE
);
test_select_get_disabled
(
select
,
VARIANT_FALSE
);
test_select_set_disabled
(
select
,
VARIANT_TRUE
);
test_select_set_disabled
(
select
,
VARIANT_TRUE
);
test_select_set_disabled
(
select
,
VARIANT_FALSE
);
test_select_set_disabled
(
select
,
VARIANT_FALSE
);
...
...
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