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
8d97a7b3
Commit
8d97a7b3
authored
Jul 25, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Jul 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement ProgressEvent's lengthComputable prop.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
f0806c52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
htmlevent.c
dlls/mshtml/htmlevent.c
+11
-2
xhr.js
dlls/mshtml/tests/xhr.js
+5
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
8d97a7b3
...
@@ -2498,8 +2498,17 @@ static HRESULT WINAPI DOMProgressEvent_Invoke(IDOMProgressEvent *iface, DISPID d
...
@@ -2498,8 +2498,17 @@ static HRESULT WINAPI DOMProgressEvent_Invoke(IDOMProgressEvent *iface, DISPID d
static
HRESULT
WINAPI
DOMProgressEvent_get_lengthComputable
(
IDOMProgressEvent
*
iface
,
VARIANT_BOOL
*
p
)
static
HRESULT
WINAPI
DOMProgressEvent_get_lengthComputable
(
IDOMProgressEvent
*
iface
,
VARIANT_BOOL
*
p
)
{
{
DOMProgressEvent
*
This
=
impl_from_IDOMProgressEvent
(
iface
);
DOMProgressEvent
*
This
=
impl_from_IDOMProgressEvent
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsresult
nsres
;
return
E_NOTIMPL
;
cpp_bool
b
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsres
=
nsIDOMProgressEvent_GetLengthComputable
(
This
->
nsevent
,
&
b
);
if
(
NS_FAILED
(
nsres
))
return
map_nsresult
(
nsres
);
*
p
=
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
DOMProgressEvent_get_loaded
(
IDOMProgressEvent
*
iface
,
ULONGLONG
*
p
)
static
HRESULT
WINAPI
DOMProgressEvent_get_loaded
(
IDOMProgressEvent
*
iface
,
ULONGLONG
*
p
)
...
...
dlls/mshtml/tests/xhr.js
View file @
8d97a7b3
...
@@ -47,6 +47,7 @@ function test_xhr() {
...
@@ -47,6 +47,7 @@ function test_xhr() {
var
props
=
[
"initProgressEvent"
,
"lengthComputable"
,
"loaded"
,
"total"
];
var
props
=
[
"initProgressEvent"
,
"lengthComputable"
,
"loaded"
,
"total"
];
for
(
var
i
=
0
;
i
<
props
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
props
.
length
;
i
++
)
ok
(
props
[
i
]
in
e
,
props
[
i
]
+
" not available in loadstart"
);
ok
(
props
[
i
]
in
e
,
props
[
i
]
+
" not available in loadstart"
);
ok
(
e
.
lengthComputable
===
false
,
"lengthComputable in loadstart = "
+
e
.
lengthComputable
);
loadstart
=
true
;
loadstart
=
true
;
};
};
xhr
.
onloadend
=
function
(
e
)
{
xhr
.
onloadend
=
function
(
e
)
{
...
@@ -55,6 +56,7 @@ function test_xhr() {
...
@@ -55,6 +56,7 @@ function test_xhr() {
var
props
=
[
"initProgressEvent"
,
"lengthComputable"
,
"loaded"
,
"total"
];
var
props
=
[
"initProgressEvent"
,
"lengthComputable"
,
"loaded"
,
"total"
];
for
(
var
i
=
0
;
i
<
props
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
props
.
length
;
i
++
)
ok
(
props
[
i
]
in
e
,
props
[
i
]
+
" not available in loadend"
);
ok
(
props
[
i
]
in
e
,
props
[
i
]
+
" not available in loadend"
);
ok
(
e
.
lengthComputable
===
true
,
"lengthComputable in loadend = "
+
e
.
lengthComputable
);
next_test
();
next_test
();
};
};
}
}
...
@@ -171,6 +173,9 @@ function test_timeout() {
...
@@ -171,6 +173,9 @@ function test_timeout() {
else
else
ok
(
props
[
r
]
in
e
,
props
[
r
]
+
" not available"
);
ok
(
props
[
r
]
in
e
,
props
[
r
]
+
" not available"
);
}
}
if
(
v
>=
10
)
{
ok
(
e
.
lengthComputable
===
false
,
"lengthComputable = "
+
e
.
lengthComputable
);
}
next_test
();
next_test
();
}
}
...
...
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