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
2e0a5d42
Commit
2e0a5d42
authored
Nov 25, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement performance.navigation.redirectCount.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
25f205d9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
10 deletions
+24
-10
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
navigate.c
dlls/mshtml/navigate.c
+5
-2
omnavigator.c
dlls/mshtml/omnavigator.c
+16
-8
documentmode.js
dlls/mshtml/tests/documentmode.js
+1
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
2e0a5d42
...
...
@@ -508,6 +508,8 @@ typedef struct {
LONG
ref
;
ULONG
redirect_count
;
ULONGLONG
navigation_start_time
;
ULONGLONG
unload_event_start_time
;
ULONGLONG
unload_event_end_time
;
...
...
dlls/mshtml/navigate.c
View file @
2e0a5d42
...
...
@@ -1723,8 +1723,11 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG progress, ULONG t
This
->
nschannel
->
content_type
=
strdupWtoA
(
status_text
);
break
;
case
BINDSTATUS_REDIRECTING
:
if
(
This
->
is_doc_channel
&&
!
This
->
bsc
.
window
->
performance_timing
->
redirect_time
)
This
->
bsc
.
window
->
performance_timing
->
redirect_time
=
get_time_stamp
();
if
(
This
->
is_doc_channel
)
{
This
->
bsc
.
window
->
performance_timing
->
redirect_count
++
;
if
(
!
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
)
...
...
dlls/mshtml/omnavigator.c
View file @
2e0a5d42
...
...
@@ -1901,6 +1901,7 @@ typedef struct {
IHTMLPerformanceNavigation
IHTMLPerformanceNavigation_iface
;
LONG
ref
;
HTMLPerformanceTiming
*
timing
;
}
HTMLPerformanceNavigation
;
static
inline
HTMLPerformanceNavigation
*
impl_from_IHTMLPerformanceNavigation
(
IHTMLPerformanceNavigation
*
iface
)
...
...
@@ -1948,6 +1949,7 @@ static ULONG WINAPI HTMLPerformanceNavigation_Release(IHTMLPerformanceNavigation
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
IHTMLPerformanceTiming_Release
(
&
This
->
timing
->
IHTMLPerformanceTiming_iface
);
release_dispex
(
&
This
->
dispex
);
free
(
This
);
}
...
...
@@ -2003,8 +2005,11 @@ static HRESULT WINAPI HTMLPerformanceNavigation_get_type(IHTMLPerformanceNavigat
static
HRESULT
WINAPI
HTMLPerformanceNavigation_get_redirectCount
(
IHTMLPerformanceNavigation
*
iface
,
ULONG
*
p
)
{
HTMLPerformanceNavigation
*
This
=
impl_from_IHTMLPerformanceNavigation
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
This
->
timing
->
redirect_count
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLPerformanceNavigation_toString
(
IHTMLPerformanceNavigation
*
iface
,
BSTR
*
string
)
...
...
@@ -2055,7 +2060,7 @@ typedef struct {
LONG
ref
;
IHTMLPerformanceNavigation
*
navigation
;
I
HTMLPerformanceTiming
*
timing
;
HTMLPerformanceTiming
*
timing
;
}
HTMLPerformance
;
static
inline
HTMLPerformance
*
impl_from_IHTMLPerformance
(
IHTMLPerformance
*
iface
)
...
...
@@ -2103,7 +2108,7 @@ static ULONG WINAPI HTMLPerformance_Release(IHTMLPerformance *iface)
TRACE
(
"(%p) ref=%ld
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
IHTMLPerformanceTiming_Release
(
This
->
timing
);
IHTMLPerformanceTiming_Release
(
&
This
->
timing
->
IHTMLPerformanceTiming_iface
);
if
(
This
->
navigation
)
IHTMLPerformanceNavigation_Release
(
This
->
navigation
);
release_dispex
(
&
This
->
dispex
);
...
...
@@ -2164,6 +2169,9 @@ static HRESULT WINAPI HTMLPerformance_get_navigation(IHTMLPerformance *iface,
navigation
->
IHTMLPerformanceNavigation_iface
.
lpVtbl
=
&
HTMLPerformanceNavigationVtbl
;
navigation
->
ref
=
1
;
navigation
->
timing
=
This
->
timing
;
IHTMLPerformanceTiming_AddRef
(
&
This
->
timing
->
IHTMLPerformanceTiming_iface
);
init_dispatch
(
&
navigation
->
dispex
,
(
IUnknown
*
)
&
navigation
->
IHTMLPerformanceNavigation_iface
,
&
HTMLPerformanceNavigation_dispex
,
dispex_compat_mode
(
&
This
->
dispex
));
...
...
@@ -2180,7 +2188,7 @@ static HRESULT WINAPI HTMLPerformance_get_timing(IHTMLPerformance *iface, IHTMLP
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
IHTMLPerformanceTiming_AddRef
(
*
p
=
This
->
timing
);
IHTMLPerformanceTiming_AddRef
(
*
p
=
&
This
->
timing
->
IHTMLPerformanceTiming_iface
);
return
S_OK
;
}
...
...
@@ -2240,10 +2248,10 @@ HRESULT create_performance(HTMLInnerWindow *window, IHTMLPerformance **ret)
init_dispatch
(
&
performance
->
dispex
,
(
IUnknown
*
)
&
performance
->
IHTMLPerformance_iface
,
&
HTMLPerformance_dispex
,
compat_mode
);
performance
->
timing
=
&
window
->
performance_timing
->
IHTMLPerformanceTiming_iface
;
IHTMLPerformanceTiming_AddRef
(
performance
->
timing
);
performance
->
timing
=
window
->
performance_timing
;
IHTMLPerformanceTiming_AddRef
(
&
performance
->
timing
->
IHTMLPerformanceTiming_iface
);
init_dispatch
(
&
window
->
performance_timing
->
dispex
,
(
IUnknown
*
)
&
window
->
performance_
timing
->
IHTMLPerformanceTiming_iface
,
init_dispatch
(
&
performance
->
timing
->
dispex
,
(
IUnknown
*
)
&
performance
->
timing
->
IHTMLPerformanceTiming_iface
,
&
HTMLPerformanceTiming_dispex
,
compat_mode
);
*
ret
=
&
performance
->
IHTMLPerformance_iface
;
...
...
dlls/mshtml/tests/documentmode.js
View file @
2e0a5d42
...
...
@@ -90,6 +90,7 @@ sync_test("performance timing", function() {
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"
);
ok
(
performance
.
navigation
.
redirectCount
===
0
,
"redirectCount = "
+
performance
.
navigation
.
redirectCount
);
});
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