View transition capture doesn't work if inside a nested transform.
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox141 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
(Whiteboard: [viewtransitions:m2], [wptsync upstream])
Attachments
(3 files)
See the attached reduced test-case. Removing the transform: scale(0.99) makes the test-case work (expected rendering is pink background with "Some text" in black).
I don't see anything going terribly wrong on the layout / display list side. Nical, can you take a look at the webrender side and see if there's anything off?
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•1 year ago
|
||
I tried fairly hard to get a reproduction of the issue using wrench to narrow things down and ease debugging, but (invertible) transforms work nicely in this environment.
It turns out that when running this this test (in Firefox), WebRender does render the snapshot for the text element, but no subsequent display list contains the image key associated with that snapshot. I do see that we are also producing snapshots for the live capture in the following frames but there are also no image display item referring to them.
So I suspect that during DL building, we don't produce the display item for the pseudo element(s) in some situations involving transforms.
Comment 2•1 year ago
|
||
Unassigning myself for now since this is on the displaylist side and I have some WebRender items to look at.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 3•1 year ago
|
||
This "fixes" it:
diff --git a/dom/view-transitions/ViewTransition.cpp b/dom/view-transitions/ViewTransition.cpp
index ea38f7c53caf..ec40c4f450d6 100644
--- a/dom/view-transitions/ViewTransition.cpp
+++ b/dom/view-transitions/ViewTransition.cpp
// TODO(emilio): This might need revision.
static CSSToCSSMatrix4x4Flagged EffectiveTransform(nsIFrame* aFrame) {
CSSToCSSMatrix4x4Flagged matrix;
- if (aFrame->GetSize().IsEmpty() || aFrame->Style()->IsRootElementStyle()) {
+ if (aFrame->GetSize().IsEmpty() || aFrame->Style()->IsRootElementStyle() || (true)) {
return matrix;
}
So interestingly it's not an ancestor transform of the captured element what causes the issue, but an ancestor transform of the element that displays it.
| Assignee | ||
Comment 4•1 year ago
|
||
Display list with that change is:
FixedPosition p=0x7f04cb7111a0 f=0x7f04cb70e120(Block(div)(-1)) key=25 bounds(0,0,76800,57330) componentAlpha(0,0,0,0) clip() asr() clipChain() (opaque 0,0,76800,57330) (will-change=-moz-fixed-pos-containing-block) reuse-state(None) (containerASR ) (scrolltarget 3)
nsDisplayContainer p=0x7f04cb70f6c0 f=0x7f04cb70e370(Block(div)(0)) key=20 bounds(0,0,76800,57330) componentAlpha(0,0,0,0) clip() asr() clipChain() (opaque 0,0,76800,57330) reuse-state(None)
BackgroundColor p=0x7f04cb710510 f=0x7f04cb70e370(Block(div)(0)) key=6 bounds(0,0,76800,57330) componentAlpha(0,0,0,0) clip() asr() clipChain() uniform (opaque 0,0,76800,57330) hitTestInfo(0x1) hitTestArea(0,0,76800,57330) reuse-state(None) (rgba 1,0.752941,0.796079,1) backgroundRect(x=0, y=0, w=76800, h=57330)
nsDisplayTransform p=0x7f04cb710fc8 f=0x7f04cb70e4b8(Block(div)(0)) key=67 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None)[ I ] prerender(full) childrenBuildingRect(x=0, y=0, w=76800, h=1440)
CompositorHitTestInfo p=0x7f04cb7105d8 f=0x7f04cb70e4b8(Block(div)(0)) key=19 bounds(0,0,0,0) componentAlpha(0,0,0,0) clip() asr() clipChain() hitTestInfo(0x1) hitTestArea(0,0,76800,1320) reuse-state(None)
BlendContainer p=0x7f04cb710e98 f=0x7f04cb70e600(Block(div)(0)) key=7 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None)
CompositorHitTestInfo p=0x7f04cb710678 f=0x7f04cb70e600(Block(div)(0)) key=19 bounds(0,0,0,0) componentAlpha(0,0,0,0) clip() asr() clipChain() hitTestInfo(0x1) hitTestArea(0,0,76800,1320) reuse-state(None)
BlendMode p=0x7f04cb710990 f=0x7f04cb70e748(ImageFrame(div)(0)) key=8 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None)
Opacity p=0x7f04cb710858 f=0x7f04cb70e748(ImageFrame(div)(0)) key=37 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None) (opacity 1, mChildOpacityState: Unknown)
CompositorHitTestInfo p=0x7f04cb710718 f=0x7f04cb70e748(ImageFrame(div)(0)) key=19 bounds(0,0,0,0) componentAlpha(0,0,0,0) clip() asr() clipChain() hitTestInfo(0x1) hitTestArea(0,0,76800,1320) reuse-state(None)
Image p=0x7f04cb7107b8 f=0x7f04cb70e748(ImageFrame(div)(0)) key=32 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None)
BlendMode p=0x7f04cb710d38 f=0x7f04cb70e8d0(ImageFrame(div)(1)) key=8 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None)
Opacity p=0x7f04cb710c00 f=0x7f04cb70e8d0(ImageFrame(div)(1)) key=37 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None) (opacity 0, mChildOpacityState: Unknown)
CompositorHitTestInfo p=0x7f04cb710ac0 f=0x7f04cb70e8d0(ImageFrame(div)(1)) key=19 bounds(0,0,0,0) componentAlpha(0,0,0,0) clip() asr() clipChain() hitTestInfo(0x1) hitTestArea(0,0,76800,1320) reuse-state(None)
Image p=0x7f04cb710b60 f=0x7f04cb70e8d0(ImageFrame(div)(1)) key=32 bounds(0,0,76800,1320) componentAlpha(0,0,0,0) clip() asr() clipChain() reuse-state(None)
If that matrix becomes anything that isn't identity, then stuff blows up.
| Assignee | ||
Comment 5•1 year ago
|
||
Fun one... I'll add a trivial reftest if nothing starts passing as a
result of this.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 6•1 year ago
|
||
We need to compensate with the centered origin that the transform will
get.
Updated•1 year ago
|
Comment 9•1 year ago
|
||
| bugherder | ||
Comment 10•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•