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
f00d44f0
Commit
f00d44f0
authored
May 07, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
May 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLInputElement::put_name implementation.
parent
1fdbc87e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
8 deletions
+50
-8
htmlinput.c
dlls/mshtml/htmlinput.c
+18
-7
dom.c
dlls/mshtml/tests/dom.c
+32
-1
No files found.
dlls/mshtml/htmlinput.c
View file @
f00d44f0
...
...
@@ -196,8 +196,20 @@ static HRESULT WINAPI HTMLInputElement_get_value(IHTMLInputElement *iface, BSTR
static
HRESULT
WINAPI
HTMLInputElement_put_name
(
IHTMLInputElement
*
iface
,
BSTR
v
)
{
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
name_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
name_str
,
v
);
nsres
=
nsIDOMHTMLInputElement_SetName
(
This
->
nsinput
,
&
name_str
);
nsAString_Finish
(
&
name_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetName failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLInputElement_get_name
(
IHTMLInputElement
*
iface
,
BSTR
*
p
)
...
...
@@ -206,6 +218,7 @@ static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *
nsAString
name_str
;
const
PRUnichar
*
name
;
nsresult
nsres
;
HRESULT
hres
=
S_OK
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
...
@@ -214,16 +227,14 @@ static HRESULT WINAPI HTMLInputElement_get_name(IHTMLInputElement *iface, BSTR *
nsres
=
nsIDOMHTMLInputElement_GetName
(
This
->
nsinput
,
&
name_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsAString_GetData
(
&
name_str
,
&
name
);
*
p
=
SysAllocString
(
name
)
;
*
p
=
*
name
?
SysAllocString
(
name
)
:
NULL
;
}
else
{
ERR
(
"GetName failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
hres
=
E_FAIL
;
}
nsAString_Finish
(
&
name_str
);
TRACE
(
"name=%s
\n
"
,
debugstr_w
(
*
p
));
return
S_OK
;
return
hres
;
}
static
HRESULT
WINAPI
HTMLInputElement_put_status
(
IHTMLInputElement
*
iface
,
VARIANT_BOOL
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
f00d44f0
...
...
@@ -2029,10 +2029,10 @@ static void _test_img_name(unsigned line, IUnknown *unk, const char *pValue)
hres
=
IHTMLImgElement_get_name
(
img
,
&
sName
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_Name failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
sName
,
pValue
),
"expected '%s' got '%s'
\n
"
,
pValue
,
wine_dbgstr_w
(
sName
));
IHTMLImgElement_Release
(
img
);
SysFreeString
(
sName
);
}
#define test_input_type(i,t) _test_input_type(__LINE__,i,t)
static
void
_test_input_type
(
unsigned
line
,
IHTMLInputElement
*
input
,
const
char
*
extype
)
{
...
...
@@ -2045,6 +2045,34 @@ static void _test_input_type(unsigned line, IHTMLInputElement *input, const char
SysFreeString
(
type
);
}
#define test_input_name(u, c) _test_input_name(__LINE__,u, c)
static
void
_test_input_name
(
unsigned
line
,
IHTMLInputElement
*
input
,
const
char
*
exname
)
{
BSTR
name
=
(
BSTR
)
0xdeadbeef
;
HRESULT
hres
;
hres
=
IHTMLInputElement_get_name
(
input
,
&
name
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_name failed: %08x
\n
"
,
hres
);
if
(
exname
)
ok_
(
__FILE__
,
line
)
(
!
strcmp_wa
(
name
,
exname
),
"name=%s, expected %s
\n
"
,
wine_dbgstr_w
(
name
),
exname
);
else
ok_
(
__FILE__
,
line
)
(
!
name
,
"name=%p, expected NULL
\n
"
,
name
);
SysFreeString
(
name
);
}
#define test_input_set_name(u, c) _test_input_set_name(__LINE__,u, c)
static
void
_test_input_set_name
(
unsigned
line
,
IHTMLInputElement
*
input
,
const
char
*
name
)
{
BSTR
tmp
=
a2bstr
(
name
);
HRESULT
hres
;
hres
=
IHTMLInputElement_put_name
(
input
,
tmp
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"put_name failed: %08x
\n
"
,
hres
);
SysFreeString
(
tmp
);
_test_input_name
(
line
,
input
,
name
);
}
#define test_input_get_disabled(i,b) _test_input_get_disabled(__LINE__,i,b)
static
void
_test_input_get_disabled
(
unsigned
line
,
IHTMLInputElement
*
input
,
VARIANT_BOOL
exb
)
{
...
...
@@ -5734,6 +5762,9 @@ static void test_elems(IHTMLDocument2 *doc)
test_input_set_checked
(
input
,
VARIANT_TRUE
);
test_input_set_checked
(
input
,
VARIANT_FALSE
);
test_input_name
(
input
,
NULL
);
test_input_set_name
(
input
,
"test"
);
test_input_src
(
input
,
NULL
);
test_input_set_src
(
input
,
"about:blank"
);
...
...
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