Open Bug 1972694 Opened 18 hours ago Updated 8 hours ago

Wrong isolation / grouping behavior for preserve3d transforms.

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

People

(Reporter: emilio, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [viewtransitions:triage])

Attachments

(2 files)

Attached file test-case.

I was debugging bug 1966246, and I think the root cause is a bit deeper. See test-case.

Per spec (https://drafts.csswg.org/css-transforms-2/#grouping-property-values), isolation (and a couple other things) should cause grouping.

Our code for this is rather straight-forward, but it doesn't seem to be working right:

But the rendering still is totally off. DevTools claims the right position, so there's a mismatch between WebRender and display lists... Maybe here?

It's not even preserve-3d, it's anything that causes us to "remain" transformed, with perspective. An identity transform with transform-style: flat should cause flattening but doesn't.

I suspect this is in WebRender, given "old" painting (e.g. a screenshot) shows the right rendering, and this has been basically broken since we turned WR by default. It also doesn't have to be an identity transform, e.g. transform: scale(1.1) shows the same rendering difference.

Glenn, do you happen to know off-hand where the bug might lay? There are quite a few suspicious places, but nothing I've tried quite hits the right spot. Any known issues in this area that might help?

Flags: needinfo?(gwatson)

Nothing off the top of my head, this will require some detailed debugging of the test case in WR.

Flags: needinfo?(gwatson)

Maybe wr is extending he 3d transform/context of the perspective further than it should? In the second testcase, it should only do it to the first transform descendant and then stop because the preserve3d flag is not set. But looks like it keeps going to include the transform grandchild.

Whiteboard: [viewtransitions:triage]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: