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
b0ff8f7e
Commit
b0ff8f7e
authored
16 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLSelectElement::[get|put]_disabled implementation.
parent
9306e9b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
4 deletions
+52
-4
htmlselect.c
dlls/mshtml/htmlselect.c
+24
-4
dom.c
dlls/mshtml/tests/dom.c
+28
-0
No files found.
dlls/mshtml/htmlselect.c
View file @
b0ff8f7e
...
...
@@ -289,15 +289,35 @@ static HRESULT WINAPI HTMLSelectElement_get_value(IHTMLSelectElement *iface, BST
static
HRESULT
WINAPI
HTMLSelectElement_put_disabled
(
IHTMLSelectElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLSelectElement
*
This
=
HTMLSELECT_THIS
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
v
);
nsres
=
nsIDOMHTMLSelectElement_SetDisabled
(
This
->
nsselect
,
v
!=
VARIANT_FALSE
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetDisabled failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLSelectElement_get_disabled
(
IHTMLSelectElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLSelectElement
*
This
=
HTMLSELECT_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
PRBool
disabled
=
FALSE
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLSelectElement_GetDisabled
(
This
->
nsselect
,
&
disabled
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDisabled failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
disabled
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLSelectElement_get_form
(
IHTMLSelectElement
*
iface
,
IHTMLFormElement
**
p
)
...
...
This diff is collapsed.
Click to expand it.
dlls/mshtml/tests/dom.c
View file @
b0ff8f7e
...
...
@@ -1096,6 +1096,30 @@ static void _test_elem3_set_disabled(unsigned line, IUnknown *unk, VARIANT_BOOL
_test_elem3_get_disabled
(
line
,
unk
,
b
);
}
#define test_select_get_disabled(i,b) _test_select_get_disabled(__LINE__,i,b)
static
void
_test_select_get_disabled
(
unsigned
line
,
IHTMLSelectElement
*
select
,
VARIANT_BOOL
exb
)
{
VARIANT_BOOL
disabled
=
100
;
HRESULT
hres
;
hres
=
IHTMLSelectElement_get_disabled
(
select
,
&
disabled
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_disabled failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
disabled
==
exb
,
"disabled=%x, expected %x
\n
"
,
disabled
,
exb
);
_test_elem3_get_disabled
(
line
,
(
IUnknown
*
)
select
,
exb
);
}
#define test_select_set_disabled(i,b) _test_select_set_disabled(__LINE__,i,b)
static
void
_test_select_set_disabled
(
unsigned
line
,
IHTMLSelectElement
*
select
,
VARIANT_BOOL
b
)
{
HRESULT
hres
;
hres
=
IHTMLSelectElement_put_disabled
(
select
,
b
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_disabled failed: %08x
\n
"
,
hres
);
_test_select_get_disabled
(
line
,
select
,
b
);
}
#define elem_get_scroll_height(u) _elem_get_scroll_height(__LINE__,u)
static
long
_elem_get_scroll_height
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -1727,6 +1751,10 @@ static void test_select_elem(IHTMLSelectElement *select)
test_select_set_value
(
select
,
"val1"
);
test_select_value
(
select
,
"val1"
);
test_select_get_disabled
(
select
,
VARIANT_FALSE
);
test_select_set_disabled
(
select
,
VARIANT_TRUE
);
test_select_set_disabled
(
select
,
VARIANT_FALSE
);
}
static
void
test_create_option_elem
(
IHTMLDocument2
*
doc
)
...
...
This diff is collapsed.
Click to expand it.
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