Fix File.webkitRelativePath for virtual paths on Android [chromium/src : main]

0 views
Skip to first unread message

Keigo Oka (Gerrit)

unread,
Jan 22, 2026, 2:27:14 AMJan 22
to AyeAye, pasko...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, nyquis...@chromium.org, agriev...@chromium.org, lizeb...@chromium.org, torne...@chromium.org, yfriedm...@chromium.org

Keigo Oka abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: abandon
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ice727473cc9266475d1dbebfdf6a6cc2b8b89111
Gerrit-Change-Number: 7509605
Gerrit-PatchSet: 1
Gerrit-Owner: Keigo Oka <o...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Jan 22, 2026, 2:29:30 PMJan 22
to Keigo Oka, Tsuyoshi Horo, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
Attention needed from Keigo Oka and Tsuyoshi Horo

Daniel Cheng added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Daniel Cheng . resolved

Load balancing this to a storage owner

(I'll stamp if it's needed)

Open in Gerrit

Related details

Attention is currently required from:
  • Keigo Oka
  • Tsuyoshi Horo
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: I75e739f2f2e965f84d42742909bcad291bb3031b
Gerrit-Change-Number: 7508805
Gerrit-PatchSet: 4
Gerrit-Owner: Keigo Oka <o...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
Gerrit-Attention: Keigo Oka <o...@chromium.org>
Gerrit-Comment-Date: Thu, 22 Jan 2026 19:29:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Tsuyoshi Horo (Gerrit)

unread,
Jan 22, 2026, 8:25:49 PMJan 22
to Keigo Oka, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
Attention needed from Keigo Oka

Tsuyoshi Horo added 1 comment

