Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4277592f79d3bf61f32dba6ccb558fbd3435c4ac
      
https://github.com/WebKit/WebKit/commit/4277592f79d3bf61f32dba6ccb558fbd3435c4ac
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    A 
LayoutTests/fast/history/back-to-discarded-page-loads-subframe-history-url-expected.txt
    A 
LayoutTests/fast/history/back-to-discarded-page-loads-subframe-history-url.html
    A LayoutTests/fast/history/resources/discarded-page-subframe-blue.html
    A LayoutTests/fast/history/resources/discarded-page-subframe-red.html
    M 
LayoutTests/http/tests/navigation/multiple-back-forward-entries-expected.txt
    M Source/WebCore/loader/HistoryController.cpp

  Log Message:
  -----------
  Subframe is missing from the back/forward list when its src changes before 
the first load commits
https://bugs.webkit.org/show_bug.cgi?id=320488
rdar://149977268

Reviewed by Basuke Suzuki.

When a subframe's src changes before its initial load has created a history 
item,
HistoryController::updateForRedirectWithLockedBackForwardList() took a path 
that skipped creating a
child item in the parent's current item. With no child item recorded, going 
back to a page discarded
from the back/forward cache reloaded the subframe's original markup src instead 
of its history URL.

Hoist the child-item creation into a lambda and run it on that path too.

Test: fast/history/back-to-discarded-page-loads-subframe-history-url.html

* 
LayoutTests/fast/history/back-to-discarded-page-loads-subframe-history-url-expected.txt:
 Added.
* 
LayoutTests/fast/history/back-to-discarded-page-loads-subframe-history-url.html:
 Added.
* LayoutTests/fast/history/resources/discarded-page-subframe-blue.html: Added.
* LayoutTests/fast/history/resources/discarded-page-subframe-red.html: Added.
* LayoutTests/http/tests/navigation/multiple-back-forward-entries-expected.txt:
* Source/WebCore/loader/HistoryController.cpp:
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):

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



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

Reply via email to