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
ebd7f4e7
Commit
ebd7f4e7
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 ProgressEvent's initProgressEvent method.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
14db082f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
3 deletions
+43
-3
htmlevent.c
dlls/mshtml/htmlevent.c
+25
-3
es5.js
dlls/mshtml/tests/es5.js
+13
-0
xhr.js
dlls/mshtml/tests/xhr.js
+5
-0
No files found.
dlls/mshtml/htmlevent.c
View file @
ebd7f4e7
...
...
@@ -2583,6 +2583,7 @@ typedef struct {
DOMEvent
event
;
IDOMProgressEvent
IDOMProgressEvent_iface
;
nsIDOMProgressEvent
*
nsevent
;
BOOL
manual_init
;
}
DOMProgressEvent
;
static
inline
DOMProgressEvent
*
impl_from_IDOMProgressEvent
(
IDOMProgressEvent
*
iface
)
...
...
@@ -2670,7 +2671,7 @@ static HRESULT WINAPI DOMProgressEvent_get_total(IDOMProgressEvent *iface, ULONG
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
NS_FAILED
(
nsIDOMProgressEvent_GetLengthComputable
(
This
->
nsevent
,
&
b
))
||
!
b
)
{
if
(
!
This
->
manual_init
&&
(
NS_FAILED
(
nsIDOMProgressEvent_GetLengthComputable
(
This
->
nsevent
,
&
b
))
||
!
b
)
)
{
*
p
=
~
0
;
return
S_OK
;
}
...
...
@@ -2683,9 +2684,30 @@ static HRESULT WINAPI DOMProgressEvent_initProgressEvent(IDOMProgressEvent *ifac
ULONGLONG
loaded
,
ULONGLONG
total
)
{
DOMProgressEvent
*
This
=
impl_from_IDOMProgressEvent
(
iface
);
FIXME
(
"(%p)->(%s %x %x %x %s %s)
\n
"
,
This
,
debugstr_w
(
type
),
can_bubble
,
cancelable
,
lengthComputable
,
nsAString
type_str
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %x %x %x %s %s)
\n
"
,
This
,
debugstr_w
(
type
),
can_bubble
,
cancelable
,
lengthComputable
,
wine_dbgstr_longlong
(
loaded
),
wine_dbgstr_longlong
(
total
));
return
E_NOTIMPL
;
if
(
This
->
event
.
target
)
{
TRACE
(
"called on already dispatched event
\n
"
);
return
S_OK
;
}
hres
=
IDOMEvent_initEvent
(
&
This
->
event
.
IDOMEvent_iface
,
type
,
can_bubble
,
cancelable
);
if
(
SUCCEEDED
(
hres
))
{
nsAString_InitDepend
(
&
type_str
,
type
);
nsres
=
nsIDOMProgressEvent_InitProgressEvent
(
This
->
nsevent
,
&
type_str
,
!!
can_bubble
,
!!
cancelable
,
!!
lengthComputable
,
loaded
,
total
);
nsAString_Finish
(
&
type_str
);
if
(
NS_FAILED
(
nsres
))
return
map_nsresult
(
nsres
);
This
->
manual_init
=
TRUE
;
}
return
hres
;
}
static
const
IDOMProgressEventVtbl
DOMProgressEventVtbl
=
{
...
...
dlls/mshtml/tests/es5.js
View file @
ebd7f4e7
...
...
@@ -2095,3 +2095,16 @@ sync_test("matchMedia", function() {
mql
=
window
.
matchMedia
(
"(max-width: 1000px)"
);
ok
(
mql
.
matches
===
true
,
"(max-width: 1000px) does not match"
);
});
sync_test
(
"initProgressEvent"
,
function
()
{
var
e
=
document
.
createEvent
(
"ProgressEvent"
);
e
.
initProgressEvent
(
"loadend"
,
false
,
false
,
true
,
13
,
42
);
ok
(
e
.
lengthComputable
===
true
,
"lengthComputable = "
+
e
.
lengthComputable
);
ok
(
e
.
loaded
===
13
,
"loaded = "
+
e
.
loaded
);
ok
(
e
.
total
===
42
,
"total = "
+
e
.
total
);
e
.
initProgressEvent
(
"loadstart"
,
false
,
false
,
false
,
99
,
50
);
ok
(
e
.
lengthComputable
===
false
,
"lengthComputable after re-init = "
+
e
.
lengthComputable
);
ok
(
e
.
loaded
===
99
,
"loaded after re-init = "
+
e
.
loaded
);
ok
(
e
.
total
===
50
,
"total after re-init = "
+
e
.
total
);
});
dlls/mshtml/tests/xhr.js
View file @
ebd7f4e7
...
...
@@ -319,6 +319,11 @@ function test_timeout() {
ok
(
e
.
lengthComputable
===
false
,
"lengthComputable = "
+
e
.
lengthComputable
);
ok
(
e
.
loaded
===
0
,
"loaded = "
+
e
.
loaded
);
ok
(
e
.
total
===
18446744073709552000
,
"total = "
+
e
.
total
);
e
.
initProgressEvent
(
"timeout"
,
false
,
false
,
true
,
13
,
42
);
ok
(
e
.
lengthComputable
===
false
,
"lengthComputable after initProgressEvent = "
+
e
.
lengthComputable
);
ok
(
e
.
loaded
===
0
,
"loaded after initProgressEvent = "
+
e
.
loaded
);
ok
(
e
.
total
===
18446744073709552000
,
"total after initProgressEvent = "
+
e
.
total
);
}
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