https://bugs.webkit.org/show_bug.cgi?id=229181
Patch by Alex Christensen <achristensen@webkit.org> on 2021-08-17
Reviewed by Chris Dumez.
LayoutTests/imported/w3c:
* web-platform-tests/navigation-timing/nav2_test_attributes_values-expected.txt:
Source/WebCore:
When we make a PerformanceNavigationTiming object, we copy the DocumentLoadTiming and DocumentEventTiming values.
If PerformanceNavigationTiming is accessed before the document has finished loading, we still need to update the timing values.
Covered by a newly passing WPT test, which Chrome and Firefox already pass.
* dom/Document.cpp:
(WebCore::Document::documentEventTimingFromNavigationTiming):
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* dom/Document.h:
* loader/DocumentLoadTiming.h:
(WebCore::DocumentLoadTiming::setLoadEventStart):
(WebCore::DocumentLoadTiming::setLoadEventEnd):
(WebCore::DocumentLoadTiming::markLoadEventStart): Deleted.
(WebCore::DocumentLoadTiming::markLoadEventEnd): Deleted.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchLoadEvent):
* page/Performance.h:
* page/PerformanceNavigationTiming.h:
LayoutTests:
* TestExpectations:
* platform/mac-wk1/TestExpectations:
This test now always passes in WK2.
Canonical link: https://commits.webkit.org/240601@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281147 268f45cc-cd09-0410-ab3c-d52691b4dbfc