Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Issue 2642263006: Allow vibrate in cross-origin iframes with user gesture. (Closed)

Created:
3 years, 11 months ago by Bin Lu
Modified:
3 years, 11 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, haraken, iclelland, lunalu1, mlamouri+watch-blink_chromium.org, mvanouwerkerk+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow vibrate in cross-origin iframes with user gesture. This is to fix the issue of breaking some use cases of vibrate in cross-origin iframes. Once the iframe has ever received a user gesture, it will be allowed to call vibrate. See more context: https://github.com/WICG/interventions/issues/25 BUG=683938 Review-Url: https://codereview.chromium.org/2642263006 Cr-Commit-Position: refs/heads/master@{#445631} Committed: https://chromium.googlesource.com/chromium/src/+/8f4a5209d0e6306060e901f89f345517e0df6219

Patch Set 1 #

Total comments: 1

Patch Set 2 : To modify only NavigatorVibration instead of FeaturePolicy. #

Patch Set 3 : Fix test failure of enabledforall. #

Total comments: 6

Patch Set 4 : git cl try #

Messages

Total messages: 41 (27 generated)
Bin Lu
Hi Rick and Ojan, Does this LG to you?
3 years, 11 months ago (2017-01-21 08:04:38 UTC) #5
ojan
https://codereview.chromium.org/2642263006/diff/1/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp File third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp (right): https://codereview.chromium.org/2642263006/diff/1/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp#newcode96 third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp:96: (!frame->isCrossOriginSubframe() || frame->hasReceivedUserGesture()))); I don't think you want this ...
3 years, 11 months ago (2017-01-22 23:02:54 UTC) #8
Bin Lu
Aha, I thought we want this for all features, but any way I moved the ...
3 years, 11 months ago (2017-01-23 03:57:17 UTC) #12
Rick Byers
I defer to iclelland@ on how best to unify the logic with Feature Policy. But ...
3 years, 11 months ago (2017-01-23 15:42:14 UTC) #20
iclelland
https://codereview.chromium.org/2642263006/diff/40001/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp File third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp (right): https://codereview.chromium.org/2642263006/diff/40001/third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp#newcode84 third_party/WebKit/Source/modules/vibration/NavigatorVibration.cpp:84: if (RuntimeEnabledFeatures::featurePolicyEnabled() && This version of the logic lgtm, ...
3 years, 11 months ago (2017-01-23 16:11:38 UTC) #21
lunalu1
logic lgtm
3 years, 11 months ago (2017-01-23 18:04:16 UTC) #23
Bin Lu
Thanks all for the review. @Rick, modified to test vibrate 3 times in a x-origin ...
3 years, 11 months ago (2017-01-23 20:18:19 UTC) #26
Bin Lu
https://codereview.chromium.org/2642263006/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-vibrate-with-user-gesture-allowed.html File third_party/WebKit/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-vibrate-with-user-gesture-allowed.html (right): https://codereview.chromium.org/2642263006/diff/40001/third_party/WebKit/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-vibrate-with-user-gesture-allowed.html#newcode24 third_party/WebKit/LayoutTests/http/tests/security/resources/cross-origin-iframe-for-vibrate-with-user-gesture-allowed.html:24: test(function () { On 2017/01/23 15:42:14, Rick Byers wrote: ...
3 years, 11 months ago (2017-01-23 20:18:40 UTC) #27
Rick Byers
LGTM
3 years, 11 months ago (2017-01-23 20:23:27 UTC) #28
Rick Byers
LGTM
3 years, 11 months ago (2017-01-23 20:23:27 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2642263006/60001
3 years, 11 months ago (2017-01-23 20:33:08 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/374106)
3 years, 11 months ago (2017-01-23 23:01:45 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2642263006/60001
3 years, 11 months ago (2017-01-23 23:53:19 UTC) #38
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 03:39:18 UTC) #41
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/8f4a5209d0e6306060e901f89f34...

Powered by Google App Engine
This is Rietveld 408576698