-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clipboard API] Clipboard Web Custom Formats implementation.
This patch addresses the changes proposed by the EditingWG[1] and agreed upon by all browser vendors. We are removing the `unsanitized` option, and instead, adding custom format support for MIME types that have "web " prefix in them. Added few wpt tests to test these changes. Below is a summary of the changes in this CL: 1. Removed `unsanitized` option from read/write methods. 2. If the custom format doesn't have a "web " prefix, then clipboard read/write fails. 3. Transient user activation is applicable to all supported formats - text/html, text/plain, image/png and web custom formats. 4. There are two "buckets" of clipboard formats. One for the well-known formats and the other for the web custom format. If the author doesn't specify the web format explicitly, then they don't get access to it. This means, we won't write web custom formats for well-known types implicitly if authors have not indicated that during the write call via a "web " prefix (e.g. "web text/html"). Same applies for reading web custom formats for well-known types- if there aren't any formats in the web custom format map, then we won't return any web custom formats i.e. text/html won't be automatically converted into "web text/html". Spec: w3c/clipboard-apis#175 Explainer: https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-pickling/explainer.md i2p: https://groups.google.com/a/chromium.org/g/blink-dev/c/Lo7WBM_v_LY/m/LncCKkXeAwAJ i2s: https://groups.google.com/a/chromium.org/g/blink-dev/c/k2rgX-4Cigc/m/P0RijrpzBAAJ?utm_medium=email&utm_source=footer&pli=1 1. Github issue: w3c/clipboard-apis#165 Bug: 106449 Change-Id: I86aae6a662089efeede2a01ac87cb698e9646df5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3650952 Commit-Queue: Anupam Snigdha <[email protected]> Reviewed-by: Alexander Timin <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Reviewed-by: Austin Sullivan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1011078} NOKEYCHECK=True GitOrigin-RevId: a3b96a459cf17ddc683b510718bfcbe40ed08195
- Loading branch information
1 parent
c3b3173
commit 7f34b5a
Showing
56 changed files
with
353 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.