Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard API: Implement clipboard-read and clipboard-write Feature Policy. #23727

Merged
merged 1 commit into from Jul 10, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 21, 2020

Complete and expose previously incomplete feature policy integration.
Also, use separate clipboard-read and clipboard-write feature policies,
as opposed to the previous single clipboard feature policy.

Previously, https://crrev.com/c/1913466 aimed to add Feature Policy
integration to the Clipboard API. Unfortunately, this integration wasn't
complete, so sites didn't have the option to allow cross-origin iframes
to access the clipboard at all after this change.

Complete the integration to allow sites to enable this feature policy.
Also, as feature and permission policies are being merged, use
clipboard-read and clipboard-write as feature policy names, so that the
feature policy and permission names match.

Verified by via automated WPTs, and also manually tested by running this
example1, which fails without this CL, and succeeds with the CL.

Intent to prototype and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IDAapW6w4to/iSH1MXRFCgAJ

Bug: 1074489
Change-Id: I09125d74510ed6c868d84936df595d02326619b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164248
Commit-Queue: Darwin Huang <huangdarwin@chromium.org>
Reviewed-by: Alex Russell <slightlyoff@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786914}

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 force-pushed the chromium-export-cl-2164248 branch 3 times, most recently from 29eb26a to 151485f Compare May 27, 2020 01:06
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title Clipboard API: Expose Feature Policy Integration to web. Clipboard API: Implement clipboard-read and clipboard-write Feature Policy. May 27, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2164248 branch 3 times, most recently from 3bf54b9 to 0240864 Compare June 1, 2020 22:19
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2164248 branch 2 times, most recently from 3e8379f to d596f0a Compare July 9, 2020 19:40
…olicy.

Complete and expose previously incomplete feature policy integration.
Also, use separate clipboard-read and clipboard-write feature policies,
as opposed to the previous single clipboard feature policy.

Previously, https://crrev.com/c/1913466 aimed to add Feature Policy
integration to the Clipboard API. Unfortunately, this integration wasn't
complete, so sites didn't have the option to allow cross-origin iframes
to access the clipboard at all after this change.

Complete the integration to allow sites to enable this feature policy.
Also, as feature and permission policies are being merged, use
clipboard-read and clipboard-write as feature policy names, so that the
feature policy and permission names match.

Verified by via automated WPTs, and also manually tested by running this
example[1], which fails without this CL, and succeeds with the CL.

Intent to prototype and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/IDAapW6w4to/iSH1MXRFCgAJ

[1]: https://smart-flicker-baroness.glitch.me/

Bug: 1074489
Change-Id: I09125d74510ed6c868d84936df595d02326619b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164248
Commit-Queue: Darwin Huang <huangdarwin@chromium.org>
Reviewed-by: Alex Russell <slightlyoff@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786914}
@Hexcles
Copy link
Member

Hexcles commented Jul 10, 2020

Tests seem flaky.

Test Subtest Results Messages
/clipboard-apis/feature-policy/clipboard-read/clipboard-read-disabled-by-feature-policy.tentative.https.sub.html Feature-Policy header clipboard-read "none" disallows the top-level document. FAIL: 2/10, PASS: 8/10 assert_unreached: Should have rejected: undefined Reached unreachable code
/clipboard-apis/feature-policy/clipboard-read/clipboard-read-enabled-on-self-origin-by-feature-policy.tentative.https.sub.html Feature-Policy header clipboard-read "self" allows the top-level document. FAIL: 8/10, PASS: 2/10 promise_test: Unhandled rejection with value: object "NotAllowedError: Document is not focused."
/clipboard-apis/feature-policy/clipboard-write/clipboard-write-disabled-by-feature-policy.tentative.https.sub.html Feature-Policy header clipboard-write "none" disallows the top-level document. FAIL: 2/10, PASS: 8/10 assert_unreached: Should have rejected: undefined Reached unreachable code
/clipboard-apis/feature-policy/clipboard-write/clipboard-write-enabled-on-self-origin-by-feature-policy.tentative.https.sub.html Feature-Policy header clipboard-write "self" allows the top-level document. FAIL: 6/10, PASS: 4/10 promise_test: Unhandled rejection with value: object "NotAllowedError: Document is not focused."

@Hexcles
Copy link
Member

Hexcles commented Jul 10, 2020

@Hexcles Hexcles merged commit e2ebd58 into master Jul 10, 2020
@Hexcles Hexcles deleted the chromium-export-cl-2164248 branch July 10, 2020 14:33
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.

None yet

3 participants