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

Introduce "web-share" feature policy #166

Merged
merged 7 commits into from
Jul 17, 2020

Conversation

ewilligers
Copy link
Collaborator

@ewilligers ewilligers commented Jul 16, 2020

resolves #151

For normative changes, the following tasks have been completed:

Implementation commitment:

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

Some suggestions... just for the lulz, they just renamed that spec "Permission Policy" a few weeks ago.

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@marcoscaceres
Copy link
Member

Gecko tracking bug https://bugzilla.mozilla.org/show_bug.cgi?id=1653199

@marcoscaceres
Copy link
Member

Testing the HTTP header on the top level doc is great, but I wonder if yo could also test it on sub-frames? See the usage of "test_feature_availability" in the following, for instance https://github.com/web-platform-tests/wpt/pull/23729/files

It should be possible to copy/paste some of those tests.

@marcoscaceres
Copy link
Member

Blocking on test coverage.

ewilligers and others added 6 commits July 16, 2020 22:37
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 16, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec is being updated
w3c/web-share#166

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
@ewilligers
Copy link
Collaborator Author

Testing the HTTP header on the top level doc is great, but I wonder if yo could also test it on sub-frames? See the usage of "test_feature_availability" in the following, for instance https://github.com/web-platform-tests/wpt/pull/23729/files

Those tests fail in browsers. In WPTs, how do we ensure user activation in sub-frames?

Based on the linked tests, I tried adding feature-policy/resources/feature-policy-web-share.html .

Only when I include
await test_driver.bless("web share"); in feature-policy/resources/feature-policy-web-share.html
and comment out the following lines from resources/testdriver.js click

            if (window.top !== window) {
                return Promise.reject(new Error("can only click in top-level window"));
            }

do I have passing tests for same-origin iframes.

@marcoscaceres
Copy link
Member

Oh good point. Let's do that as a followup.

In WPTs, how do we ensure user activation in sub-frames?

... yeah, if we can't click() on subframe elements, we are kinda screwed... another way is clicking and sending a .postMessage(), but that only works in Chrome (it's not specified behavior in HTML yet).

do I have passing tests for same-origin iframes.

Ok, that's probably good enough for now 👍

@ewilligers ewilligers merged commit 2ef967a into w3c:master Jul 17, 2020
@ewilligers ewilligers deleted the feature-policy branch July 17, 2020 06:38
@marcoscaceres
Copy link
Member

Just FYI, I'm just adding about to send up the patch for this for Gecko (literally compiling right now 🤞).

@othermaciej, do you want us to file WebKit bugs or is someone from WebKit tracking the changes we are making?

@othermaciej
Copy link
Member

WebKit bug(s) would be appreciated. I'd have to call on @hober for follow-through and/or soliciting a WebKit opinion on this.

@marcoscaceres
Copy link
Member

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 17, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 18, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 20, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 20, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 20, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789872}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 20, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789872}
pull bot pushed a commit to FreddyZeng/chromium that referenced this pull request Jul 20, 2020
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789872}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 24, 2020
…licy, a=testonly

Automatic update from web-platform-tests
WebShare: Introduce web-share feature policy

share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789872}

--

wpt-commits: 1bd9297b8aa6870267c0c0ad1fa445f897ddecd7
wpt-pr: 24628
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jul 25, 2020
…licy, a=testonly

Automatic update from web-platform-tests
WebShare: Introduce web-share feature policy

share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789872}

--

wpt-commits: 1bd9297b8aa6870267c0c0ad1fa445f897ddecd7
wpt-pr: 24628
@ewilligers
Copy link
Collaborator Author

WPT issue raised for transient activation in iframes: web-platform-tests/wpt#24755

gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Aug 1, 2020
…licy, a=testonly

Automatic update from web-platform-tests
WebShare: Introduce web-share feature policy

share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligerschromium.org>
Reviewed-by: Ian Clelland <iclellandchromium.org>
Reviewed-by: Daniel Murphy <dmurphchromium.org>
Reviewed-by: Dominick Ng <dominicknchromium.org>
Cr-Commit-Position: refs/heads/master{#789872}

--

wpt-commits: 1bd9297b8aa6870267c0c0ad1fa445f897ddecd7
wpt-pr: 24628

UltraBlame original commit: a38778c7eacc05993acc592b72e85e34b9c3074f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Aug 1, 2020
…licy, a=testonly

Automatic update from web-platform-tests
WebShare: Introduce web-share feature policy

share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligerschromium.org>
Reviewed-by: Ian Clelland <iclellandchromium.org>
Reviewed-by: Daniel Murphy <dmurphchromium.org>
Reviewed-by: Dominick Ng <dominicknchromium.org>
Cr-Commit-Position: refs/heads/master{#789872}

--

wpt-commits: 1bd9297b8aa6870267c0c0ad1fa445f897ddecd7
wpt-pr: 24628

UltraBlame original commit: a38778c7eacc05993acc592b72e85e34b9c3074f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Aug 1, 2020
…licy, a=testonly

Automatic update from web-platform-tests
WebShare: Introduce web-share feature policy

share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligerschromium.org>
Reviewed-by: Ian Clelland <iclellandchromium.org>
Reviewed-by: Daniel Murphy <dmurphchromium.org>
Reviewed-by: Dominick Ng <dominicknchromium.org>
Cr-Commit-Position: refs/heads/master{#789872}

--

wpt-commits: 1bd9297b8aa6870267c0c0ad1fa445f897ddecd7
wpt-pr: 24628

UltraBlame original commit: a38778c7eacc05993acc592b72e85e34b9c3074f
@marcoscaceres
Copy link
Member

@ericwilligers, looks like Chrome did add some kind of use counter for this (that would count the fail cases). Could you share the results of that?

I'd like to close #169

@marcoscaceres
Copy link
Member

Sent WebKit patch. Hopefully will land in a day or two.

mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
share() requests fail with a rejected promise if the 'web-share'
feature is not enabled.

We define 'self' as the default feature policy for web-share.

The spec has been updated
w3c/web-share#166

Intent to Ship
https://groups.google.com/a/chromium.org/g/blink-dev/c/fgme9KOd8CU/m/TCYPKQAXAwAJ

Bug: 1079104
Change-Id: Id4030448a54589eddb45185cbd6fd8970aee34c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2299791
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#789872}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e41da738c01c870e5c30ccb24bb4c9f9b1cb5ae9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Policy integration
4 participants