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
d9427e39
Commit
d9427e39
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 IHTMLFormElement::action property implementation.
parent
5bb9172a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
4 deletions
+66
-4
htmlform.c
dlls/mshtml/htmlform.c
+32
-4
dom.c
dlls/mshtml/tests/dom.c
+34
-0
No files found.
dlls/mshtml/htmlform.c
View file @
d9427e39
...
...
@@ -133,15 +133,43 @@ static HRESULT WINAPI HTMLFormElement_Invoke(IHTMLFormElement *iface, DISPID dis
static
HRESULT
WINAPI
HTMLFormElement_put_action
(
IHTMLFormElement
*
iface
,
BSTR
v
)
{
HTMLFormElement
*
This
=
HTMLFORM_THIS
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
wine_dbgstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
action_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
wine_dbgstr_w
(
v
));
nsAString_InitDepend
(
&
action_str
,
v
);
nsres
=
nsIDOMHTMLFormElement_SetAction
(
This
->
nsform
,
&
action_str
);
nsAString_Finish
(
&
action_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"SetAction failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLFormElement_get_action
(
IHTMLFormElement
*
iface
,
BSTR
*
p
)
{
HTMLFormElement
*
This
=
HTMLFORM_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
action_str
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
action_str
,
NULL
);
nsres
=
nsIDOMHTMLFormElement_GetAction
(
This
->
nsform
,
&
action_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
const
PRUnichar
*
action
;
nsAString_GetData
(
&
action_str
,
&
action
);
hres
=
nsuri_to_url
(
action
,
FALSE
,
p
);
}
else
{
ERR
(
"GetAction failed: %08x
\n
"
,
nsres
);
hres
=
E_FAIL
;
}
return
hres
;
}
static
HRESULT
WINAPI
HTMLFormElement_put_dir
(
IHTMLFormElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
d9427e39
...
...
@@ -2519,6 +2519,38 @@ static void _test_form_length(unsigned line, IUnknown *unk, LONG exlen)
IHTMLFormElement_Release
(
form
);
}
#define test_form_action(f,a) _test_form_action(__LINE__,f,a)
static
void
_test_form_action
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
ex
)
{
IHTMLFormElement
*
form
=
_get_form_iface
(
line
,
unk
);
BSTR
action
=
(
void
*
)
0xdeadbeef
;
HRESULT
hres
;
hres
=
IHTMLFormElement_get_action
(
form
,
&
action
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_action failed: %08x
\n
"
,
hres
);
if
(
ex
)
ok_
(
__FILE__
,
line
)(
!
strcmp_wa
(
action
,
ex
),
"action=%s, expected %s
\n
"
,
wine_dbgstr_w
(
action
),
ex
);
else
ok_
(
__FILE__
,
line
)(
!
action
,
"action=%p
\n
"
,
action
);
IHTMLFormElement_Release
(
form
);
}
#define test_form_put_action(f,a) _test_form_put_action(__LINE__,f,a)
static
void
_test_form_put_action
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
action
)
{
IHTMLFormElement
*
form
=
_get_form_iface
(
line
,
unk
);
BSTR
tmp
=
a2bstr
(
action
);
HRESULT
hres
;
hres
=
IHTMLFormElement_put_action
(
form
,
tmp
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_action failed: %08x
\n
"
,
hres
);
SysFreeString
(
tmp
);
IHTMLFormElement_Release
(
form
);
_test_form_action
(
line
,
unk
,
action
);
}
#define get_elem_doc(e) _get_elem_doc(__LINE__,e)
static
IHTMLDocument2
*
_get_elem_doc
(
unsigned
line
,
IUnknown
*
unk
)
{
...
...
@@ -6160,6 +6192,8 @@ static void test_elems2(IHTMLDocument2 *doc)
if
(
elem
)
{
test_form_length
((
IUnknown
*
)
elem
,
2
);
test_form_item
(
elem
);
test_form_action
((
IUnknown
*
)
elem
,
NULL
);
test_form_put_action
((
IUnknown
*
)
elem
,
"about:blank"
);
IHTMLElement_Release
(
elem
);
}
...
...
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