Parse multiple URLs from text/uri-list drag data [chromium/src : main]

0 views
Skip to first unread message

Joone Hur (Gerrit)

unread,
Oct 29, 2025, 2:37:35 AMOct 29
to Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Daniel Cheng, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Daniel Cheng, Min Qin and Sylvain Defresne

Joone Hur added 1 comment

Patchset-level comments
File-level comment, Patchset 87:
Daniel Cheng . unresolved

Please rebase this CL now that the others have landed. That should make this much smaller more reviewable.

The biggest issue that remains to resolve is how exactly to serialize and deserialize a list of urls and titles to/from IDataObject. As I noted in a previous comment, the current serialization doesn't handle the case of embedded `\n` in titles gracefully. Whatever we write should handle that case (and other edge cases) gracefully. I'm not sure if there is a standard convention for serializing structured data to `IDataObject` on Windows; if there is, we should use it. Worst-case scenario, we can use `base::Pickle` though I don't love falling back to that as it's fairly Chrome-specific.

Joone Hur

How about we use JSON for the `Bookmark List` clipboard format? This will correctly handle any special characters in the titles, like newlines, and isn't Chrome-specific.

We can serialize the `std::vector<ClipboardUrlInfo>` into a JSON string and write that to the clipboard as `Bookmark List` format. On the reading side, the JSON can be parsed back into the vector.

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
  • Min Qin
  • Sylvain Defresne
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: I05feaa80a6db10e311c2e222281df4a22af7b5a0
Gerrit-Change-Number: 6608042
Gerrit-PatchSet: 89
Gerrit-Owner: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Sylvain Defresne <sdef...@chromium.org>
Gerrit-CC: Rakina Zata Amni <rak...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Wed, 29 Oct 2025 06:37:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Nov 5, 2025, 6:24:37 PMNov 5
to Joone Hur, Dana Fried, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Dana Fried, Min Qin and Sylvain Defresne

Daniel Cheng added 1 comment

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

I'm planning on removing myself from clipboard and drag and drop OWNERS. While I have a lot of historical context, I think someone on the desktop team ultimately needs to be involved here.

@dfr...@chromium.org, do you mind helping take over this review for the Windows perspective? Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Dana Fried
  • Min Qin
  • Sylvain Defresne
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: I05feaa80a6db10e311c2e222281df4a22af7b5a0
Gerrit-Change-Number: 6608042
Gerrit-PatchSet: 89
Gerrit-Owner: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: Dana Fried <dfr...@chromium.org>
Gerrit-Reviewer: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Sylvain Defresne <sdef...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-CC: Rakina Zata Amni <rak...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Dana Fried <dfr...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Wed, 05 Nov 2025 23:24:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Dana Fried (Gerrit)

unread,
Nov 6, 2025, 11:31:51 AMNov 6
to Joone Hur, David Bienvenu, Thomas Anderson, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from David Bienvenu, Joone Hur, Min Qin, Sylvain Defresne and Thomas Anderson

Dana Fried added 1 comment

Patchset-level comments
Dana Fried . resolved

Since it appears you do not explicitly need my approval, I'm going to tag in folks on the Windows and Linux teams who has a little closer knowledge of this stuff as relates to their specific platforms.

Open in Gerrit

Related details

Attention is currently required from:
  • David Bienvenu
  • Joone Hur
  • Min Qin
  • Sylvain Defresne
  • Thomas Anderson
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: I05feaa80a6db10e311c2e222281df4a22af7b5a0
Gerrit-Change-Number: 6608042
Gerrit-PatchSet: 89
Gerrit-Owner: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: David Bienvenu <davidb...@chromium.org>
Gerrit-Reviewer: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-CC: Rakina Zata Amni <rak...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Joone Hur <joon...@microsoft.com>
Gerrit-Attention: David Bienvenu <davidb...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Thu, 06 Nov 2025 16:31:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Bienvenu (Gerrit)

