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
0118f360
Commit
0118f360
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 the remaining pre-response performance.timing props.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
020a020d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
14 deletions
+60
-14
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-0
navigate.c
dlls/mshtml/navigate.c
+12
-0
omnavigator.c
dlls/mshtml/omnavigator.c
+38
-14
documentmode.js
dlls/mshtml/tests/documentmode.js
+7
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
0118f360
...
...
@@ -513,6 +513,9 @@ typedef struct {
ULONGLONG
unload_event_start_time
;
ULONGLONG
unload_event_end_time
;
ULONGLONG
redirect_time
;
ULONGLONG
dns_lookup_time
;
ULONGLONG
connect_time
;
ULONGLONG
request_time
;
}
HTMLPerformanceTiming
;
typedef
struct
nsChannelBSC
nsChannelBSC
;
...
...
dlls/mshtml/navigate.c
View file @
0118f360
...
...
@@ -1720,6 +1720,18 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG progress, ULONG t
if
(
This
->
is_doc_channel
&&
!
This
->
bsc
.
window
->
performance_timing
->
redirect_time
)
This
->
bsc
.
window
->
performance_timing
->
redirect_time
=
get_time_stamp
();
return
handle_redirect
(
This
,
status_text
);
case
BINDSTATUS_FINDINGRESOURCE
:
if
(
This
->
is_doc_channel
&&
!
This
->
bsc
.
window
->
performance_timing
->
dns_lookup_time
)
This
->
bsc
.
window
->
performance_timing
->
dns_lookup_time
=
get_time_stamp
();
break
;
case
BINDSTATUS_CONNECTING
:
if
(
This
->
is_doc_channel
)
This
->
bsc
.
window
->
performance_timing
->
connect_time
=
get_time_stamp
();
break
;
case
BINDSTATUS_SENDINGREQUEST
:
if
(
This
->
is_doc_channel
)
This
->
bsc
.
window
->
performance_timing
->
request_time
=
get_time_stamp
();
break
;
case
BINDSTATUS_BEGINDOWNLOADDATA
:
{
IWinInetHttpInfo
*
http_info
;
DWORD
status
,
size
=
sizeof
(
DWORD
);
...
...
dlls/mshtml/omnavigator.c
View file @
0118f360
...
...
@@ -1587,6 +1587,24 @@ static HRESULT WINAPI HTMLPerformanceTiming_Invoke(IHTMLPerformanceTiming *iface
#define TIMING_FAKE_TIMESTAMP 0xdeadbeef
static
ULONGLONG
get_fetch_time
(
HTMLPerformanceTiming
*
This
)
{
/* If there's no prior doc unloaded and no redirects, fetch time == navigationStart time */
if
(
!
This
->
unload_event_end_time
&&
!
This
->
redirect_time
)
return
This
->
navigation_start_time
;
if
(
This
->
dns_lookup_time
)
return
This
->
dns_lookup_time
;
if
(
This
->
connect_time
)
return
This
->
connect_time
;
if
(
This
->
request_time
)
return
This
->
request_time
;
if
(
This
->
unload_event_end_time
)
return
This
->
unload_event_end_time
;
return
This
->
redirect_time
;
}
static
HRESULT
WINAPI
HTMLPerformanceTiming_get_navigationStart
(
IHTMLPerformanceTiming
*
iface
,
ULONGLONG
*
p
)
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
...
...
@@ -1631,9 +1649,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_redirectEnd(IHTMLPerformanceTimi
{
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
->
redirect_time
?
get_fetch_time
(
This
)
:
0
;
return
S_OK
;
}
...
...
@@ -1641,9 +1659,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_fetchStart(IHTMLPerformanceTimin
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
FIXME
(
"(%p)->(%p) returning fake value
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
TIMING_FAKE_TIMESTAMP
;
*
p
=
get_fetch_time
(
This
)
;
return
S_OK
;
}
...
...
@@ -1651,9 +1669,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_domainLookupStart(IHTMLPerforman
{
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
->
dns_lookup_time
?
This
->
dns_lookup_time
:
get_fetch_time
(
This
)
;
return
S_OK
;
}
...
...
@@ -1661,9 +1679,10 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_domainLookupEnd(IHTMLPerformance
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
FIXME
(
"(%p)->(%p) returning fake value
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
TIMING_FAKE_TIMESTAMP
;
*
p
=
This
->
connect_time
?
This
->
connect_time
:
This
->
dns_lookup_time
?
This
->
dns_lookup_time
:
get_fetch_time
(
This
);
return
S_OK
;
}
...
...
@@ -1671,9 +1690,10 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_connectStart(IHTMLPerformanceTim
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
FIXME
(
"(%p)->(%p) returning fake value
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
TIMING_FAKE_TIMESTAMP
;
*
p
=
This
->
connect_time
?
This
->
connect_time
:
This
->
dns_lookup_time
?
This
->
dns_lookup_time
:
get_fetch_time
(
This
);
return
S_OK
;
}
...
...
@@ -1681,9 +1701,11 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_connectEnd(IHTMLPerformanceTimin
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
FIXME
(
"(%p)->(%p) returning fake value
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
TIMING_FAKE_TIMESTAMP
;
*
p
=
This
->
request_time
?
This
->
request_time
:
This
->
connect_time
?
This
->
connect_time
:
This
->
dns_lookup_time
?
This
->
dns_lookup_time
:
get_fetch_time
(
This
);
return
S_OK
;
}
...
...
@@ -1691,9 +1713,11 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_requestStart(IHTMLPerformanceTim
{
HTMLPerformanceTiming
*
This
=
impl_from_IHTMLPerformanceTiming
(
iface
);
FIXME
(
"(%p)->(%p) returning fake value
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
TIMING_FAKE_TIMESTAMP
;
*
p
=
This
->
request_time
?
This
->
request_time
:
This
->
connect_time
?
This
->
connect_time
:
This
->
dns_lookup_time
?
This
->
dns_lookup_time
:
get_fetch_time
(
This
);
return
S_OK
;
}
...
...
dlls/mshtml/tests/documentmode.js
View file @
0118f360
...
...
@@ -20,9 +20,16 @@ var compat_version;
var
tests
=
[];
ok
(
performance
.
timing
.
navigationStart
>
0
,
"navigationStart <= 0"
);
ok
(
performance
.
timing
.
fetchStart
==
performance
.
timing
.
navigationStart
,
"fetchStart != navigationStart"
);
ok
(
performance
.
timing
.
domainLookupStart
>=
performance
.
timing
.
fetchStart
,
"domainLookupStart < fetchStart"
);
ok
(
performance
.
timing
.
domainLookupEnd
>=
performance
.
timing
.
domainLookupStart
,
"domainLookupEnd < domainLookupStart"
);
ok
(
performance
.
timing
.
connectStart
>=
performance
.
timing
.
domainLookupEnd
,
"connectStart < domainLookupEnd"
);
ok
(
performance
.
timing
.
connectEnd
>=
performance
.
timing
.
connectStart
,
"connectEnd < connectStart"
);
ok
(
performance
.
timing
.
requestStart
>=
performance
.
timing
.
connectEnd
,
"requestStart < connectEnd"
);
ok
(
performance
.
timing
.
unloadEventStart
===
0
,
"unloadEventStart != 0"
);
ok
(
performance
.
timing
.
unloadEventEnd
===
0
,
"unloadEventEnd != 0"
);
ok
(
performance
.
timing
.
redirectStart
===
0
,
"redirectStart != 0"
);
ok
(
performance
.
timing
.
redirectEnd
===
0
,
"redirectEnd != 0"
);
var
pageshow_fired
=
false
,
pagehide_fired
=
false
;
document
.
doc_unload_events_called
=
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