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
020a020d
Commit
020a020d
authored
Nov 22, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement performance.timing.unloadEventStart & unloadEventEnd.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
5db7d0d0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
4 deletions
+21
-4
htmlwindow.c
dlls/mshtml/htmlwindow.c
+3
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
nsevents.c
dlls/mshtml/nsevents.c
+10
-0
omnavigator.c
dlls/mshtml/omnavigator.c
+4
-4
documentmode.js
dlls/mshtml/tests/documentmode.js
+2
-0
No files found.
dlls/mshtml/htmlwindow.c
View file @
020a020d
...
...
@@ -4125,6 +4125,9 @@ HRESULT create_outer_window(GeckoBrowser *browser, mozIDOMWindowProxy *mozwindow
return
hres
;
}
/* Initial empty doc does not have unload events or timings */
window
->
base
.
inner_window
->
doc
->
unload_sent
=
TRUE
;
if
(
parent
)
{
IHTMLWindow2_AddRef
(
&
window
->
base
.
IHTMLWindow2_iface
);
...
...
dlls/mshtml/mshtml_private.h
View file @
020a020d
...
...
@@ -510,6 +510,8 @@ typedef struct {
LONG
ref
;
ULONGLONG
navigation_start_time
;
ULONGLONG
unload_event_start_time
;
ULONGLONG
unload_event_end_time
;
ULONGLONG
redirect_time
;
}
HTMLPerformanceTiming
;
...
...
dlls/mshtml/nsevents.c
View file @
020a020d
...
...
@@ -384,6 +384,7 @@ static nsresult NSAPI handle_unload(nsIDOMEventListener *iface, nsIDOMEvent *nse
{
nsEventListener
*
This
=
impl_from_nsIDOMEventListener
(
iface
);
HTMLDocumentNode
*
doc
=
This
->
This
->
doc
;
HTMLPerformanceTiming
*
timing
=
NULL
;
HTMLInnerWindow
*
window
;
DOMEvent
*
event
;
HRESULT
hres
;
...
...
@@ -392,12 +393,21 @@ static nsresult NSAPI handle_unload(nsIDOMEventListener *iface, nsIDOMEvent *nse
return
NS_OK
;
doc
->
unload_sent
=
TRUE
;
if
(
window
->
base
.
outer_window
->
pending_window
)
timing
=
window
->
base
.
outer_window
->
pending_window
->
performance_timing
;
if
(
timing
)
timing
->
unload_event_start_time
=
get_time_stamp
();
hres
=
create_event_from_nsevent
(
nsevent
,
dispex_compat_mode
(
&
doc
->
node
.
event_target
.
dispex
),
&
event
);
if
(
SUCCEEDED
(
hres
))
{
dispatch_event
(
&
window
->
event_target
,
event
);
IDOMEvent_Release
(
&
event
->
IDOMEvent_iface
);
}
if
(
timing
)
timing
->
unload_event_end_time
=
get_time_stamp
();
return
NS_OK
;
}
...
...
dlls/mshtml/omnavigator.c
View file @
020a020d
...
...
@@ -1601,9 +1601,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_unloadEventStart(IHTMLPerformanc
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
FIXME
(
"(%p)->(%p) returning fake value
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
T
IMING_FAKE_TIMESTAMP
;
*
p
=
T
his
->
unload_event_start_time
;
return
S_OK
;
}
...
...
@@ -1611,9 +1611,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_unloadEventEnd(IHTMLPerformanceT
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
FIXME
(
"(%p)->(%p) returning fake value
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
T
IMING_FAKE_TIMESTAMP
;
*
p
=
T
his
->
unload_event_end_time
;
return
S_OK
;
}
...
...
dlls/mshtml/tests/documentmode.js
View file @
020a020d
...
...
@@ -20,6 +20,8 @@ var compat_version;
var
tests
=
[];
ok
(
performance
.
timing
.
navigationStart
>
0
,
"navigationStart <= 0"
);
ok
(
performance
.
timing
.
unloadEventStart
===
0
,
"unloadEventStart != 0"
);
ok
(
performance
.
timing
.
unloadEventEnd
===
0
,
"unloadEventEnd != 0"
);
ok
(
performance
.
timing
.
redirectStart
===
0
,
"redirectStart != 0"
);
var
pageshow_fired
=
false
,
pagehide_fired
=
false
;
...
...
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