Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b903f425a02b341d81be1131835fd495ae5e100c
      
https://github.com/WebKit/WebKit/commit/b903f425a02b341d81be1131835fd495ae5e100c
  Author: Charlie Wolfe <charl...@apple.com>
  Date:   2024-04-11 (Thu, 11 Apr 2024)

  Changed paths:
    M 
LayoutTests/fast/forms/form-and-frame-interaction-retains-values-expected.txt
    M LayoutTests/fast/frames/iframe-reparenting-unique-name-expected.txt
    M LayoutTests/fast/frames/reparent-in-unload-contentdocument-expected.txt
    M 
LayoutTests/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe-expected.txt
    M LayoutTests/http/tests/site-isolation/notify-done-expected.txt
    M LayoutTests/platform/mac-site-isolation/TestExpectations
    M Source/WebCore/page/FrameTree.cpp
    M Source/WebCore/page/FrameTree.h
    M Source/WebCore/page/LocalFrame.cpp

  Log Message:
  -----------
  Change `FrameTree::uniqueName()` to generate a unique name when called
https://bugs.webkit.org/show_bug.cgi?id=272062
rdar://125808920

Reviewed by Alex Christensen.

Unique frame names currently use a counter to increment a unique frame index 
each time
`FrameTree::setSpecifiedName` is called. This will not work with site 
isolation. Instead, we should
change `FrameTree::uniqueName()` to create the unique frame name based on the 
frame’s position in the
frame tree to mimic previous behavior . Other than layout test output, there 
are two users of unique
frame names. `HistoryItem` relies on them for session state and to give a 
consistent identifier for
frame positions after a navigation. Web archives output them in their saved 
state. Both should continue
to work after this change.

Some tests that output unique frame names needed to be rebased to accommodate 
this change.

* LayoutTests/fast/forms/form-and-frame-interaction-retains-values-expected.txt:
* LayoutTests/fast/frames/iframe-reparenting-unique-name-expected.txt:
* LayoutTests/fast/frames/reparent-in-unload-contentdocument-expected.txt:
* 
LayoutTests/http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe-expected.txt:
* LayoutTests/http/tests/site-isolation/notify-done-expected.txt:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/page/FrameTree.cpp:
(WebCore::FrameTree::setSpecifiedName):
(WebCore::FrameTree::clearName):
(WebCore::FrameTree::childBySpecifiedName const):
(WebCore::FrameTree::find const):
(WebCore::FrameTree::findByUniqueName const):
(WebCore::FrameTree::uniqueName const):
(WebCore::FrameTree::uniqueChildName const): Deleted.
(WebCore::FrameTree::generateUniqueName const): Deleted.
* Source/WebCore/page/FrameTree.h:
(WebCore::FrameTree::uniqueName const): Deleted.
(WebCore::FrameTree::resetFrameIdentifiers): Deleted.
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::setDocument):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to