Skip to content

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jan 8, 2026

According to RFC 2483, Section 5, the text/uri-list MIME type supports
multiple URLs separated by CRLF(\r\n). However, Chromium was not able to
parse multiple URLs from a single text/uri-list string, treating the
entire string as one invalid URL.

This CL updates the drag-and-drop implementation to correctly support
multiple URLs. It now parses the uri-list string by splitting on the
newline character(\n) and applying base::TRIM_WHITESPACE, which robustly
handles both \n and \r\n for better compatibility.

In addition, this CL introduces the BookmarkList clipboard format for
Windows, which contains a JSON array of URLs and titles. If the URL list
has multiple entries, they are also stored using the new BookmarkList
type on the Windows clipboard.

See this design document for more details:
https://docs.google.com/document/d/1zNvn2hQOfMCc9-L9_Wt-Q4rBhmSAQHhUYWMDdNKLCGU/edit?usp=sharing

The below CLs were split from the original CL:

Bug: 41011768
Change-Id: I05feaa80a6db10e311c2e222281df4a22af7b5a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6608042
Reviewed-by: Thomas Anderson <[email protected]>
Commit-Queue: Joone Hur <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1566533}

According to RFC 2483, Section 5, the text/uri-list MIME type supports
multiple URLs separated by CRLF(\r\n). However, Chromium was not able to
parse multiple URLs from a single text/uri-list string, treating the
entire string as one invalid URL.

This CL updates the drag-and-drop implementation to correctly support
multiple URLs. It now parses the uri-list string by splitting on the
newline character(\n) and applying base::TRIM_WHITESPACE, which robustly
handles both \n and \r\n for better compatibility.

In addition, this CL introduces the BookmarkList clipboard format for
Windows, which contains a JSON array of URLs and titles. If the URL list
has multiple entries, they are also stored using the new BookmarkList
type on the Windows clipboard.

See this design document for more details:
https://docs.google.com/document/d/1zNvn2hQOfMCc9-L9_Wt-Q4rBhmSAQHhUYWMDdNKLCGU/edit?usp=sharing

The below CLs were split from the original CL:
- https://chromium-review.googlesource.com/c/chromium/src/+/7059146
- https://chromium-review.googlesource.com/c/chromium/src/+/7084017

Bug: 41011768
Change-Id: I05feaa80a6db10e311c2e222281df4a22af7b5a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6608042
Reviewed-by: Thomas Anderson <[email protected]>
Commit-Queue: Joone Hur <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1566533}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit e500600 into master Jan 9, 2026
27 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-6608042 branch January 9, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants