Enable explicitly passing UserGesture state to a sub-frame |
|||||||||||||||||
Issue descriptionSome sensitive operations (like playing audio) require a user gesture to be in progress (or have occurred) on the frame. But sometimes a frame is hidden and so cannot receive a user gesture itself. For example, see the rdio use case at the top of issue 178297 . Many of these cases can be addressed with postMessage today ( issue 355658 ), but that's not standardized or easily discoverable. We should design some sort of API to allow a frame to explicitly pass it's gesture privilege down to a particular sub-frame without the user having to interact with that sub-frame explicitly. Probably blocked on the generic gesture simplification/standardization work in issue 696617. ⛆ |
|
|
,
Jun 1 2017
,
Jul 5 2017
Since the parent issue is restricted I will also comment on a very simple use case that is related. I'm currently working on a website that has videos to play using the vimeo player. Because it is quite heavy and we don't want to overload the data connection of mobiles, the player are not loaded by default. We display an image with a play button on it. When the user click, we replace it with the vimeo iframe and want to play the video as soon as it is loaded. The user's click triggered everything so we do respect the purpose of the limitation but it does not work because we lost our gesture privilege waiting for the frame to be ready. This is quite bothersome. It would be awesome if an iframe appended to the DOM with a gesture privilege could keep the gesture privilege as a whole or something like that.
,
Jul 5 2017
I agree that playing the video in the iframe should be allowed in this case. I believe all this needs is passing the gesture info down to a dynamically added subframe. Hi raynaudquentin@: do you have a minimal repro?
,
Nov 1 2017
,
Oct 17
Looks like UAv2 needs this solution before shipping, to allow sites to override UAv2's frame hierarchy. See Issue 867599 .
,
Oct 22
,
Nov 7
We can't fix this before shipping UAv2 (Issue 696617) because subframe visibility is undefined in the current model (works only in same-process frames).
,
Dec 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1 commit a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1 Author: Mustaq Ahmed <mustaq@google.com> Date: Sat Dec 08 00:30:14 2018 Allow user activation propagation to same-origin frames. This is an intermediate measure to mitigate UAv2 regressions for apps that require same-origin visibility. It temporarily makes Chrome's implementation of UAv2 a bit closer to the old (v1) model, thus gives us time to work on an iframe attribute to declaratively allow user activation propagation to subframes (crbug.com/728334). We will remove this intermediate measure once the iframe attribute is ready. Bug: 867599 , 728334 Change-Id: I67557a873177edf20ef809b2a976a740f32ed1d7 Reviewed-on: https://chromium-review.googlesource.com/c/1366761 Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#614883} [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/content/browser/frame_host/frame_tree_node.cc [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/content/public/common/content_features.cc [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/content/public/common/content_features.h [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/dom/Window/window-postmessage-user-gesture-expected.txt [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/dom/Window/window-postmessage-user-gesture.html [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/events/open-window-from-another-frame-expected.txt [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/events/open-window-from-another-frame.html [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/fast/events/resources/open-window-from-another-frame-otherFrame.html [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/virtual/user-activation-v2/fast/dom/Window/window-postmessage-user-gesture-expected.txt [modify] https://crrev.com/a5dfa60b3ab28bde867a6a411c5c4fd0e28f1bc1/third_party/blink/web_tests/virtual/user-activation-v2/fast/events/open-window-from-another-frame-expected.txt
,
Dec 10
,
Dec 10
,
Jan 11
We have got another case that needs activation delegation to subframes for an ideal fix.
,
Jan 16
,
Jan 17
(5 days ago)
,
Jan 18
(5 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/638e15167f366f1808c9122577ab881d18b25331 commit 638e15167f366f1808c9122577ab881d18b25331 Author: Mustaq Ahmed <mustaq@google.com> Date: Fri Jan 18 00:47:15 2019 Add renderer update for same-origin user activation visibility. This CL fixes missing renderer-side update for corresponding brower-side change (https://crrev.com/c/1366761). This is part of an intermediate measure to mitigate UAv2 regressions for apps that require same-origin visibility. We will eventually remove this through an iframe attribute to declaratively allow user activation propagation to subframes (crbug.com/728334). Bug: 728334, 919461 Change-Id: I2a1af7cf4f27f9dc402dfbf2c8e1c1b609fc1e65 TBR: avi@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/1410143 Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Becca Hughes <beccahughes@chromium.org> Cr-Commit-Position: refs/heads/master@{#623933} [modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/chrome/browser/extensions/content_capabilities_browsertest.cc [modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/content/child/runtime_features.cc [modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/public/platform/web_runtime_features.h [modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/renderer/core/frame/frame.cc [modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/renderer/platform/exported/web_runtime_features.cc [modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/renderer/platform/runtime_enabled_features.json5 [modify] https://crrev.com/638e15167f366f1808c9122577ab881d18b25331/third_party/blink/web_tests/TestExpectations
,
Jan 21
(2 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b278e0a7674e87b095c551103a87a75acfa9f78b commit b278e0a7674e87b095c551103a87a75acfa9f78b Author: Mustaq Ahmed <mustaq@google.com> Date: Mon Jan 21 19:15:18 2019 Add renderer update for same-origin user activation visibility. This CL fixes missing renderer-side update for corresponding brower-side change (https://crrev.com/c/1366761). This is part of an intermediate measure to mitigate UAv2 regressions for apps that require same-origin visibility. We will eventually remove this through an iframe attribute to declaratively allow user activation propagation to subframes (crbug.com/728334). Bug: 728334, 919461 Change-Id: I2a1af7cf4f27f9dc402dfbf2c8e1c1b609fc1e65 TBR: avi@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/1410143 Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Becca Hughes <beccahughes@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#623933}(cherry picked from commit 638e15167f366f1808c9122577ab881d18b25331) Reviewed-on: https://chromium-review.googlesource.com/c/1426002 Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Cr-Commit-Position: refs/branch-heads/3626@{#744} Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437} [modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/chrome/browser/extensions/content_capabilities_browsertest.cc [modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/content/child/runtime_features.cc [modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/public/platform/web_runtime_features.h [modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/renderer/core/frame/frame.cc [modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/renderer/platform/exported/web_runtime_features.cc [modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/renderer/platform/runtime_enabled_features.json5 [modify] https://crrev.com/b278e0a7674e87b095c551103a87a75acfa9f78b/third_party/blink/web_tests/TestExpectations
,
Jan 21
(2 days ago)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b278e0a7674e87b095c551103a87a75acfa9f78b Commit: b278e0a7674e87b095c551103a87a75acfa9f78b Author: mustaq@google.com Commiter: mustaq@chromium.org Date: 2019-01-21 19:15:18 +0000 UTC Add renderer update for same-origin user activation visibility. This CL fixes missing renderer-side update for corresponding brower-side change (https://crrev.com/c/1366761). This is part of an intermediate measure to mitigate UAv2 regressions for apps that require same-origin visibility. We will eventually remove this through an iframe attribute to declaratively allow user activation propagation to subframes (crbug.com/728334). Bug: 728334, 919461 Change-Id: I2a1af7cf4f27f9dc402dfbf2c8e1c1b609fc1e65 TBR: avi@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/1410143 Commit-Queue: Mustaq Ahmed <mustaq@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Becca Hughes <beccahughes@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#623933}(cherry picked from commit 638e15167f366f1808c9122577ab881d18b25331) Reviewed-on: https://chromium-review.googlesource.com/c/1426002 Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Cr-Commit-Position: refs/branch-heads/3626@{#744} Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437} |
||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||
Comment 1 by rbyers@chromium.org
, May 31 2017