[webkit-changes] [WebKit/WebKit] 50ae75: REGRESSION(288409 at main): Main frame history state ...

Charlie Wolfe noreply at github.com
Thu Jan 23 20:02:36 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 50ae75698db1c459c7bdd39d47b1e389da2495ea
      https://github.com/WebKit/WebKit/commit/50ae75698db1c459c7bdd39d47b1e389da2495ea
  Author: Charlie Wolfe <charliew at apple.com>
  Date:   2025-01-23 (Thu, 23 Jan 2025)

  Changed paths:
    A LayoutTests/fast/history/go-back-then-navigate-subframe-expected.txt
    A LayoutTests/fast/history/go-back-then-navigate-subframe.html
    M LayoutTests/fast/history/resources/frame-final-url.html
    M LayoutTests/fast/history/resources/frame-initial-url.html
    M Source/WebCore/history/HistoryItem.cpp
    M Source/WebCore/history/HistoryItem.h
    M Source/WebCore/loader/FrameLoader.cpp

  Log Message:
  -----------
  REGRESSION(288409 at main): Main frame history state may be incorrectly created after navigating back
https://bugs.webkit.org/show_bug.cgi?id=286438
rdar://143418935

Reviewed by Alex Christensen.

FrameLoader::loadURLIntoChildFrame contains logic to reload child frames with history items from another
page when navigating through the back/forward list. This behavior caused an issue after 288409 at main,
where loading a history item created by another page into a new iframe caused the UI process to create a
new main frame history item when trying to reconstruct the history item tree.

To fix this, we need to update the history item’s frameID to match the iframe that it is being loaded
into.

* LayoutTests/fast/history/go-back-then-navigate-subframe-expected.txt: Added.
* LayoutTests/fast/history/go-back-then-navigate-subframe.html: Added.
* LayoutTests/fast/history/resources/frame-final-url.html:
* LayoutTests/fast/history/resources/frame-initial-url.html:
* Source/WebCore/history/HistoryItem.cpp:
(WebCore::HistoryItem::setFrameID):
* Source/WebCore/history/HistoryItem.h:
(WebCore::HistoryItem::setFrameID): Deleted.
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):

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



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


More information about the webkit-changes mailing list