mshtml: Implement performance.timing.navigationStart.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2022-11-22 18:26:21 +02:00 committed by Alexandre Julliard
parent 1dc507d33c
commit fe66c7240a
4 changed files with 9 additions and 3 deletions

View file

@ -508,6 +508,8 @@ typedef struct {
IHTMLPerformanceTiming IHTMLPerformanceTiming_iface;
LONG ref;
ULONGLONG navigation_start_time;
} HTMLPerformanceTiming;
typedef struct nsChannelBSC nsChannelBSC;

View file

@ -1357,8 +1357,10 @@ static HRESULT nsChannelBSC_start_binding(BSCallback *bsc)
{
nsChannelBSC *This = nsChannelBSC_from_BSCallback(bsc);
if(This->is_doc_channel)
if(This->is_doc_channel) {
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();
}
return S_OK;
}

View file

@ -1591,9 +1591,9 @@ static HRESULT WINAPI HTMLPerformanceTiming_get_navigationStart(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->navigation_start_time;
return S_OK;
}

View file

@ -19,6 +19,8 @@
var compat_version;
var tests = [];
ok(performance.timing.navigationStart > 0, "navigationStart <= 0");
var pageshow_fired = false, pagehide_fired = false;
document.doc_unload_events_called = false;
window.onbeforeunload = function() { ok(false, "beforeunload fired"); };