unread,
Nov 6, 2025, 6:27:49 PMNov 6
to Joone Hur, Thomas Anderson, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Joone Hur, Min Qin, Sylvain Defresne and Thomas Anderson

David Bienvenu added 1 comment

Patchset-level comments
David Bienvenu . resolved

I don't see code looking for \r\n, just \n. Am I missing something?

Open in Gerrit

Related details

Attention is currently required from:
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Thu, 06 Nov 2025 23:27:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Joone Hur (Gerrit)

unread,
Nov 8, 2025, 10:01:01 PMNov 8
to David Bienvenu, Thomas Anderson, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from David Bienvenu, Min Qin, Sylvain Defresne and Thomas Anderson

Joone Hur added 1 comment

Patchset-level comments
David Bienvenu . resolved

I don't see code looking for \r\n, just \n. Am I missing something?

Joone Hur

This CL's parser is designed for compatibility. It splits by `\n` and uses `TRIM_WHITESPACE`, which correctly handles \r\n endings by stripping the `\r`.

Since the parser handles both, the writer just uses `\n`. I'll update the CL description to clarify this. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • David Bienvenu
Gerrit-Attention: David Bienvenu <davidb...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Sun, 09 Nov 2025 03:00:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Bienvenu <davidb...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Anderson (Gerrit)

unread,
Nov 10, 2025, 5:19:16 PMNov 10
to Joone Hur, David Bienvenu, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from David Bienvenu, Joone Hur, Min Qin and Sylvain Defresne

Thomas Anderson added 1 comment

File ui/base/x/x11_os_exchange_data_provider.cc
Line 158, Patchset 91 (Latest): const auto& url_info = url_infos.front();
Thomas Anderson . unresolved

you can set multiple URLs by setting `format_map_[kMimeTypeUriList] = ...`

Open in Gerrit

Related details

Attention is currently required from:
  • David Bienvenu
  • Joone Hur
  • Min Qin
  • Sylvain Defresne
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: I05feaa80a6db10e311c2e222281df4a22af7b5a0
Gerrit-Change-Number: 6608042
Gerrit-PatchSet: 91
Gerrit-Owner: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Avi Drissman <a...@chromium.org>
Gerrit-Reviewer: David Bienvenu <davidb...@chromium.org>
Gerrit-Reviewer: Joone Hur <joon...@microsoft.com>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Reviewer: Thomas Anderson <thomasa...@chromium.org>
Gerrit-CC: Daniel Cheng <dch...@chromium.org>
Gerrit-CC: Rakina Zata Amni <rak...@chromium.org>
Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
Gerrit-Attention: Joone Hur <joon...@microsoft.com>
Gerrit-Attention: David Bienvenu <davidb...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Mon, 10 Nov 2025 22:19:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Nov 10, 2025, 5:22:58 PMNov 10
to Joone Hur, David Bienvenu, Thomas Anderson, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from David Bienvenu, Joone Hur, Min Qin and Sylvain Defresne

Daniel Cheng added 1 comment

Patchset-level comments
Daniel Cheng . unresolved

Please rebase this CL now that the others have landed. That should make this much smaller more reviewable.

The biggest issue that remains to resolve is how exactly to serialize and deserialize a list of urls and titles to/from IDataObject. As I noted in a previous comment, the current serialization doesn't handle the case of embedded `\n` in titles gracefully. Whatever we write should handle that case (and other edge cases) gracefully. I'm not sure if there is a standard convention for serializing structured data to `IDataObject` on Windows; if there is, we should use it. Worst-case scenario, we can use `base::Pickle` though I don't love falling back to that as it's fairly Chrome-specific.

Joone Hur

How about we use JSON for the `Bookmark List` clipboard format? This will correctly handle any special characters in the titles, like newlines, and isn't Chrome-specific.

We can serialize the `std::vector<ClipboardUrlInfo>` into a JSON string and write that to the clipboard as `Bookmark List` format. On the reading side, the JSON can be parsed back into the vector.

Daniel Cheng

That could work, but you need to make sure the platform reviewers are aware of this. I don't feel comfortable making a long-term decision here as I no longer own this code.

Gerrit-Comment-Date: Mon, 10 Nov 2025 22:22:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joone Hur <joon...@microsoft.com>
Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Joone Hur (Gerrit)

unread,
Nov 18, 2025, 8:28:13 PM (12 days ago) Nov 18
to David Bienvenu, Thomas Anderson, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from David Bienvenu, Min Qin, Sylvain Defresne and Thomas Anderson

Joone Hur added 1 comment

File ui/base/x/x11_os_exchange_data_provider.cc
Line 158, Patchset 91 (Latest): const auto& url_info = url_infos.front();
Thomas Anderson . resolved

you can set multiple URLs by setting `format_map_[kMimeTypeUriList] = ...`

Joone Hur

Sure, setting kMimeTypeUriList is necessary for working with other applications like Firefox. I will create a follow-up CL for this change to track the multi-URL implementation for Linux.

Open in Gerrit

Related details

Attention is currently required from:
  • David Bienvenu
  • Min Qin
  • Sylvain Defresne
  • Thomas Anderson
Gerrit-Attention: David Bienvenu <davidb...@chromium.org>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Wed, 19 Nov 2025 01:28:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Thomas Anderson <thomasa...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

David Bienvenu (Gerrit)

unread,
Nov 19, 2025, 10:01:59 AM (12 days ago) Nov 19
to Joone Hur, Thomas Anderson, Daniel Cheng, Sylvain Defresne, Avi Drissman, Min Qin, Rakina Zata Amni, Sadrul Chowdhury, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, ajwong...@chromium.org, omnibox-...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ozone-...@chromium.org, max+watc...@igalia.com, kinuko+...@chromium.org, nickdiego+wa...@igalia.com, mac-r...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, dcheng+c...@chromium.org, jdonnel...@chromium.org, mahmad...@chromium.org, navigation...@chromium.org, roblia...@chromium.org, sky+...@chromium.org
Attention needed from Joone Hur, Min Qin, Sylvain Defresne and Thomas Anderson

David Bienvenu added 1 comment

Patchset-level comments
Daniel Cheng . unresolved

Please rebase this CL now that the others have landed. That should make this much smaller more reviewable.

The biggest issue that remains to resolve is how exactly to serialize and deserialize a list of urls and titles to/from IDataObject. As I noted in a previous comment, the current serialization doesn't handle the case of embedded `\n` in titles gracefully. Whatever we write should handle that case (and other edge cases) gracefully. I'm not sure if there is a standard convention for serializing structured data to `IDataObject` on Windows; if there is, we should use it. Worst-case scenario, we can use `base::Pickle` though I don't love falling back to that as it's fairly Chrome-specific.

Joone Hur

How about we use JSON for the `Bookmark List` clipboard format? This will correctly handle any special characters in the titles, like newlines, and isn't Chrome-specific.

We can serialize the `std::vector<ClipboardUrlInfo>` into a JSON string and write that to the clipboard as `Bookmark List` format. On the reading side, the JSON can be parsed back into the vector.

Daniel Cheng

That could work, but you need to make sure the platform reviewers are aware of this. I don't feel comfortable making a long-term decision here as I no longer own this code.

David Bienvenu

+1 - if this needs to be rebased, I'm going to hold off on reviewing until it is.

Open in Gerrit

Related details

Attention is currently required from:
  • Joone Hur
Gerrit-Attention: Joone Hur <joon...@microsoft.com>
Gerrit-Attention: Thomas Anderson <thomasa...@chromium.org>
Gerrit-Attention: Sylvain Defresne <sdef...@chromium.org>
Gerrit-Attention: Min Qin <qin...@chromium.org>
Gerrit-Comment-Date: Wed, 19 Nov 2025 15:01:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages