Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d4afb4d2ec54e094e22d269c5ed230c83ea79d7
      
https://github.com/WebKit/WebKit/commit/2d4afb4d2ec54e094e22d269c5ed230c83ea79d7
  Author: Chris Dumez <[email protected]>
  Date:   2026-05-03 (Sun, 03 May 2026)

  Changed paths:
    A 
LayoutTests/performance-api/performance-navigation-timing-document-event-timing-expected.txt
    A 
LayoutTests/performance-api/performance-navigation-timing-document-event-timing.html
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Document.h

  Log Message:
  -----------
  REGRESSION: PerformanceNavigationTiming.domInteractive and 
domContentLoadedEventEnd always return 0
https://bugs.webkit.org/show_bug.cgi?id=312861
rdar://175739835

Reviewed by Ryosuke Niwa.

308683@main changed Document::documentEventTimingFromNavigationTiming() to 
return
std::optional<DocumentEventTiming> instead of DocumentEventTiming*. This caused 
all
call sites to modify a local copy of DocumentEventTiming that was immediately 
discarded,
rather than the actual DocumentEventTiming owned by the 
PerformanceNavigationTiming object.

As a result, domInteractive, domContentLoadedEventStart, 
domContentLoadedEventEnd, and
domComplete were always reported as 0 via the Navigation Timing Level 2 API.

Fix by returning a raw pointer again, using a local auto* for the 
navigationTiming
to avoid the LIFETIME_BOUND warning that motivated the original change.

Test: performance-api/performance-navigation-timing-document-event-timing.html

* 
LayoutTests/performance-api/performance-navigation-timing-document-event-timing-expected.txt:
 Added.
* 
LayoutTests/performance-api/performance-navigation-timing-document-event-timing.html:
 Added.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::documentEventTimingFromNavigationTiming):
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* Source/WebCore/dom/Document.h:

Canonical link: https://commits.webkit.org/312500@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to