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
6b107d41
Commit
6b107d41
authored
Apr 12, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Apr 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement `complete` prop for input elements.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
4cb36403
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
2 deletions
+61
-2
htmlinput.c
dlls/mshtml/htmlinput.c
+11
-2
dom.c
dlls/mshtml/tests/dom.c
+5
-0
events.c
dlls/mshtml/tests/events.c
+45
-0
No files found.
dlls/mshtml/htmlinput.c
View file @
6b107d41
...
...
@@ -684,8 +684,17 @@ static HRESULT WINAPI HTMLInputElement_get_readyState(IHTMLInputElement *iface,
static
HRESULT
WINAPI
HTMLInputElement_get_complete
(
IHTMLInputElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLInputElement
*
This
=
impl_from_IHTMLInputElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
cpp_bool
complete
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMHTMLInputElement_GetComplete
(
This
->
nsinput
,
&
complete
);
if
(
NS_FAILED
(
nsres
))
return
map_nsresult
(
nsres
);
*
p
=
variant_bool
(
complete
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLInputElement_put_loop
(
IHTMLInputElement
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
6b107d41
...
...
@@ -3987,6 +3987,7 @@ static void test_contenteditable(IUnknown *unk)
#define test_input_type(i,t) _test_input_type(__LINE__,i,t)
static
void
_test_input_type
(
unsigned
line
,
IHTMLInputElement
*
input
,
const
WCHAR
*
extype
)
{
VARIANT_BOOL
b
;
BSTR
type
;
HRESULT
hres
;
...
...
@@ -3994,6 +3995,10 @@ static void _test_input_type(unsigned line, IHTMLInputElement *input, const WCHA
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_type failed: %08lx
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
!
lstrcmpW
(
type
,
extype
),
"type=%s, expected %s
\n
"
,
wine_dbgstr_w
(
type
),
wine_dbgstr_w
(
extype
));
SysFreeString
(
type
);
hres
=
IHTMLInputElement_get_complete
(
input
,
&
b
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"get_complete failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"complete = %x
\n
"
,
b
);
}
#define test_input_name(u, c) _test_input_name(__LINE__,u, c)
...
...
dlls/mshtml/tests/events.c
View file @
6b107d41
...
...
@@ -2412,6 +2412,7 @@ static void test_inputload(IHTMLDocument2 *doc)
{
IHTMLInputElement
*
input
;
IHTMLElement
*
elem
;
VARIANT_BOOL
b
;
VARIANT
v
;
BSTR
str
;
HRESULT
hres
;
...
...
@@ -2438,15 +2439,27 @@ static void test_inputload(IHTMLDocument2 *doc)
ok
(
V_DISPATCH
(
&
v
)
==
(
IDispatch
*
)
&
input_onload_obj
,
"V_DISPATCH(onload) != input_onload_obj
\n
"
);
VariantClear
(
&
v
);
hres
=
IHTMLInputElement_get_complete
(
input
,
&
b
);
ok
(
hres
==
S_OK
,
"get_complete failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"complete = %x
\n
"
,
b
);
str
=
SysAllocString
(
L"http://test.winehq.org/tests/winehq_snapshot/index_files/winehq_logo_text.png?v=2"
);
hres
=
IHTMLInputElement_put_src
(
input
,
str
);
ok
(
hres
==
S_OK
,
"put_src failed: %08lx
\n
"
,
hres
);
SysFreeString
(
str
);
hres
=
IHTMLInputElement_get_complete
(
input
,
&
b
);
ok
(
hres
==
S_OK
,
"get_complete failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"complete = %x
\n
"
,
b
);
SET_EXPECT
(
input_onload
);
pump_msgs
(
&
called_input_onload
);
CHECK_CALLED
(
input_onload
);
hres
=
IHTMLInputElement_get_complete
(
input
,
&
b
);
ok
(
hres
==
S_OK
,
"get_complete failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"complete = %x
\n
"
,
b
);
IHTMLInputElement_Release
(
input
);
}
...
...
@@ -2494,15 +2507,37 @@ static void test_link_load(IHTMLDocument2 *doc)
static
void
test_focus
(
IHTMLDocument2
*
doc
)
{
IHTMLInputElement
*
input
;
IHTMLElement2
*
elem2
;
IHTMLElement4
*
div
;
IHTMLElement
*
elem
;
VARIANT_BOOL
b
;
VARIANT
v
;
BSTR
str
;
HRESULT
hres
;
elem
=
get_elem_id
(
doc
,
L"inputid"
);
elem2
=
get_elem2_iface
((
IUnknown
*
)
elem
);
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLInputElement
,
(
void
**
)
&
input
);
IHTMLElement_Release
(
elem
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLInputElement iface: %08lx
\n
"
,
hres
);
hres
=
IHTMLInputElement_get_complete
(
input
,
&
b
);
ok
(
hres
==
S_OK
,
"get_complete failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"complete = %x
\n
"
,
b
);
str
=
SysAllocString
(
L"http://test.winehq.org/tests/winehq_snapshot/index_files/winehq_logo_text.png?v=3"
);
hres
=
IHTMLInputElement_put_src
(
input
,
str
);
ok
(
hres
==
S_OK
,
"put_src failed: %08lx
\n
"
,
hres
);
SysFreeString
(
str
);
pump_msgs
(
NULL
);
hres
=
IHTMLInputElement_get_complete
(
input
,
&
b
);
ok
(
hres
==
S_OK
,
"get_complete failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"complete = %x
\n
"
,
b
);
IHTMLInputElement_Release
(
input
);
elem
=
get_elem_id
(
doc
,
L"divid"
);
div
=
get_elem4_iface
((
IUnknown
*
)
elem
);
...
...
@@ -2779,7 +2814,9 @@ static void test_unload_event(IHTMLDocument2 *doc)
static
void
test_submit
(
IHTMLDocument2
*
doc
)
{
IHTMLElement
*
elem
,
*
submit
;
IHTMLInputElement
*
input
;
IHTMLFormElement
*
form
;
VARIANT_BOOL
b
;
VARIANT
v
;
DWORD
cp_cookie
;
HRESULT
hres
;
...
...
@@ -2810,6 +2847,14 @@ static void test_submit(IHTMLDocument2 *doc)
submit
=
get_elem_id
(
doc
,
L"submitid"
);
hres
=
IHTMLElement_QueryInterface
(
submit
,
&
IID_IHTMLInputElement
,
(
void
**
)
&
input
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLInputElement iface: %08lx
\n
"
,
hres
);
hres
=
IHTMLInputElement_get_complete
(
input
,
&
b
);
ok
(
hres
==
S_OK
,
"get_complete failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"complete = %x
\n
"
,
b
);
IHTMLInputElement_Release
(
input
);
SET_EXPECT
(
form_onclick
);
SET_EXPECT
(
form_onsubmit
);
hres
=
IHTMLElement_click
(
submit
);
...
...
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