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 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 left a comment

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 May 26, 2020
@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 May 27, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2164248 branch from 0240864 to 1cdb3df Jun 3, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2164248 branch from 1cdb3df to 08975cb Jun 24, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2164248 branch 2 times, most recently from 3e8379f to d596f0a Jul 7, 2020
…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
20 of 22 checks passed
20 of 22 checks passed
sink-task Community-TC (pull_request)
Details
wpt-chrome-dev-stability Community-TC (pull_request)
Details
Azure Pipelines Build #20200709.70 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
download-firefox-nightly Community-TC (pull_request)
Details
lint Community-TC (pull_request)
Details
staging.wpt.fyi - chrome[experimental] Chrome results
Details
staging.wpt.fyi - firefox[experimental] Firefox results
Details
staging.wpt.fyi - safari[experimental] Safari results
Details
wpt-chrome-dev-results Community-TC (pull_request)
Details
wpt-chrome-dev-results-without-changes Community-TC (pull_request)
Details
wpt-decision-task Community-TC (pull_request)
Details
wpt-firefox-nightly-results Community-TC (pull_request)
Details
wpt-firefox-nightly-results-without-changes Community-TC (pull_request)
Details
wpt-firefox-nightly-stability Community-TC (pull_request)
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
wpt.fyi - safari[experimental] Safari results
Details
@Hexcles Hexcles deleted the chromium-export-cl-2164248 branch Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.