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




4 years ago
2 years ago


(Reporter: cvan, Unassigned)



Firefox Tracking Flags

(firefox41 affected)



(3 attachments)

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>`:
with a `<div>`:
Created attachment 8617071 [details]
child – scrolling test case
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.


3 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.