Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repaint remote frames when new layer is set #23930

Merged
merged 1 commit into from Jun 4, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jun 3, 2020

Remote frames in CAP can end up incorrectly sized 0,0 on initial render
which makes the iframes content not show up. The initial
RenderFrameProxy::SynchronizeVisualProperties can come in before the
RemoteFrameView has updated its compositing rect, which leaves the
created SurfaceLayer with a 0,0 size.

The RemoteFrameView compositing rect is only updated after Paint in the
document lifecycle (see LocalFrameView::UpdateLifecyclePhasesInternal)
and RenderFrameProxy::SynchronizeVisualProperties is called during
intersection observer steps (also after paint). Since the synchronized
properties have changed, a new SurfaceLayer is created at the correct
size. When setting this SurfaceLayer on RemoteFrame, the existing
invalidation of SetNeedsCompositingUpdate is not sufficient in CAP to
have a new frame generated with the updated layer.

In pre-CAP, this is not an issue - the oopif content appears with the
first frame produced due to the ContentsLayer size update via
CompositedLayerMapping::UpdateContentsRect in the compositing phase of
the document lifecycle.

To fix this for CAP, we add a SetNeedsPaint on the frame owner
element's paint layer, and schedule another frame to ensure this gets
picked up, since these updates typically will come in outside of the
document lifecycle.

R=pdr@chromium.org

Bug: 1078255
Change-Id: I7333a79b3cfbca303fe388bea6d7df176b0e1f41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2227897
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Daniel Libby <dlibby@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#774868}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2227897 branch 4 times, most recently from 78a3d16 to 1205417 Compare June 3, 2020 21:19
Remote frames in CAP can end up incorrectly sized 0,0 on initial render
which makes the iframes content not show up. The initial
RenderFrameProxy::SynchronizeVisualProperties can come in before the
RemoteFrameView has updated its compositing rect, which leaves the
created SurfaceLayer with a 0,0 size.

The RemoteFrameView compositing rect is only updated after Paint in the
document lifecycle (see LocalFrameView::UpdateLifecyclePhasesInternal)
and RenderFrameProxy::SynchronizeVisualProperties is called during
intersection observer steps (also after paint). Since the synchronized
properties have changed, a new SurfaceLayer is created at the correct
size. When setting this SurfaceLayer on RemoteFrame, the existing
invalidation of SetNeedsCompositingUpdate is not sufficient in CAP to
have a new frame generated with the updated layer.

In pre-CAP, this is not an issue - the oopif content appears with the
first frame produced due to the ContentsLayer size update via
CompositedLayerMapping::UpdateContentsRect in the compositing phase of
the document lifecycle.

To fix this for CAP, we add a SetNeedsPaint on the frame owner
element's paint layer, and schedule another frame to ensure this gets
picked up, since these updates typically will come in outside of the
document lifecycle.

R=pdr@chromium.org

Bug: 1078255
Change-Id: I7333a79b3cfbca303fe388bea6d7df176b0e1f41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2227897
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Daniel Libby <dlibby@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#774868}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants