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
7bba2546
Commit
7bba2546
authored
Aug 30, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Move PerformanceTiming related fields to the window.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
15c7470a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
134 deletions
+123
-134
htmlwindow.c
dlls/mshtml/htmlwindow.c
+0
-8
mshtml_private.h
dlls/mshtml/mshtml_private.h
+17
-26
mutation.c
dlls/mshtml/mutation.c
+1
-1
navigate.c
dlls/mshtml/navigate.c
+10
-10
nsevents.c
dlls/mshtml/nsevents.c
+11
-14
omnavigator.c
dlls/mshtml/omnavigator.c
+82
-73
view.c
dlls/mshtml/view.c
+2
-2
No files found.
dlls/mshtml/htmlwindow.c
View file @
7bba2546
...
...
@@ -3913,7 +3913,6 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
This
->
local_storage
=
NULL
;
IHTMLStorage_Release
(
local_storage
);
}
IHTMLPerformanceTiming_Release
(
&
This
->
performance_timing
->
IHTMLPerformanceTiming_iface
);
unlink_variant
(
&
This
->
performance
);
}
...
...
@@ -4313,19 +4312,12 @@ static void *alloc_window(size_t size)
static
HRESULT
create_inner_window
(
HTMLOuterWindow
*
outer_window
,
IMoniker
*
mon
,
HTMLInnerWindow
**
ret
)
{
HTMLInnerWindow
*
window
;
HRESULT
hres
;
window
=
alloc_window
(
sizeof
(
HTMLInnerWindow
));
if
(
!
window
)
return
E_OUTOFMEMORY
;
window
->
base
.
IHTMLWindow2_iface
.
lpVtbl
=
&
HTMLWindow2Vtbl
;
hres
=
create_performance_timing
(
&
window
->
performance_timing
);
if
(
FAILED
(
hres
))
{
free
(
window
);
return
hres
;
}
list_init
(
&
window
->
children
);
list_init
(
&
window
->
script_hosts
);
list_init
(
&
window
->
bindings
);
...
...
dlls/mshtml/mshtml_private.h
View file @
7bba2546
...
...
@@ -529,30 +529,6 @@ typedef struct {
HTMLInnerWindow
*
window
;
}
OmHistory
;
typedef
struct
{
DispatchEx
dispex
;
IHTMLPerformanceTiming
IHTMLPerformanceTiming_iface
;
LONG
ref
;
ULONGLONG
navigation_start_time
;
ULONGLONG
unload_event_start_time
;
ULONGLONG
unload_event_end_time
;
ULONGLONG
redirect_time
;
ULONGLONG
dns_lookup_time
;
ULONGLONG
connect_time
;
ULONGLONG
request_time
;
ULONGLONG
response_start_time
;
ULONGLONG
response_end_time
;
ULONGLONG
dom_interactive_time
;
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
;
ULONGLONG
first_paint_time
;
}
HTMLPerformanceTiming
;
typedef
struct
nsChannelBSC
nsChannelBSC
;
struct
HTMLWindow
{
...
...
@@ -628,7 +604,6 @@ struct HTMLInnerWindow {
BOOL
performance_initialized
;
VARIANT
performance
;
HTMLPerformanceTiming
*
performance_timing
;
unsigned
blocking_depth
;
unsigned
parser_callback_cnt
;
...
...
@@ -647,6 +622,23 @@ struct HTMLInnerWindow {
ULONG
navigation_type
;
ULONG
redirect_count
;
ULONGLONG
navigation_start_time
;
ULONGLONG
unload_event_start_time
;
ULONGLONG
unload_event_end_time
;
ULONGLONG
redirect_time
;
ULONGLONG
dns_lookup_time
;
ULONGLONG
connect_time
;
ULONGLONG
request_time
;
ULONGLONG
response_start_time
;
ULONGLONG
response_end_time
;
ULONGLONG
dom_interactive_time
;
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
;
ULONGLONG
first_paint_time
;
};
typedef
enum
{
...
...
@@ -1015,7 +1007,6 @@ HRESULT create_location(HTMLOuterWindow*,HTMLLocation**);
HRESULT
create_navigator
(
compat_mode_t
,
IOmNavigator
**
);
HRESULT
create_html_screen
(
compat_mode_t
,
IHTMLScreen
**
);
HRESULT
create_performance
(
HTMLInnerWindow
*
,
IHTMLPerformance
**
);
HRESULT
create_performance_timing
(
HTMLPerformanceTiming
**
);
HRESULT
create_history
(
HTMLInnerWindow
*
,
OmHistory
**
);
HRESULT
create_namespace_collection
(
compat_mode_t
,
IHTMLNamespaceCollection
**
);
HRESULT
create_dom_implementation
(
HTMLDocumentNode
*
,
IHTMLDOMImplementation
**
);
...
...
dlls/mshtml/mutation.c
View file @
7bba2546
...
...
@@ -313,7 +313,7 @@ static nsresult run_end_load(HTMLDocumentNode *This, nsISupports *arg1, nsISuppo
bind_event_scripts
(
This
);
if
(
This
->
window
==
window
)
{
window
->
performance_timing
->
dom_interactive_time
=
get_time_stamp
();
window
->
dom_interactive_time
=
get_time_stamp
();
set_ready_state
(
This
->
outer_window
,
READYSTATE_INTERACTIVE
);
}
IHTMLWindow2_Release
(
&
window
->
base
.
IHTMLWindow2_iface
);
...
...
dlls/mshtml/navigate.c
View file @
7bba2546
...
...
@@ -1095,7 +1095,7 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
IWinInetHttpInfo
*
wininet_info
;
if
(
This
->
is_doc_channel
)
This
->
bsc
.
window
->
performance_timing
->
response_start_time
=
get_time_stamp
();
This
->
bsc
.
window
->
response_start_time
=
get_time_stamp
();
This
->
response_processed
=
TRUE
;
if
(
This
->
bsc
.
binding
)
{
...
...
@@ -1356,7 +1356,7 @@ static HRESULT nsChannelBSC_start_binding(BSCallback *bsc)
This
->
bsc
.
window
->
navigation_type
=
1
;
/* TYPE_RELOAD */
This
->
bsc
.
window
->
base
.
outer_window
->
base
.
inner_window
->
doc
->
skip_mutation_notif
=
FALSE
;
This
->
bsc
.
window
->
performance_timing
->
navigation_start_time
=
get_time_stamp
();
This
->
bsc
.
window
->
navigation_start_time
=
get_time_stamp
();
}
return
S_OK
;
...
...
@@ -1524,7 +1524,7 @@ static HRESULT nsChannelBSC_stop_binding(BSCallback *bsc, HRESULT result)
nsChannelBSC
*
This
=
nsChannelBSC_from_BSCallback
(
bsc
);
if
(
This
->
is_doc_channel
&&
This
->
bsc
.
window
)
{
This
->
bsc
.
window
->
performance_timing
->
response_end_time
=
get_time_stamp
();
This
->
bsc
.
window
->
response_end_time
=
get_time_stamp
();
if
(
result
!=
E_ABORT
)
{
if
(
FAILED
(
result
))
handle_navigation_error
(
This
,
result
);
...
...
@@ -1727,21 +1727,21 @@ static HRESULT nsChannelBSC_on_progress(BSCallback *bsc, ULONG progress, ULONG t
case
BINDSTATUS_REDIRECTING
:
if
(
This
->
is_doc_channel
)
{
This
->
bsc
.
window
->
redirect_count
++
;
if
(
!
This
->
bsc
.
window
->
performance_timing
->
redirect_time
)
This
->
bsc
.
window
->
performance_timing
->
redirect_time
=
get_time_stamp
();
if
(
!
This
->
bsc
.
window
->
redirect_time
)
This
->
bsc
.
window
->
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
();
if
(
This
->
is_doc_channel
&&
!
This
->
bsc
.
window
->
dns_lookup_time
)
This
->
bsc
.
window
->
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
();
This
->
bsc
.
window
->
connect_time
=
get_time_stamp
();
break
;
case
BINDSTATUS_SENDINGREQUEST
:
if
(
This
->
is_doc_channel
)
This
->
bsc
.
window
->
performance_timing
->
request_time
=
get_time_stamp
();
This
->
bsc
.
window
->
request_time
=
get_time_stamp
();
break
;
case
BINDSTATUS_BEGINDOWNLOADDATA
:
{
IWinInetHttpInfo
*
http_info
;
...
...
@@ -1798,7 +1798,7 @@ static HRESULT nsChannelBSC_on_response(BSCallback *bsc, DWORD response_code,
HRESULT
hres
;
if
(
This
->
is_doc_channel
)
This
->
bsc
.
window
->
performance_timing
->
response_start_time
=
get_time_stamp
();
This
->
bsc
.
window
->
response_start_time
=
get_time_stamp
();
This
->
response_processed
=
TRUE
;
This
->
nschannel
->
response_status
=
response_code
;
...
...
dlls/mshtml/nsevents.c
View file @
7bba2546
...
...
@@ -238,7 +238,7 @@ static nsresult handle_dom_content_loaded(HTMLDocumentNode *doc, nsIDOMEvent *ns
HRESULT
hres
;
if
(
doc
->
window
)
doc
->
window
->
performance_timing
->
dom_content_loaded_event_start_time
=
get_time_stamp
();
doc
->
window
->
dom_content_loaded_event_start_time
=
get_time_stamp
();
hres
=
create_event_from_nsevent
(
nsevent
,
dispex_compat_mode
(
&
doc
->
node
.
event_target
.
dispex
),
&
event
);
if
(
SUCCEEDED
(
hres
))
{
...
...
@@ -247,7 +247,7 @@ static nsresult handle_dom_content_loaded(HTMLDocumentNode *doc, nsIDOMEvent *ns
}
if
(
doc
->
window
)
doc
->
window
->
performance_timing
->
dom_content_loaded_event_end_time
=
get_time_stamp
();
doc
->
window
->
dom_content_loaded_event_end_time
=
get_time_stamp
();
return
NS_OK
;
}
...
...
@@ -345,7 +345,7 @@ static nsresult handle_load(HTMLDocumentNode *doc, nsIDOMEvent *event)
if
(
doc_obj
)
handle_docobj_load
(
doc_obj
);
doc
->
window
->
performance_timing
->
dom_complete_time
=
get_time_stamp
();
doc
->
window
->
dom_complete_time
=
get_time_stamp
();
set_ready_state
(
doc
->
outer_window
,
READYSTATE_COMPLETE
);
if
(
doc_obj
)
{
...
...
@@ -363,7 +363,7 @@ static nsresult handle_load(HTMLDocumentNode *doc, nsIDOMEvent *event)
IUnknown_Release
(
doc_obj
->
outer_unk
);
}
doc
->
window
->
performance_timing
->
load_event_start_time
=
get_time_stamp
();
doc
->
window
->
load_event_start_time
=
get_time_stamp
();
if
(
doc
->
dom_document
)
{
hres
=
create_document_event
(
doc
,
EVENTID_LOAD
,
&
load_event
);
...
...
@@ -381,7 +381,7 @@ static nsresult handle_load(HTMLDocumentNode *doc, nsIDOMEvent *event)
IDOMEvent_Release
(
&
load_event
->
IDOMEvent_iface
);
}
doc
->
window
->
performance_timing
->
load_event_end_time
=
get_time_stamp
();
doc
->
window
->
load_event_end_time
=
get_time_stamp
();
return
NS_OK
;
}
...
...
@@ -406,8 +406,7 @@ static nsresult handle_beforeunload(HTMLDocumentNode *doc, nsIDOMEvent *nsevent)
static
nsresult
handle_unload
(
HTMLDocumentNode
*
doc
,
nsIDOMEvent
*
nsevent
)
{
HTMLPerformanceTiming
*
timing
=
NULL
;
HTMLInnerWindow
*
window
;
HTMLInnerWindow
*
window
,
*
pending_window
;
DOMEvent
*
event
;
HRESULT
hres
;
...
...
@@ -415,11 +414,9 @@ static nsresult handle_unload(HTMLDocumentNode *doc, nsIDOMEvent *nsevent)
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
();
pending_window
=
window
->
base
.
outer_window
->
pending_window
;
if
(
pending_window
)
pending_window
->
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
))
{
...
...
@@ -427,8 +424,8 @@ static nsresult handle_unload(HTMLDocumentNode *doc, nsIDOMEvent *nsevent)
IDOMEvent_Release
(
&
event
->
IDOMEvent_iface
);
}
if
(
timing
)
timing
->
unload_event_end_time
=
get_time_stamp
();
if
(
pending_window
)
pending_window
->
unload_event_end_time
=
get_time_stamp
();
return
NS_OK
;
}
...
...
dlls/mshtml/omnavigator.c
View file @
7bba2546
This diff is collapsed.
Click to expand it.
dlls/mshtml/view.c
View file @
7bba2546
...
...
@@ -50,8 +50,8 @@ static void paint_document(HTMLDocumentObj *This)
RECT
rect
;
HDC
hdc
;
if
(
This
->
window
&&
This
->
window
->
base
.
inner_window
&&
!
This
->
window
->
base
.
inner_window
->
performance_timing
->
first_paint_time
)
This
->
window
->
base
.
inner_window
->
performance_timing
->
first_paint_time
=
get_time_stamp
();
if
(
This
->
window
&&
This
->
window
->
base
.
inner_window
&&
!
This
->
window
->
base
.
inner_window
->
first_paint_time
)
This
->
window
->
base
.
inner_window
->
first_paint_time
=
get_time_stamp
();
GetClientRect
(
This
->
hwnd
,
&
rect
);
...
...
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