New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 759042 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocked on:
issue 827182

Blocking:
issue 786419



Sign in to add a comment

Make touch-action flow across OOPIFs

Project Member Reported by rbyers@chromium.org, Aug 25 2017

Issue description

Chrome 62.0.3193.3

If I have a page like:

<div style='touch-action: none'>
  <iframe src=foo.html></iframe>
</div>

Pinching inside the iframe should not zoom.  Blink implements this today in AdjustEffectiveTouchAction in StyleAdjuster.cpp by consulting the style of the parent document.  This won't work when the parent document is cross-process.

Demo: http://jsbin.com/nimurap
Enabling chrome://flags#enable-top-document-isolation allows me to pinch-zoom on the iframe

To fix this we'll need some way to send the effective touch action of iframe elements to the renderer for that frame.

I don't think this bug is terrible (can't think of a reason it would need to block TDI launch), but it's definitely a bug we need to fix at some point.  Whether or not a frame is remote shouldn't change behavior like this.
 

Comment 1 by sunxd@chromium.org, Aug 26 2017

Owner: sunxd@chromium.org
Status: Assigned (was: Untriaged)
I'll take this since I'm more familiar with that part.

Comment 2 by kenrb@chromium.org, Aug 28 2017

Let me know if you need help with the cross-frame propagation. There are a few other areas where we need to pass information about the iframe element to the renderer for its frame, and I have a bug that I assigned to myself to make it the propagation path more sensible (issue 750179).

Comment 3 by mcnee@chromium.org, Nov 17 2017

Blocking: 786419
Note that this also affects touch-action for elements inside the OOPIF. touch-action can prevent panning, but not pinching.

Example:
Visit http://csreis.github.io/tests/cross-site-iframe-simple.html
Set touch-action: pan-x pan-y; on the body of the iframe's document.
Pinching inside the iframe causes zooming.
Components: Internals>Sandbox>SiteIsolation

Comment 5 by rbyers@chromium.org, Feb 23 2018

Cc: rbyers@chromium.org dtapu...@chromium.org
I see this is marked as P3.  Have we confirmed that we're OK with the web compat implications of site isolation shipping without this?  I.e. do we have (can we get) UMA data on how many touches occur in an iframe in which behavior will change (be broken) without fixing this?

Comment 6 by nasko@chromium.org, Feb 23 2018

Labels: -Pri-3 Pri-2
This does not seem like a P3 to me, but also it hasn't seen any activity in a while. Is anyone actively looking at this? If not, it should be made available so someone else can pick it up.

rbyers@, I'd be looking to you to give us guidance of whether this is a ship blocking bug or not.

Comment 7 by rbyers@chromium.org, Feb 23 2018

Cc: nzolghadr@chromium.org
Thanks.  I defer to dtapuska - priority is probably an input team question (though we likely can't answer that without some UMA data).

Comment 8 by nasko@chromium.org, Mar 2 2018

Labels: Proj-SiteIsolation-LaunchBlocking

Comment 9 by creis@chromium.org, Mar 8 2018

Labels: -Pri-2 -OS-All M-67 OS-Chrome OS-Linux OS-Mac OS-Windows Pri-1
Owner: dtapu...@chromium.org
dtapuska@: Can you help us find an owner for this, since sunxd@ isn't responding?  We should aim to fix this in M67, and possibly merge to M66 if it's important enough for beta trials.
Cc: -kenrb@chromium.org
Owner: flackr@chromium.org
I'm OOO next week, flackr@ is going to coordinate with kenrb@ and sunxd@ on this to get it in motion.
Owner: sunxd@chromium.org
We talked this through, we should generalize passing the inherited touch action to the child document. This should be similar to Frame::SetIsInert which RemoteFrame overrides with an IPC (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/RemoteFrame.cpp?sq=package:chromium&l=137) which ultimately calls into WebFrameWidgetImpl::SetIsInert https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp?type=cs&q=WebFrameWidgetImpl::SetIsInert&l=675.

Ken proposed combining the inherited touch action with the inert bool so that all inherited frame properties can be passed using the same message rather than needing to add a message for each individual property. Adding additional methods may be easier when this uses mojo.

The inherited touch action can then be set on the owner or the child frame such that StyleAdjuster can access it and propagate it appropriately.

Then, we need to ensure that touch action regions within the child frame are respected, which from the original bug report it sounds like it may already be the case.

Comment 12 by nasko@chromium.org, Mar 19 2018

Can we get an update on whether this is on track to land in M67?

Comment 13 by sunxd@chromium.org, Mar 20 2018

I'm working on this patch right now.
What is the exact user impact for this?

Comment 16 by sunxd@chromium.org, Mar 27 2018

When running in site isolation mode, user would be able to pinch zoom an iframe's content even if the iframe's parent forbids pinch zooming.
Re c16 ... is that true? We don't pass GesturePinch events to subframes, only the mainframe. See

https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_host_input_event_router.cc?rcl=627a4d1cb2a7ab83378aeb4b97e3b215e6a90593&l=1055

I just tried the repro in C1, and it doesn't work with --site-per-process enabled.

Or am I missing something subtler here.

Comment 18 by sunxd@chromium.org, Mar 27 2018

wjmaclean@: I cannot reproduce it on desktop (with device mode) or mac, but I can pinch zoom the iframe on a nexus 6. Does the hit testing work differently on android? On both desktop and android, the effective touch action of subframes are wrong though.
Ignore me, I think I misunderstood the intent of the repro.
I created a bin which demonstrates the two cases I'm aware of: http://output.jsbin.com/tozizur/quiet

The first frame has an element which disables pinching, and the second has pinch disabled on the iframe element.
Re c18: Pinch zoom may behave differently on Android ... I'd have to check.

Re c20: ok, both of those definitely repro (i.e. broken) with --site-per-process.

Comment 22 by sunxd@chromium.org, Mar 29 2018

Blockedon: 827182
Cc: abdulsyed@chromium.org
Labels: ReleaseBlock-Stable
I can confirm that http://jsbin.com/nimurap incorrectly allows pinch zoom on a Chromebook Pixel running 67.0.3381.0 with Site Isolation (--site-per-process), and that prevents it when Site Isolation is disabled (using the Site Isolation trial opt-out flag on chrome://flags).

sunxd@: Is https://chromium-review.googlesource.com/c/chromium/src/+/982154 still on track?

Also, is  issue 827182  is just about the green div case in http://output.jsbin.com/tozizur/quiet?

I'm tentatively treating both of these as blockers, given that we're aiming to enable Site Isolation on desktop in M67.
sunxd@: Can you please post an update on your status?  Branch cut is less than 1 week away, and we'd like to get this fixed by then.  Thanks!
wjmaclean@ and I will talk about  issue 827182  next Monday. I believe the touch-action is propagated correctly but the effective touch action is not respected.

Comment 26 by creis@chromium.org, Apr 11 2018

sunxd@: Friendly ping on this one as well.  Branch cut is tomorrow-- is the fix on track to land?  Thanks!

Comment 27 by creis@chromium.org, Apr 18 2018

sunxd@: What's the status on the fix for this?  Branch cut was last week, so please try to land a fix ASAP so that it can be merged to M67.
M67 Stable promotion is coming soon. Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and request a merge into the release branch ASAP. Thank you.


Comment 29 by sunxd@chromium.org, Apr 30 2018

Labels: -M-67 M-68
I currently have the fix but I think the fix involves too many files and it might not be safe to merge it into M67. Since this we are not enabling site isolation for android, this only influence desktop touch screen when there frame owner does not allow pinch/double tap, I think we can make it block M68.

Comment 30 by creis@chromium.org, Apr 30 2018

Labels: -Proj-SiteIsolation-LaunchBlocking
Ok.  We'll keep it as RBS for M68 but I'll remove the launch blocking label for Site Isolation.  Let's continue to try to get the fix in soon.  Thanks for the update!
Project Member

Comment 31 by bugdroid1@chromium.org, May 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3e0ee34fa47a3558be52ac7e85e3e38d4a5eced5

commit 3e0ee34fa47a3558be52ac7e85e3e38d4a5eced5
Author: sunxd <sunxd@chromium.org>
Date: Thu May 24 14:08:09 2018

Determine the existence of touch handler by effective touch action

LayoutObject used to determine whether there is a touch event handler by
checking if it has touch-action property set. However, after we enable
site isolation, a LayoutObject may still have touch event handler if it
inherits touch-action from the parent frame.

This CL makes LayoutObject determine the existence by looking at its
effective touch action.

Bug:  759042 
Change-Id: I60e868090a7725757a910bfca8766ec430cf72aa
Reviewed-on: https://chromium-review.googlesource.com/1040350
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Xida Chen <xidachen@chromium.org>
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561492}
[modify] https://crrev.com/3e0ee34fa47a3558be52ac7e85e3e38d4a5eced5/third_party/blink/renderer/core/layout/layout_object.cc
[modify] https://crrev.com/3e0ee34fa47a3558be52ac7e85e3e38d4a5eced5/third_party/blink/renderer/core/layout/layout_object_test.cc

Project Member

Comment 32 by bugdroid1@chromium.org, May 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/540a9960a86fed502af0692e9987da8f690f66b6

commit 540a9960a86fed502af0692e9987da8f690f66b6
Author: sunxd <sunxd@chromium.org>
Date: Thu May 24 22:51:06 2018

Make effective touch action flow across OOPIFs

Elements inside an out-of-process iframe should inherit the effective
touch action of the parent frame, this CL propagates the computed touch
action to all of the element's OOPIF children.

Bug:  759042 
Change-Id: I2ddfbd0a75ad7166a6ec94a44e039ea7384c7947
Reviewed-on: https://chromium-review.googlesource.com/982154
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Xianda Sun <sunxd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561668}
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/browser/frame_host/cross_process_frame_connector.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/browser/frame_host/cross_process_frame_connector.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/browser/renderer_host/frame_connector_delegate.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/browser/renderer_host/frame_connector_delegate.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/browser/renderer_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/browser/renderer_host/render_widget_host_view_child_frame.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/browser/site_per_process_browsertest.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/common/frame_messages.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/common/input/touch_action_optional_struct_traits.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/common/input_messages.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/common/view_messages.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/public/common/common_param_traits_macros.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/renderer/render_frame_proxy.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/renderer/render_frame_proxy.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/renderer/render_widget.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/renderer/render_widget.h
[add] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/content/test/data/frame_tree/page_with_iframe_in_div.html
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/testing/buildbot/filters/viz.content_browsertests.filter
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/public/web/web_frame_widget.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/public/web/web_remote_frame_client.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/css/resolver/style_adjuster.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/frame.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/frame.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/local_frame.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/local_frame.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/remote_frame.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/remote_frame.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/remote_frame_client.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/remote_frame_client_impl.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/remote_frame_client_impl.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/frame/web_frame_widget_impl.h
[modify] https://crrev.com/540a9960a86fed502af0692e9987da8f690f66b6/third_party/blink/renderer/core/loader/empty_clients.h

Comment 33 by sunxd@chromium.org, May 29 2018

Status: Fixed (was: Assigned)
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-68; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-68 label, otherwise remove Merge-TBD label. Thanks.

Comment 35 by sunxd@chromium.org, May 29 2018

Labels: Merge-Request-68
Status: Started (was: Fixed)
I thought branch point was May 24, but the cl landed a few hours after, requesting merging to m68.
Project Member

Comment 36 by sheriffbot@chromium.org, May 30 2018

Labels: -Merge-Request-68 Hotlist-Merge-Approved Merge-Approved-68
Your change meets the bar and is auto-approved for M68. Please go ahead and merge the CL to branch 3440 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 37 by creis@chromium.org, May 31 2018

Labels: -Merge-TBD -Hotlist-Merge-Approved -Merge-Approved-68
Status: Fixed (was: Started)
Actually, I don't think a merge is required here-- the fix landed at r561668 (68.0.3440.0), and the branch happened at r561733.  Indeed, I can confirm this is working correctly on ChromeOS Dev channel 68.0.3440.4 on a Chromebook Pixel 1, using the repro at http://jsbin.com/nimurap.  (It was not working on version 68.0.3437.0, before I updated.)

Thanks for the fix!
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-68; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-68 label, otherwise remove Merge-TBD label. Thanks.

Comment 39 by creis@chromium.org, May 31 2018

Labels: -Merge-TBD
Updating again, based on comment 37.

Sign in to add a comment