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

Issue 621835 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 594217
issue 471850



Sign in to add a comment

OOPIF: cross origin iframes not rendered at all

Project Member Reported by xiaoche...@chromium.org, Jun 21 2016

Issue description

Version: 53.0.2767.6 (Official Build) dev (64-bit)
OS: Android. Can repro with 6.0.1 (Nexus 5X Build/MTC19X) and 5.1.1 (Nexus 9 with 5.1.1 Build/LMY48T)

What steps will reproduce the problem?
(1) Enable --site-per-process
(2) Open any page with cross origin iframes (I'm using http://output.jsbin.com/yeyikamuvo/ as a test case)

What is the expected output?

The cross origin iframes are rendered.

What do you see instead?

The cross origin iframes are not rendered, leaving a blank frame there.

Please use labels and text to provide additional information.

 
Blocking: 594217
Owner: nasko@chromium.org
Status: Assigned (was: Untriaged)
I'm also seeing this during my regular browsing on many sites (e.g. theguardian.com, arstechnica, theverge...).

Comment 2 by creis@chromium.org, Jun 22 2016

Cc: nick@chromium.org creis@chromium.org nasko@chromium.org
Labels: Needs-Bisect
Owner: kenrb@chromium.org
Nasko's OOO.  We haven't been actively testing on Android, but Ken may have some thoughts.  Also adding Nick for TDI.

Did this work on an earlier version on this device, or was it always broken?  Does it work in --top-document-isolation?  (We've seen OOPIFs work on Android in the past, so maybe it's a regression?)
With --top-document-isolation the iframe is not rendered, either..

The same device was used for testing when TDI was being developed and it worked at that time, so it's a regression.

Comment 4 by kenrb@chromium.org, Jun 22 2016

Yes, this has been very much neglected. We are aware that there will be catch-up work to be done on Android before shipping TDI, see  bug 471850 .
Labels: -Needs-Bisect
It's probably not a regression then.

Now that we have FrameBlamer info in the trace, Xiaocheng and I were hoping to do some A/B trace analysis. And doing so on Android felt more exciting than desktop platforms.

Let us know if we should just try to do A/Bs on desktop platform in the meantime.

Comment 6 by creis@chromium.org, Jun 27 2016

Yes, doing tests on desktop probably makes sense for now.  Alternatively, I'm sure we'd love help getting it to work on Android.  :)

Comment 7 by creis@chromium.org, Jul 8 2016

Blocking: 471850
Cc: kenrb@chromium.org
Owner: wjmaclean@chromium.org
Cc: wjmaclean@chromium.org
Owner: lfg@chromium.org

Comment 10 by lfg@chromium.org, Sep 21 2016

Here's what I found:

The main cause of the bug is that RenderWidgetHostViewAndroid does not use unified begin frame, it implements its own BeginFrame in https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_widget_host_view_android.cc?l=1751.

enne@ suggested that the BeginFrameSource should go through DelegatedFrameHostAndroid, and there's a TODO to hook it up: https://cs.chromium.org/chromium/src/ui/android/delegated_frame_host_android.cc?l=231.

Also, even though DelegatedFrameHostAndroid is a SurfaceFactoryClient, it doesn't register itself in the SurfaceManager::RegisterSurfaceFactoryClient, so that would also need to be fixed.

Comment 11 by lfg@chromium.org, Sep 21 2016

I've also tried a hacky solution of forwarding BeginFrame from RenderWidgetHostViewAndroid through WebContentsImpl (patch attached), and that works, though it's not a good solution and we should get a proper fix.

patch.txt
3.0 KB View Download

Comment 12 by lfg@chromium.org, Sep 21 2016

Owner: enne@chromium.org
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 30 2016

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

commit a487a27cc88695723d102e43592b14a5958ad4e3
Author: enne <enne@chromium.org>
Date: Fri Sep 30 19:56:18 2016

Fix OOPIFs on Android

RenderWidgetHostViewAndroid / DelegatedFrameHostAndroid don't
participate correctly in unified begin frame.  They listen to
vsync messages from the window android themselves and then
send begin frames to the renderer.

This patch hooks up RWHVA into the surface client namespace hierarchy in
surface manager by registering its client id and its association with
the CompositorImpl's client id.  Because RenderWidgetHostViewChildFrame
attaches itself to the RWHVAndroid's client id, this allows child frames
to get the begin frame sources that they need to drive themselves.

In the future, RWHVAs will no longer be WindowAndroidObservers
and will instead get their begin frame source via the surface manager.
However, thorny issues around begin frame source pausing need to be
addressed first before this can be removed.  So, this patch is only
a halfway step to make sure that begin frames flow from
CompositorImpl -> RWHVAndroid -> RWHVChildFrame even if
RWHVAndroid ignores it and uses its own.

OOPIFs were broken when begin frame scheduling was turned on in
https://codereview.chromium.org/1939253002.  Because the child frames
weren't hooked up to the surface hierarchy, they never got a begin frame
source, never ticked, and thus never rendered at all.

BUG= 621835 

Review-Url: https://codereview.chromium.org/2369643002
Cr-Commit-Position: refs/heads/master@{#422193}

[modify] https://crrev.com/a487a27cc88695723d102e43592b14a5958ad4e3/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/a487a27cc88695723d102e43592b14a5958ad4e3/content/browser/renderer_host/compositor_impl_android.h
[modify] https://crrev.com/a487a27cc88695723d102e43592b14a5958ad4e3/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/a487a27cc88695723d102e43592b14a5958ad4e3/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/a487a27cc88695723d102e43592b14a5958ad4e3/ui/android/delegated_frame_host_android.h
[modify] https://crrev.com/a487a27cc88695723d102e43592b14a5958ad4e3/ui/android/window_android_compositor.h

Comment 14 by nick@chromium.org, Nov 14 2016

This is fixed, right?

Comment 15 by enne@chromium.org, Nov 14 2016

Labels: -OS-Android
Status: Fixed (was: Assigned)

Sign in to add a comment