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
f8f8964a
Commit
f8f8964a
authored
Jul 21, 2014
by
Zhenbo Li
Committed by
Alexandre Julliard
Jul 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLFormElement::target property implementation.
parent
fbc4d3f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
htmlform.c
dlls/mshtml/htmlform.c
+25
-4
dom.c
dlls/mshtml/tests/dom.c
+22
-0
No files found.
dlls/mshtml/htmlform.c
View file @
f8f8964a
...
@@ -286,15 +286,36 @@ static HRESULT WINAPI HTMLFormElement_get_elements(IHTMLFormElement *iface, IDis
...
@@ -286,15 +286,36 @@ static HRESULT WINAPI HTMLFormElement_get_elements(IHTMLFormElement *iface, IDis
static
HRESULT
WINAPI
HTMLFormElement_put_target
(
IHTMLFormElement
*
iface
,
BSTR
v
)
static
HRESULT
WINAPI
HTMLFormElement_put_target
(
IHTMLFormElement
*
iface
,
BSTR
v
)
{
{
HTMLFormElement
*
This
=
impl_from_IHTMLFormElement
(
iface
);
HTMLFormElement
*
This
=
impl_from_IHTMLFormElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
wine_dbgstr_w
(
v
));
nsAString
str
;
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
wine_dbgstr_w
(
v
));
nsAString_InitDepend
(
&
str
,
v
);
nsres
=
nsIDOMHTMLFormElement_SetTarget
(
This
->
nsform
,
&
str
);
nsAString_Finish
(
&
str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Set Target(%s) failed: %08x
\n
"
,
wine_dbgstr_w
(
v
),
nsres
);
return
E_FAIL
;
}
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLFormElement_get_target
(
IHTMLFormElement
*
iface
,
BSTR
*
p
)
static
HRESULT
WINAPI
HTMLFormElement_get_target
(
IHTMLFormElement
*
iface
,
BSTR
*
p
)
{
{
HTMLFormElement
*
This
=
impl_from_IHTMLFormElement
(
iface
);
HTMLFormElement
*
This
=
impl_from_IHTMLFormElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString
str
;
return
E_NOTIMPL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_Init
(
&
str
,
NULL
);
nsres
=
nsIDOMHTMLFormElement_GetTarget
(
This
->
nsform
,
&
str
);
return
return_nsstr
(
nsres
,
&
str
,
p
);
}
}
static
HRESULT
WINAPI
HTMLFormElement_put_name
(
IHTMLFormElement
*
iface
,
BSTR
v
)
static
HRESULT
WINAPI
HTMLFormElement_put_name
(
IHTMLFormElement
*
iface
,
BSTR
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
f8f8964a
...
@@ -3775,6 +3775,27 @@ static void _test_form_reset(unsigned line, IUnknown *unk)
...
@@ -3775,6 +3775,27 @@ static void _test_form_reset(unsigned line, IUnknown *unk)
IHTMLFormElement_Release
(
form
);
IHTMLFormElement_Release
(
form
);
}
}
static
void
test_form_target
(
IUnknown
*
unk
)
{
IHTMLFormElement
*
form
=
get_form_iface
(
unk
);
HRESULT
hres
;
BSTR
str
;
static
const
char
target
[]
=
"_blank"
;
str
=
a2bstr
(
target
);
hres
=
IHTMLFormElement_put_target
(
form
,
str
);
ok
(
hres
==
S_OK
,
"put_target(%s) failed: %08x
\n
"
,
target
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLFormElement_get_target
(
form
,
&
str
);
ok
(
hres
==
S_OK
,
"get_target failed: %08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
target
),
"Expected %s, got %s
\n
"
,
target
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IHTMLFormElement_Release
(
form
);
}
#define test_meta_name(a,b) _test_meta_name(__LINE__,a,b)
#define test_meta_name(a,b) _test_meta_name(__LINE__,a,b)
static
void
_test_meta_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
static
void
_test_meta_name
(
unsigned
line
,
IUnknown
*
unk
,
const
char
*
exname
)
{
{
...
@@ -7342,6 +7363,7 @@ static void test_elems2(IHTMLDocument2 *doc)
...
@@ -7342,6 +7363,7 @@ static void test_elems2(IHTMLDocument2 *doc)
test_form_encoding
((
IUnknown
*
)
elem
,
"multipart/form-data"
);
test_form_encoding
((
IUnknown
*
)
elem
,
"multipart/form-data"
);
test_form_elements
((
IUnknown
*
)
elem
);
test_form_elements
((
IUnknown
*
)
elem
);
test_form_reset
((
IUnknown
*
)
elem
);
test_form_reset
((
IUnknown
*
)
elem
);
test_form_target
((
IUnknown
*
)
elem
);
IHTMLElement_Release
(
elem
);
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