FrameLoader::StartNavigation should not allow emulated Ctrl+click from sandboxed iframes [chromium/src : main]

0 views
Skip to first unread message

Nate Chapin (Gerrit)

unread,
Feb 12, 2026, 7:50:20 PM (8 days ago) Feb 12
to Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Daniel Cheng

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I1e134f0c9dcfbb4760d339d909a7d7339a5e3077
Gerrit-Change-Number: 7572487
Gerrit-PatchSet: 3
Gerrit-Owner: Nate Chapin <jap...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Feb 2026 00:50:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Nate Chapin (Gerrit)

unread,
Feb 12, 2026, 7:51:22 PM (8 days ago) Feb 12
to Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
Attention needed from Daniel Cheng

Nate Chapin added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Nate Chapin . unresolved

I have, thus far, not gotten a unit test to actually tickle this case. NavigationPolicy is surprisingly hard to test programmatically.

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I1e134f0c9dcfbb4760d339d909a7d7339a5e3077
    Gerrit-Change-Number: 7572487
    Gerrit-PatchSet: 3
    Gerrit-Owner: Nate Chapin <jap...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Fri, 13 Feb 2026 00:51:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Feb 17, 2026, 12:55:29 PM (3 days ago) Feb 17
    to Nate Chapin, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
    Attention needed from Nate Chapin

    Daniel Cheng voted and added 1 comment

    Votes added by Daniel Cheng

    Code-Review+1

    1 comment

    Patchset-level comments
    Nate Chapin . unresolved

    I have, thus far, not gotten a unit test to actually tickle this case. NavigationPolicy is surprisingly hard to test programmatically.

    Daniel Cheng

    Would a WPT work for this? I guess it'd be kind of hard to detect that it was blocked though.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nate Chapin
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I1e134f0c9dcfbb4760d339d909a7d7339a5e3077
      Gerrit-Change-Number: 7572487
      Gerrit-PatchSet: 3
      Gerrit-Owner: Nate Chapin <jap...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
      Gerrit-Attention: Nate Chapin <jap...@chromium.org>
      Gerrit-Comment-Date: Tue, 17 Feb 2026 17:55:22 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Nate Chapin <jap...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Nate Chapin (Gerrit)

      unread,
      Feb 17, 2026, 6:05:54 PM (3 days ago) Feb 17
      to AyeAye, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
      Attention needed from Daniel Cheng

      Nate Chapin added 1 comment

      Patchset-level comments
      File-level comment, Patchset 3:
      Nate Chapin . resolved

      I have, thus far, not gotten a unit test to actually tickle this case. NavigationPolicy is surprisingly hard to test programmatically.

      Daniel Cheng

      Would a WPT work for this? I guess it'd be kind of hard to detect that it was blocked though.

      Nate Chapin

      I got a (weird and invasive) unit test working that shows that BeginNavigation() doesn't get called in the problematic case. Is that worth landing?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Daniel Cheng
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I1e134f0c9dcfbb4760d339d909a7d7339a5e3077
        Gerrit-Change-Number: 7572487
        Gerrit-PatchSet: 4
        Gerrit-Owner: Nate Chapin <jap...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
        Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
        Gerrit-Comment-Date: Tue, 17 Feb 2026 23:05:48 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Nate Chapin <jap...@chromium.org>
        Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Daniel Cheng (Gerrit)

        unread,
        Feb 19, 2026, 11:01:21 AM (23 hours ago) Feb 19
        to Nate Chapin, AyeAye, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
        Attention needed from Nate Chapin

        Daniel Cheng added 3 comments

        File third_party/blink/renderer/core/frame/web_frame_test.cc
        Line 14888, Patchset 4 (Latest): network::mojom::blink::WebSandboxFlags::kPopups);
        Daniel Cheng . unresolved

        Why do we need to set this separately? It seems a bit weird to set sandbox flags after the page is already loaded.

        Line 14891, Patchset 4 (Latest): To<HTMLElement>(element)->click();
        Daniel Cheng . unresolved

        Since the test is split up between this and the html file, would it make sense to add a comment here that this shouldn't result in an additional navigation due to the iframe being sandboxed without allow-poups?

        Line 14893, Patchset 4 (Latest): EXPECT_EQ(web_frame_client.iframe_client()->BeginNavigationCallCount(), 1);
        Daniel Cheng . unresolved

        This is just from the initial load right, or something else as well? Would it make sense to EXPECT this after line 14883 as well?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Nate Chapin
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1e134f0c9dcfbb4760d339d909a7d7339a5e3077
          Gerrit-Change-Number: 7572487
          Gerrit-PatchSet: 4
          Gerrit-Owner: Nate Chapin <jap...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
          Gerrit-Attention: Nate Chapin <jap...@chromium.org>
          Gerrit-Comment-Date: Thu, 19 Feb 2026 16:01:08 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Nate Chapin (Gerrit)

          unread,
          Feb 19, 2026, 11:46:58 AM (23 hours ago) Feb 19
          to AyeAye, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
          Attention needed from Daniel Cheng

          Nate Chapin added 1 comment

          File third_party/blink/renderer/core/frame/web_frame_test.cc
          Line 14888, Patchset 4 (Latest): network::mojom::blink::WebSandboxFlags::kPopups);
          Daniel Cheng . unresolved

          Why do we need to set this separately? It seems a bit weird to set sandbox flags after the page is already loaded.

          Nate Chapin

          For some reason the sandbox flags aren't getting propagated to the about:srcdoc document (but they are in a full chrome build). I think there's something I'm not stubbing out, but I haven't been able to figure out what it is. How hard should I try? (I was several hours in when I just set the sandbox flags directly)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Daniel Cheng
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I1e134f0c9dcfbb4760d339d909a7d7339a5e3077
          Gerrit-Change-Number: 7572487
          Gerrit-PatchSet: 4
          Gerrit-Owner: Nate Chapin <jap...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
          Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
          Gerrit-Comment-Date: Thu, 19 Feb 2026 16:46:48 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Nate Chapin (Gerrit)

          unread,
          Feb 19, 2026, 6:48:27 PM (16 hours ago) Feb 19
          to AyeAye, Daniel Cheng, Chromium LUCI CQ, chromium...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
          Attention needed from Daniel Cheng

          Nate Chapin added 2 comments

          File third_party/blink/renderer/core/frame/web_frame_test.cc
          Line 14891, Patchset 4: To<HTMLElement>(element)->click();
          Daniel Cheng . resolved

          Since the test is split up between this and the html file, would it make sense to add a comment here that this shouldn't result in an additional navigation due to the iframe being sandboxed without allow-poups?

          Nate Chapin

          Done

          Line 14893, Patchset 4: EXPECT_EQ(web_frame_client.iframe_client()->BeginNavigationCallCount(), 1);
          Daniel Cheng . resolved

          This is just from the initial load right, or something else as well? Would it make sense to EXPECT this after line 14883 as well?

          Nate Chapin

          Done

          Gerrit-Comment-Date: Thu, 19 Feb 2026 23:48:21 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Daniel Cheng (Gerrit)

          unread,
          2:15 AM (8 hours ago) 2:15 AM
          to Nate Chapin, Daniel Cheng, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
          Attention needed from Nate Chapin

          Daniel Cheng voted and added 1 comment

          Votes added by Daniel Cheng

          Code-Review+1

          1 comment

          File third_party/blink/renderer/core/frame/web_frame_test.cc
          Line 14888, Patchset 4: network::mojom::blink::WebSandboxFlags::kPopups);
          Daniel Cheng . unresolved

          Why do we need to set this separately? It seems a bit weird to set sandbox flags after the page is already loaded.

          Nate Chapin

          For some reason the sandbox flags aren't getting propagated to the about:srcdoc document (but they are in a full chrome build). I think there's something I'm not stubbing out, but I haven't been able to figure out what it is. How hard should I try? (I was several hours in when I just set the sandbox flags directly)

          Daniel Cheng

          Maybe just throw a `// TODO` here for now? It'd be nice to fix... but I can't also claim that this is the best use of anyone's time at this point either.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Nate Chapin
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I1e134f0c9dcfbb4760d339d909a7d7339a5e3077
            Gerrit-Change-Number: 7572487
            Gerrit-PatchSet: 5
            Gerrit-Owner: Nate Chapin <jap...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: Nate Chapin <jap...@chromium.org>
            Gerrit-Attention: Nate Chapin <jap...@chromium.org>
            Gerrit-Comment-Date: Fri, 20 Feb 2026 07:15:29 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Daniel Cheng (Gerrit)

            unread,
            2:15 AM (8 hours ago) 2:15 AM
            to Nate Chapin, Daniel Cheng, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, gavinp...@chromium.org, loading...@chromium.org
            Attention needed from Nate Chapin

            Daniel Cheng added 1 comment

            File third_party/blink/renderer/core/frame/web_frame_test.cc
            Line 14888, Patchset 4: network::mojom::blink::WebSandboxFlags::kPopups);
            Daniel Cheng . unresolved

            Why do we need to set this separately? It seems a bit weird to set sandbox flags after the page is already loaded.

            Nate Chapin

            For some reason the sandbox flags aren't getting propagated to the about:srcdoc document (but they are in a full chrome build). I think there's something I'm not stubbing out, but I haven't been able to figure out what it is. How hard should I try? (I was several hours in when I just set the sandbox flags directly)

            Daniel Cheng

            Maybe just throw a `// TODO` here for now? It'd be nice to fix... but I can't also claim that this is the best use of anyone's time at this point either.

            Daniel Cheng

            You can attach my name I suppose :)

            Gerrit-Comment-Date: Fri, 20 Feb 2026 07:15:45 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages