|
|
Created:
4 years, 4 months ago by Sam McNally Modified:
4 years, 2 months ago CC:
blink-reviews, blink-reviews-api_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionDisable WebShare on platforms other than android.
This adds origin_trial_os_whitelist to RuntimeEnabledFeatures. If set,
an origin trial will only be available on the whitelisted OSes.
BUG=635741
Committed: https://crrev.com/4d59fb592c7df5a06274bbffbe5a565f01307c11
Cr-Commit-Position: refs/heads/master@{#422981}
Patch Set 1 : #
Total comments: 3
Patch Set 2 : #
Total comments: 2
Patch Set 3 : rebase #Patch Set 4 : #
Messages
Total messages: 52 (30 generated)
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:1) has been deleted
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #1 (id:20001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
sammc@chromium.org changed reviewers: + mgiuca@chromium.org
https://codereview.chromium.org/2249043002/diff/40001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/platform/android/webexposed/global-interface-listing-expected.txt (right): https://codereview.chromium.org/2249043002/diff/40001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/platform/android/webexposed/global-interface-listing-expected.txt:1: CONSOLE WARNING: line 94: 'webkitOfflineAudioContext' is deprecated. Please use 'OfflineAudioContext' instead. You added an entire new file for Android that's a copy of the other one? That seems ... bad. Where is this linked up?
https://codereview.chromium.org/2249043002/diff/40001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/platform/android/webexposed/global-interface-listing-expected.txt (right): https://codereview.chromium.org/2249043002/diff/40001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/platform/android/webexposed/global-interface-listing-expected.txt:1: CONSOLE WARNING: line 94: 'webkitOfflineAudioContext' is deprecated. Please use 'OfflineAudioContext' instead. On 2016/08/22 20:38:44, Matt Giuca wrote: > You added an entire new file for Android that's a copy of the other one? That > seems ... bad. > > Where is this linked up? This seems to be how platform-specific expectations are done. If you can find a better alternative, I'd be happy to try it. The test runner chooses the right expectation file.
https://codereview.chromium.org/2249043002/diff/40001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/platform/android/webexposed/global-interface-listing-expected.txt (right): https://codereview.chromium.org/2249043002/diff/40001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/platform/android/webexposed/global-interface-listing-expected.txt:1: CONSOLE WARNING: line 94: 'webkitOfflineAudioContext' is deprecated. Please use 'OfflineAudioContext' instead. On 2016/08/23 16:54:52, Sam McNally wrote: > On 2016/08/22 20:38:44, Matt Giuca wrote: > > You added an entire new file for Android that's a copy of the other one? That > > seems ... bad. > > > > Where is this linked up? > > This seems to be how platform-specific expectations are done. If you can find a > better alternative, I'd be happy to try it. > > The test runner chooses the right expectation file. Is this the first ever Android-specific expectation? Just seems bizarre and scary to copy an 8000-line file for just this purpose. There aren't any other global-interface-listing-expected.txt files in any other LayoutTests/platform directories. Is this like the first ever platform-specific expectation? Perhaps we're doing it wrong in that case, and we should just have the method exist but fail somehow.
mgiuca@chromium.org changed reviewers: + esprehn@chromium.org
+Elliott: For your opinion. We can't find any precedent for making an API completely missing on some platforms but not others. The problem is the global-interface-listing-expected.txt file, which seems to need a full copy for each platform. Three choices we can see: 1. Full copy of global-interface-listing-expected.txt for Android. 2. Blacklist navigator.share in the global interface listing text file (and just have it covered by our own tests). 3. Make navigator.share present on all platforms but fail on everywhere but Android. (This makes it impossible to feature-detect properly.) Leaning towards #2, do you think that's the right call?
On 2016/08/23 at 21:40:59, mgiuca wrote: > +Elliott: For your opinion. We can't find any precedent for making an API completely missing on some platforms but not others. The problem is the global-interface-listing-expected.txt file, which seems to need a full copy for each platform. > > Three choices we can see: > 1. Full copy of global-interface-listing-expected.txt for Android. > 2. Blacklist navigator.share in the global interface listing text file (and just have it covered by our own tests). > 3. Make navigator.share present on all platforms but fail on everywhere but Android. (This makes it impossible to feature-detect properly.) > > Leaning towards #2, do you think that's the right call? I might enable navigator.share always in Content Shell which is where this test runs. The code should be resilient to having no impl for that platform and reject the promises or something anyway. Then I'd make the production chrome disable the feature except on android?
esprehn@chromium.org changed reviewers: + dglazkov@chromium.org, jochen@chromium.org
jochen@, dglazkov@ Got other ideas? :)
On 2016/08/24 at 05:18:35, esprehn wrote: > jochen@, dglazkov@ Got other ideas? :) This (shipping an API that's only available on one OS) does seem to have a smell. How can we avoid it? IOW, can we formulate sharing being disabled in terms of an API output? Can the promise reject immediately, for instance?
On 2016/08/24 16:13:25, dglazkov wrote: > On 2016/08/24 at 05:18:35, esprehn wrote: > > jochen@, dglazkov@ Got other ideas? :) > > This (shipping an API that's only available on one OS) does seem to have a > smell. How can we avoid it? IOW, can we formulate sharing being disabled in > terms of an API output? Can the promise reject immediately, for instance? It's possible that some platforms (e.g., Desktop Linux) may never support this API, due to simply having no share infrastructure. We want sites to be able to feature detect so they can disable or hide their Sharing UI in this case. Previously, the proposal was that navigator.share always exists but you can use a separate method navigator.canShare to detect whether it's supported. Then we decided (in our discussions with Mozilla editor Marcos Cáceres) to remove this method an just use the presence or absence of navigator.share as a signal. https://github.com/WICG/web-share/pull/8 If you want navigator.share to be present no matter what, I think we have to go back to adding canShare(). Which we can do, but it requires agreement at the spec level. We can't just reject the promise because then you can't feature detect.
On 2016/08/24 17:27:36, Matt Giuca wrote: > On 2016/08/24 16:13:25, dglazkov wrote: > > On 2016/08/24 at 05:18:35, esprehn wrote: > > > jochen@, dglazkov@ Got other ideas? :) > > > > This (shipping an API that's only available on one OS) does seem to have a > > smell. How can we avoid it? IOW, can we formulate sharing being disabled in > > terms of an API output? Can the promise reject immediately, for instance? > > It's possible that some platforms (e.g., Desktop Linux) may never support this > API, due to simply having no share infrastructure. We want sites to be able to > feature detect so they can disable or hide their Sharing UI in this case. > > Previously, the proposal was that navigator.share always exists but you can use > a separate method navigator.canShare to detect whether it's supported. Then we > decided (in our discussions with Mozilla editor Marcos Cáceres) to remove this > method an just use the presence or absence of navigator.share as a signal. > > https://github.com/WICG/web-share/pull/8 > > If you want navigator.share to be present no matter what, I think we have to go > back to adding canShare(). Which we can do, but it requires agreement at the > spec level. We can't just reject the promise because then you can't feature > detect. I'll add that there's a precedent here: lots of APIs that kinda-sorta-only make sense on mobile (Accelerometer, Vibration, Screen Orientation). All of these API surfaces are visible on the desktop platforms as well, but just don't really do anything meaningful.
On 2016/08/24 at 17:35:19, mgiuca wrote: > On 2016/08/24 17:27:36, Matt Giuca wrote: > > On 2016/08/24 16:13:25, dglazkov wrote: > > > On 2016/08/24 at 05:18:35, esprehn wrote: > > > > jochen@, dglazkov@ Got other ideas? :) > > > > > > This (shipping an API that's only available on one OS) does seem to have a > > > smell. How can we avoid it? IOW, can we formulate sharing being disabled in > > > terms of an API output? Can the promise reject immediately, for instance? > > > > It's possible that some platforms (e.g., Desktop Linux) may never support this > > API, due to simply having no share infrastructure. We want sites to be able to > > feature detect so they can disable or hide their Sharing UI in this case. > > > > Previously, the proposal was that navigator.share always exists but you can use > > a separate method navigator.canShare to detect whether it's supported. Then we > > decided (in our discussions with Mozilla editor Marcos Cáceres) to remove this > > method an just use the presence or absence of navigator.share as a signal. > > > > https://github.com/WICG/web-share/pull/8 > > > > If you want navigator.share to be present no matter what, I think we have to go > > back to adding canShare(). Which we can do, but it requires agreement at the > > spec level. We can't just reject the promise because then you can't feature > > detect. > > I'll add that there's a precedent here: lots of APIs that kinda-sorta-only make sense on mobile (Accelerometer, Vibration, Screen Orientation). All of these API surfaces are visible on the desktop platforms as well, but just don't really do anything meaningful. I would prefer that we follow that precedent. IOW, the API surface does not change from OS to OS, but the way it responds does. If you'd like me to chime in on the bug, I can.
> I would prefer that we follow that precedent. IOW, the API surface does not > change from OS to OS, but the way it responds does. If you'd like me to chime in > on the bug, I can. Seems reasonable. No need to chime in unless you want to. I'll just link to this discussion from the bug.
Message was sent while issue was closed.
On 2016/08/24 18:22:53, Matt Giuca (OOO til Oct 4) wrote: > > I would prefer that we follow that precedent. IOW, the API surface does not > > change from OS to OS, but the way it responds does. If you'd like me to chime > in > > on the bug, I can. > > Seems reasonable. No need to chime in unless you want to. I'll just link to this > discussion from the bug. We had some good discussion on https://github.com/WICG/web-share/pull/8. Looks like the new consensus is that canShare adds more complexity without actually removing the need to test for undefinedness. So let's drop canShare (for now at least) and have this be undefined on those non-Android platforms. Therefore, can we go ahead with this CL? https://codereview.chromium.org/2249043002#msg22 has some tips for how to get around the testing issue (make it always enabled in content shell, and then disable on other platforms, with the tests only running on content shell you can assume it is always present).
Message was sent while issue was closed.
lgtm
Message was sent while issue was closed.
Description was changed from ========== Disable WebShare on platforms other than android. BUG=635741 ========== to ========== Disable WebShare on platforms other than android. BUG=635741 ==========
On 2016/09/29 04:01:36, dglazkov wrote: > lgtm Unclosed.
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Disable WebShare on platforms other than android. BUG=635741 ========== to ========== Disable WebShare on platforms other than android. This adds origin_trial_os_whitelist to RuntimeEnabledFeatures. If set, an origin trial will only be available on the whitelisted OSes. BUG=635741 ==========
The previous approach in patch set 1 doesn't work with origin trials. It set the default availability to false on other platforms, but origin trials enables a feature if it's either available by default or the site is in the origin trial. Instead, I've changed RuntimeEnabledFeatures and the generated origin trials code to whitelist the webshare origin trial to Android. PTAL.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2249043002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_runtime_features.py (right): https://codereview.chromium.org/2249043002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_runtime_features.py:52: 'origin_trial_os_whitelist': [], just origin_trial_os? Also, will you need to modify this again a feature exits origin trials? Could this be somehow orthogonal to origin trial flags?
Patchset #3 (id:80001) has been deleted
https://codereview.chromium.org/2249043002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/make_runtime_features.py (right): https://codereview.chromium.org/2249043002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/make_runtime_features.py:52: 'origin_trial_os_whitelist': [], On 2016/09/29 15:59:47, dglazkov wrote: > just origin_trial_os? Done. > Also, will you need to modify this again a feature exits > origin trials? When the origin trial ends, the previous approach for restricting platforms will work again. > > Could this be somehow orthogonal to origin trial flags? Runtime features are either on or off and origin trials can turn an off into an on. To merge this into the existing per-platform controls we'd need another state for runtime features that isn't affected by origin trials.
The CQ bit was checked by sammc@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
The CQ bit was checked by sammc@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #4 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== Disable WebShare on platforms other than android. This adds origin_trial_os_whitelist to RuntimeEnabledFeatures. If set, an origin trial will only be available on the whitelisted OSes. BUG=635741 ========== to ========== Disable WebShare on platforms other than android. This adds origin_trial_os_whitelist to RuntimeEnabledFeatures. If set, an origin trial will only be available on the whitelisted OSes. BUG=635741 Committed: https://crrev.com/4d59fb592c7df5a06274bbffbe5a565f01307c11 Cr-Commit-Position: refs/heads/master@{#422981} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/4d59fb592c7df5a06274bbffbe5a565f01307c11 Cr-Commit-Position: refs/heads/master@{#422981} |