Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
72b13c5a
Commit
72b13c5a
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.loadEventStart & loadEventEnd.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
6fa4c426
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
nsevents.c
dlls/mshtml/nsevents.c
+4
-0
omnavigator.c
dlls/mshtml/omnavigator.c
+4
-4
documentmode.js
dlls/mshtml/tests/documentmode.js
+5
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
72b13c5a
...
...
@@ -522,6 +522,8 @@ typedef struct {
ULONGLONG
dom_complete_time
;
ULONGLONG
dom_content_loaded_event_start_time
;
ULONGLONG
dom_content_loaded_event_end_time
;
ULONGLONG
load_event_start_time
;
ULONGLONG
load_event_end_time
;
}
HTMLPerformanceTiming
;
typedef
struct
nsChannelBSC
nsChannelBSC
;
...
...
dlls/mshtml/nsevents.c
View file @
72b13c5a
...
...
@@ -363,6 +363,8 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
IDocObjectService_FireDocumentComplete
(
doc_obj
->
doc_object_service
,
&
doc
->
outer_window
->
base
.
IHTMLWindow2_iface
,
0
);
doc
->
window
->
performance_timing
->
load_event_start_time
=
get_time_stamp
();
if
(
doc
->
dom_document
)
{
hres
=
create_document_event
(
doc
,
EVENTID_LOAD
,
&
load_event
);
if
(
SUCCEEDED
(
hres
))
{
...
...
@@ -379,6 +381,8 @@ static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event
IDOMEvent_Release
(
&
load_event
->
IDOMEvent_iface
);
}
doc
->
window
->
performance_timing
->
load_event_end_time
=
get_time_stamp
();
IHTMLDOMNode_Release
(
&
doc
->
node
.
IHTMLDOMNode_iface
);
return
NS_OK
;
}
...
...
dlls/mshtml/omnavigator.c
View file @
72b13c5a
...
...
@@ -1796,9 +1796,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_loadEventStart(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
->
load_event_start_time
;
return
S_OK
;
}
...
...
@@ -1806,9 +1806,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_loadEventEnd(IHTMLPerformanceTim
{
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
->
load_event_end_time
;
return
S_OK
;
}
...
...
dlls/mshtml/tests/documentmode.js
View file @
72b13c5a
...
...
@@ -33,6 +33,8 @@ ok(performance.timing.domInteractive === 0, "domInteractive != 0");
ok
(
performance
.
timing
.
domComplete
===
0
,
"domComplete != 0"
);
ok
(
performance
.
timing
.
domContentLoadedEventStart
===
0
,
"domContentLoadedEventStart != 0"
);
ok
(
performance
.
timing
.
domContentLoadedEventEnd
===
0
,
"domContentLoadedEventEnd != 0"
);
ok
(
performance
.
timing
.
loadEventStart
===
0
,
"loadEventStart != 0"
);
ok
(
performance
.
timing
.
loadEventEnd
===
0
,
"loadEventEnd != 0"
);
ok
(
performance
.
timing
.
unloadEventStart
===
0
,
"unloadEventStart != 0"
);
ok
(
performance
.
timing
.
unloadEventEnd
===
0
,
"unloadEventEnd != 0"
);
ok
(
performance
.
timing
.
redirectStart
===
0
,
"redirectStart != 0"
);
...
...
@@ -59,6 +61,7 @@ if(window.addEventListener) {
ok
(
r
===
"[object PageTransitionEvent]"
,
"pageshow toString = "
+
r
);
ok
(
"persisted"
in
e
,
"'persisted' not in pageshow event"
);
ok
(
document
.
readyState
===
"complete"
,
"pageshow readyState = "
+
document
.
readyState
);
ok
(
performance
.
timing
.
loadEventEnd
>
0
,
"loadEventEnd <= 0 in pageshow handler"
);
},
true
);
window
.
addEventListener
(
"pagehide"
,
function
(
e
)
{
...
...
@@ -84,6 +87,8 @@ sync_test("performance timing", function() {
ok
(
performance
.
timing
.
domContentLoadedEventStart
>=
performance
.
timing
.
domInteractive
,
"domContentLoadedEventStart < domInteractive"
);
ok
(
performance
.
timing
.
domContentLoadedEventEnd
>=
performance
.
timing
.
domContentLoadedEventStart
,
"domContentLoadedEventEnd < domContentLoadedEventStart"
);
ok
(
performance
.
timing
.
domComplete
>=
performance
.
timing
.
domContentLoadedEventEnd
,
"domComplete < domContentLoadedEventEnd"
);
ok
(
performance
.
timing
.
loadEventStart
>=
performance
.
timing
.
domComplete
,
"loadEventStart < domComplete"
);
ok
(
performance
.
timing
.
loadEventEnd
>=
performance
.
timing
.
loadEventStart
,
"loadEventEnd < loadEventStart"
);
});
sync_test
(
"page transition events"
,
function
()
{
...
...
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