File third_party/blink/renderer/core/html/forms/file_input_type.cc
Line 327, Patchset 4 (Latest): !file->get_native_file()->base_subdirs.empty()) {
Tsuyoshi Horo . unresolved

Please add a test case to verify this change in
third_party/blink/renderer/core/html/forms/file_input_type_test.cc.

Open in Gerrit

Related details

Attention is currently required from:
  • Keigo Oka
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: I75e739f2f2e965f84d42742909bcad291bb3031b
    Gerrit-Change-Number: 7508805
    Gerrit-PatchSet: 4
    Gerrit-Owner: Keigo Oka <o...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
    Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
    Gerrit-Attention: Keigo Oka <o...@chromium.org>
    Gerrit-Comment-Date: Fri, 23 Jan 2026 01:25:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Keigo Oka (Gerrit)

    unread,
    Jan 25, 2026, 9:48:03 PMJan 25
    to Tsuyoshi Horo, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
    Attention needed from Tsuyoshi Horo

    Keigo Oka voted and added 1 comment

    Votes added by Keigo Oka

    Auto-Submit+1
    Commit-Queue+1

    1 comment

    File third_party/blink/renderer/core/html/forms/file_input_type.cc
    Line 327, Patchset 4: !file->get_native_file()->base_subdirs.empty()) {
    Tsuyoshi Horo . resolved

    Please add a test case to verify this change in
    third_party/blink/renderer/core/html/forms/file_input_type_test.cc.

    Keigo Oka

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Tsuyoshi Horo
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: I75e739f2f2e965f84d42742909bcad291bb3031b
      Gerrit-Change-Number: 7508805
      Gerrit-PatchSet: 5
      Gerrit-Owner: Keigo Oka <o...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
      Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
      Gerrit-Comment-Date: Mon, 26 Jan 2026 02:47:39 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Tsuyoshi Horo <ho...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Tsuyoshi Horo (Gerrit)

      unread,
      Jan 26, 2026, 2:32:26 AMJan 26
      to Keigo Oka, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
      Attention needed from Keigo Oka

      Tsuyoshi Horo added 2 comments

      File third_party/blink/renderer/core/html/forms/file_input_type.cc
      Line 323, Patchset 5 (Latest):#if BUILDFLAG(IS_ANDROID)
      // Android content-URIs do not use tree paths with separators like posix
      // so we build relative path using base_subdirs.
      Tsuyoshi Horo . unresolved

      Please update comments.

      File third_party/blink/renderer/core/html/forms/file_input_type_test.cc
      Line 100, Patchset 5 (Latest): base::FilePath("content://authority/id-base"));
      Tsuyoshi Horo . unresolved

      Sorry, I don't follow perfectly, but even in the case where /SAF/authority/tree/id-123 is passed, is base_dir still provided as a content:// URL?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Keigo Oka
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: I75e739f2f2e965f84d42742909bcad291bb3031b
        Gerrit-Change-Number: 7508805
        Gerrit-PatchSet: 5
        Gerrit-Owner: Keigo Oka <o...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
        Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
        Gerrit-Attention: Keigo Oka <o...@chromium.org>
        Gerrit-Comment-Date: Mon, 26 Jan 2026 07:31:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Keigo Oka (Gerrit)

        unread,
        Jan 27, 2026, 7:26:34 PMJan 27
        to Tsuyoshi Horo, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
        Attention needed from Tsuyoshi Horo

        Keigo Oka voted and added 2 comments

        Votes added by Keigo Oka

        Auto-Submit+1
        Commit-Queue+1

        2 comments

        File third_party/blink/renderer/core/html/forms/file_input_type.cc
        Line 323, Patchset 5:#if BUILDFLAG(IS_ANDROID)

        // Android content-URIs do not use tree paths with separators like posix
        // so we build relative path using base_subdirs.
        Tsuyoshi Horo . resolved

        Please update comments.

        Keigo Oka

        Done

        File third_party/blink/renderer/core/html/forms/file_input_type_test.cc
        Line 100, Patchset 5: base::FilePath("content://authority/id-base"));
        Tsuyoshi Horo . resolved

        Sorry, I don't follow perfectly, but even in the case where /SAF/authority/tree/id-123 is passed, is base_dir still provided as a content:// URL?

        Keigo Oka

        Thanks for catching the issue. updated.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Tsuyoshi Horo
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: I75e739f2f2e965f84d42742909bcad291bb3031b
          Gerrit-Change-Number: 7508805
          Gerrit-PatchSet: 6
          Gerrit-Owner: Keigo Oka <o...@chromium.org>
          Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
          Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
          Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
          Gerrit-Attention: Tsuyoshi Horo <ho...@chromium.org>
          Gerrit-Comment-Date: Wed, 28 Jan 2026 00:25:59 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tsuyoshi Horo (Gerrit)

          unread,
          Jan 27, 2026, 8:04:54 PMJan 27
          to Keigo Oka, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
          Attention needed from Keigo Oka

          Tsuyoshi Horo voted and added 3 comments

          Votes added by Tsuyoshi Horo

          Code-Review+1

          3 comments

          Patchset-level comments
          File-level comment, Patchset 6 (Latest):
          Tsuyoshi Horo . resolved

          lgtm with nits.

          Thank you.

          File third_party/blink/renderer/core/html/forms/file_input_type_test.cc
          Line 91, Patchset 6 (Latest): std::string base_dir = virtual_document_path
          Tsuyoshi Horo . unresolved

          nit: `const std::string_view`

          Line 94, Patchset 6 (Latest): String path = virtual_document_path ? "/SAF/authority/tree/id-base/123"
          Tsuyoshi Horo . unresolved

          nit: `const String`

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Keigo Oka
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: I75e739f2f2e965f84d42742909bcad291bb3031b
            Gerrit-Change-Number: 7508805
            Gerrit-PatchSet: 6
            Gerrit-Owner: Keigo Oka <o...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
            Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
            Gerrit-Attention: Keigo Oka <o...@chromium.org>
            Gerrit-Comment-Date: Wed, 28 Jan 2026 01:04:21 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Keigo Oka (Gerrit)

            unread,
            Jan 27, 2026, 11:18:15 PMJan 27
            to Tsuyoshi Horo, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org

            Keigo Oka voted and added 2 comments

            Votes added by Keigo Oka

            Auto-Submit+1
            Commit-Queue+2

            2 comments

            File third_party/blink/renderer/core/html/forms/file_input_type_test.cc
            Line 91, Patchset 6: std::string base_dir = virtual_document_path
            Tsuyoshi Horo . resolved

            nit: `const std::string_view`

            Keigo Oka

            Done

            Line 94, Patchset 6: String path = virtual_document_path ? "/SAF/authority/tree/id-base/123"
            Tsuyoshi Horo . resolved

            nit: `const String`

            Keigo Oka

            Done

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I75e739f2f2e965f84d42742909bcad291bb3031b
              Gerrit-Change-Number: 7508805
              Gerrit-PatchSet: 7
              Gerrit-Owner: Keigo Oka <o...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
              Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
              Gerrit-Comment-Date: Wed, 28 Jan 2026 04:17:40 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              Comment-In-Reply-To: Tsuyoshi Horo <ho...@chromium.org>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Keigo Oka (Gerrit)

              unread,
              Jan 27, 2026, 11:20:12 PMJan 27
              to Tsuyoshi Horo, Chromium LUCI CQ, Daniel Cheng, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
              Attention needed from Daniel Cheng

              Keigo Oka added 1 comment

              Patchset-level comments
              File-level comment, Patchset 7 (Latest):
              Keigo Oka . resolved

              Daniel, could you stamp?

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Daniel Cheng
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I75e739f2f2e965f84d42742909bcad291bb3031b
              Gerrit-Change-Number: 7508805
              Gerrit-PatchSet: 7
              Gerrit-Owner: Keigo Oka <o...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
              Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
              Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
              Gerrit-Comment-Date: Wed, 28 Jan 2026 04:19:38 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Daniel Cheng (Gerrit)

              unread,
              Jan 28, 2026, 2:01:28 AMJan 28
              to Keigo Oka, Daniel Cheng, Tsuyoshi Horo, Chromium LUCI CQ, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org
              Attention needed from Keigo Oka

              Daniel Cheng voted

              Code-Review+1
              Commit-Queue+2
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Keigo Oka
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • 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: I75e739f2f2e965f84d42742909bcad291bb3031b
              Gerrit-Change-Number: 7508805
              Gerrit-PatchSet: 7
              Gerrit-Owner: Keigo Oka <o...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Keigo Oka <o...@chromium.org>
              Gerrit-Reviewer: Tsuyoshi Horo <ho...@chromium.org>
              Gerrit-Attention: Keigo Oka <o...@chromium.org>
              Gerrit-Comment-Date: Wed, 28 Jan 2026 07:01:15 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy

              Chromium LUCI CQ (Gerrit)

              unread,
              Jan 28, 2026, 2:49:16 AMJan 28
              to Keigo Oka, Daniel Cheng, Tsuyoshi Horo, AyeAye, nyquis...@chromium.org, torne...@chromium.org, lizeb...@chromium.org, yfriedm...@chromium.org, pasko...@chromium.org, blink-...@chromium.org, agriev...@chromium.org, blink-rev...@chromium.org

              Chromium LUCI CQ submitted the change

              Change information

              Commit message:
              Fix File.webkitRelativePath for virtual paths on Android

              When directory upload is used on Android (in desktop mode), the
              base directory path might be a virtual path (i.e. starting with /SAF/)
              instead of a raw content URI. In this case, FileInputType was failing
              to use the provided base_subdirs to construct the relative path, falling
              back to string substring manipulation which is incorrect for virtual paths
              (as the file path is still a content URI).

              This CL allows using base_subdirs if it is populated, regardless of
              whether the base directory is a content URI or not. This ensures
              webkitRelativePath is correctly constructed using the ancestors list
              provided by the browser process.

              Fixed: 472236838
              Test: Open drive.google.com, upload a folder, confirm a folder with the
              folder name is created.
              Change-Id: I75e739f2f2e965f84d42742909bcad291bb3031b
              Reviewed-by: Tsuyoshi Horo <ho...@chromium.org>
              Commit-Queue: Daniel Cheng <dch...@chromium.org>
              Reviewed-by: Daniel Cheng <dch...@chromium.org>
              Auto-Submit: Keigo Oka <o...@chromium.org>
              Cr-Commit-Position: refs/heads/main@{#1575740}
              Files:
              • M third_party/blink/renderer/core/html/forms/file_input_type.cc
              • M third_party/blink/renderer/core/html/forms/file_input_type_test.cc
              Change size: S
              Delta: 2 files changed, 28 insertions(+), 17 deletions(-)
              Branch: refs/heads/main
              Submit Requirements:
              • requirement satisfiedCode-Review: +1 by Daniel Cheng, +1 by Tsuyoshi Horo
              Open in Gerrit
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: merged
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I75e739f2f2e965f84d42742909bcad291bb3031b
              Gerrit-Change-Number: 7508805
              Gerrit-PatchSet: 8
              Gerrit-Owner: Keigo Oka <o...@chromium.org>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              open
              diffy
              satisfied_requirement
              Reply all
              Reply to author
              Forward
              0 new messages