Scrolling an iframe inside a `preserve-3d` element causes a slow repaint

NEW
Unassigned

Status

()

Core
Layout
3 years ago
a year ago

People

(Reporter: cvan, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox41 affected)

Details

Attachments

(3 attachments)

(Reporter)

Description

3 years ago
Created attachment 8617069 [details]
parent – scrolling test case

# Problem

Scrolling an iframe inside a `preserve-3d` parent makes the the iframe disappear for 5+ seconds while a repaint occurs (even though "preserve-3d is NOT inherited").


# Steps to reproduce

1. Create a parent document with an iframe placed inside an element that has a style set of `transform-style: preserve-3d`.
2. Load the page in fullscreen + VR mode.
3. Notice how long it takes for the iframe to load (even when the document is served locally).
4. Scroll the iframe (either by directly manipulating `document.document.scrollTop` or `window.scrollTo` on the iframe's `contentWindow` or via JS that gets called from within the iframe).
5. Notice it takes at least 5 seconds for the iframe's document to be updated (the content actually disappears, but the iframe container remains).

(I tried using the Dev Tools' profiler, but surprisingly nothing stood out.)


# Test cases

with an `<iframe>`: https://cvan.io/css-vr-slow-iframe-scrolling-tests/
with a `<div>`: https://cvan.io/css-vr-slow-iframe-scrolling-tests/div.html
(Reporter)

Comment 1

3 years ago
Created attachment 8617071 [details]
child – scrolling test case
(Reporter)

Comment 2

3 years ago
Created attachment 8617072 [details]
div – scrolling test case
This seems painfully slow; we do disable a bunch of clipping and partial updates that we'd normally do while scrolling, but we should investigate what's actually being painted here.

Updated

2 years ago
Whiteboard: [webvr] [horizon] → [webvr] [horizon][css-vr]
Webvr is no longer dependent on this, but this is still affecting non-webvr sites.
Whiteboard: [webvr] [horizon][css-vr]
You need to log in before you can comment on or make changes to this bug.