From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlwindow.c | 2 +- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/navigate.c | 4 +++- dlls/mshtml/omnavigator.c | 4 ++-- dlls/mshtml/tests/documentmode.js | 2 ++ 5 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 0bf1a2c6ce3..9f64e3526c6 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2435,7 +2435,7 @@ static HRESULT WINAPI HTMLWindow7_get_performance(IHTMLWindow7 *iface, VARIANT * if(!This->performance_initialized) { IHTMLPerformance *performance;
- hres = create_performance(dispex_compat_mode(&This->event_target.dispex), &performance); + hres = create_performance(This, &performance); if(FAILED(hres)) return hres;
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 744dc4c7801..d80c9284168 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -508,6 +508,8 @@ typedef struct { IHTMLPerformanceTiming IHTMLPerformanceTiming_iface;
LONG ref; + + ULONGLONG navigation_start_time; } HTMLPerformanceTiming;
typedef struct nsChannelBSC nsChannelBSC; diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 5825e0f27c0..241d790f9e6 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -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; } diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 4551f4e2dc3..9b67c69d6e7 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -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) returning fake value\n", This, p);
- *p = TIMING_FAKE_TIMESTAMP; + *p = This->navigation_start_time; return S_OK; }
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 33d60f7e835..f83597d305a 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -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"); };