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
990675e5
Commit
990675e5
authored
Oct 28, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLFormElement_{get/put}_name implementation.
parent
bd94cc3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
4 deletions
+66
-4
htmlform.c
dlls/mshtml/htmlform.c
+33
-4
dom.c
dlls/mshtml/tests/dom.c
+33
-0
No files found.
dlls/mshtml/htmlform.c
View file @
990675e5
...
...
@@ -272,15 +272,44 @@ static HRESULT WINAPI HTMLFormElement_get_target(IHTMLFormElement *iface, BSTR *
static
HRESULT
WINAPI
HTMLFormElement_put_name
(
IHTMLFormElement
*
iface
,
BSTR
v
)
{
HTMLFormElement
*
This
=
HTMLFORM_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
wine_dbgstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
name_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
wine_dbgstr_w
(
v
));
nsAString_InitDepend
(
&
name_str
,
v
);
nsres
=
nsIDOMHTMLFormElement_SetName
(
This
->
nsform
,
&
name_str
);
nsAString_Finish
(
&
name_str
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLFormElement_get_name
(
IHTMLFormElement
*
iface
,
BSTR
*
p
)
{
HTMLFormElement
*
This
=
HTMLFORM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
name_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
name_str
,
NULL
);
nsres
=
nsIDOMHTMLFormElement_GetName
(
This
->
nsform
,
&
name_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
name
;
nsAString_GetData
(
&
name_str
,
&
name
);
if
(
*
name
)
{
*
p
=
SysAllocString
(
name
);
if
(
!*
p
)
return
E_OUTOFMEMORY
;
}
else
*
p
=
NULL
;
}
else
return
E_FAIL
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLFormElement_put_onsubmit
(
IHTMLFormElement
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
990675e5
...
...
@@ -2629,6 +2629,39 @@ static void _test_form_put_method(unsigned line, IUnknown *unk, HRESULT exp_hres
_test_form_method
(
line
,
unk
,
method
);
}
#define test_form_name(f,a) _test_form_name(__LINE__,f,a)
static
void
_test_form_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
ex
)
{
IHTMLFormElement
*
form
=
_get_form_iface
(
line
,
unk
);
BSTR
name
=
(
void
*
)
0xdeadbeef
;
HRESULT
hres
;
hres
=
IHTMLFormElement_get_name
(
form
,
&
name
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_name failed: %08x
\n
"
,
hres
);
if
(
ex
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
name
,
ex
),
"name=%s, expected %s
\n
"
,
wine_dbgstr_w
(
name
),
ex
);
else
ok_
(
__FILE__
,
line
)(
!
name
,
"name=%p
\n
"
,
name
);
SysFreeString
(
name
);
IHTMLFormElement_Release
(
form
);
}
#define test_form_put_name(f,a) _test_form_put_name(__LINE__,f,a)
static
void
_test_form_put_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
name
)
{
IHTMLFormElement
*
form
=
_get_form_iface
(
line
,
unk
);
BSTR
tmp
=
a2bstr
(
name
);
HRESULT
hres
;
hres
=
IHTMLFormElement_put_name
(
form
,
tmp
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_name failed: %08x
\n
"
,
hres
);
SysFreeString
(
tmp
);
IHTMLFormElement_Release
(
form
);
_test_form_name
(
line
,
unk
,
name
);
}
#define get_elem_doc(e) _get_elem_doc(__LINE__,e)
static
IHTMLDocument2
*
_get_elem_doc
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
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