Skip to content

[Spec] In-progress fenced frame navigation should be blocked if both navigated FF and initiator FF have network revoked#228

Merged
xiaochen-z merged 20 commits intoWICG:masterfrom
xiaochen-z:spec_in_progress_navigation_cancellation
Jun 16, 2025
Merged

[Spec] In-progress fenced frame navigation should be blocked if both navigated FF and initiator FF have network revoked#228
xiaochen-z merged 20 commits intoWICG:masterfrom
xiaochen-z:spec_in_progress_navigation_cancellation

Conversation

@xiaochen-z
Copy link
Collaborator

@xiaochen-z xiaochen-z commented Apr 3, 2025

Fix #173.

The overall implementation is:

  1. A flag is_embedder_initiated_fenced_frame_navigation_ is set during FF .config setter and passed down to the downstream navigation request.
  2. OnResponseStarted(), if root is FF and the above flag is set then:
  3. The in-progress embedder-initiated FF navigation should be blocked (see NavigationRequest::IsDisabledEmbedderInitiatedFencedFrameNavigation()) if both:
    • navigated FF has network revoked; and,
    • initiator FF has network revoked.

This PR specs the blocking of navigation in attempt to populate the history entry's document because in Chromium just a few lines below the call to NavigationRequest::IsDisabledEmbedderInitiatedFencedFrameNavigation(), there is CheckResponseAdherenceToCoep(), which is spec'd in attempt to populate the history entry's document's step 5 substep 4. So I think it is reasonable to spec them in the same place.

To check the navigation is an embedder-initiated fenced frame navigation, instead of adding a flag as it is implemented in Chromium, the following condition is checked, reused from the navigate algorithm patch.

fenced-frame/spec.bs

Lines 3550 to 3552 in cb57423

1. If |navigable| is a [=fenced navigable container/fenced navigable=] and <var
ignore>sourceDocument</var>'s [=node navigable=] is in |navigable|'s [=navigable/active
document=]'s [=Document/ancestor navigables=] with [=an-unfenced|unfenced=] set to true:


Preview | Diff

@xiaochen-z xiaochen-z added the specification Additions to specifications label Apr 3, 2025
@xiaochen-z xiaochen-z requested a review from blu25 April 3, 2025 16:24
@xiaochen-z xiaochen-z requested a review from VergeA April 16, 2025 17:03
@xiaochen-z
Copy link
Collaborator Author

Copy link
Collaborator

@VergeA VergeA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM % my one other comment.

@xiaochen-z xiaochen-z requested a review from domfarolino April 16, 2025 17:58
@xiaochen-z xiaochen-z merged commit c12cfd6 into WICG:master Jun 16, 2025
2 checks passed
github-actions bot added a commit that referenced this pull request Jun 16, 2025
…navigated FF and initiator FF have network revoked (#228)

SHA: c12cfd6
Reason: push, by xiaochen-z

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

specification Additions to specifications

Projects

None yet

5 participants

Comments