Blend modes pretty broken on WR-android
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
People
(Reporter: kats, Assigned: kats)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
Load attached file (which is just layout/reftests/css-blending/blend-canvas.html
) on Android with and without WebRender. There should be a black square inside the green square, but with WR it's just all green. This is specific to the combination of WR enabled and apz.allow_zooming=true (which is default on Android). It doesn't get caught in reftests in automation, because Android reftests run with allow_zooming=false (see bug 1650080). It turned up in failures when I tried to enable allow_zooming on desktop.
Initial inspection of the display list shows the BlendContainer is outside the AsyncZoom which is probably undesirable, although I'm not 100% sure that's the problem.
Assignee | ||
Comment 1•5 years ago
|
||
Forcing a stacking context for the zoomable scrollframe seems to fix this issue. I'm going to check the other similar-looking reftest failures to see if there's any other problems.
Assignee | ||
Comment 2•5 years ago
|
||
Forcing the stacking context seems to fix all the blend-mode reftests, but it causes an assertion failure on the fixed-pos-scrolled-clip-2 testcase, because it tries to put the FixedPosition display item inside the stacking context, and that triggers an "infinite clip bounds" assertion failure. I think either the nsDisplayContainer needs to have the same ASR as the async zoom item or (more likely) the fixed-pos item needs to be outside the nsDisplayContainer. Not sure how to do that, but I'll poke around.
Assignee | ||
Comment 3•5 years ago
•
|
||
I might be barking up the wrong tree here, need some help from people who know this display list stuff better.
Here's what the original display list looks like (what you should get from ./mach reftest --enable-webrender --setpref apz.allow_zooming=true layout/reftests/css-blending/blend-canvas.html
). Note the BlendContainer is outside the AsyncZoom, which breaks blending for WR. So question 1: should this be fixed inside WR, or does it make sense to instead force the AsyncZoom to also create a new stacking context?
[2020-07-02T16:55:28Z WARN webrender::scene_building] found a mix-blend-mode outside a blend container, ignoring
Painting --- before optimization (dirty 0,0,48000,60000):
SolidColor p=0x7f80fa77fb70 f=0x7f80fa7b5020(Viewport(-1)) key=52 bounds(0,0,48000,60000) layerBounds(0,0,48000,60000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr() clipChain() uniform ref=0x7f80fa7b5020 agr=0x7f80fa7b5020 (opaque 0,0,48000,60000) (rgba 255,255,255,255)
BlendContainer p=0x7f80fa77fa28 f=0x7f80fa7b5020(Viewport(-1)) key=7 bounds(0,0,48000,60000) layerBounds(0,0,48000,60000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr() clipChain() ref=0x7f80fa7b5020 agr=0x7f80fa7b5020
CompositorHitTestInfo p=0x7f80fa77f548 f=0x7f80fa7b51a8(HTMLScroll(html)(-1)) key=26 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr() clipChain() ref=0x7f80fa7b5020 agr=0x7f80fa7b5020 hitTestInfo(0x1) hitTestArea(0,0,48000,60000)
AsyncZoom p=0x7f80fa77f848 f=0x7f80fa7b51a8(HTMLScroll(html)(-1)) key=2 bounds(0,0,48000,60000) layerBounds(0,0,48000,60000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr() clipChain(0x7f80fa77f200 <0,0,48000,60000> [root asr]) ref=0x7f80fa7b5020 agr=0x7f80fa7b5020 (flags 0x0) (scrolltarget 0)
CompositorHitTestInfo p=0x7f80fa77f248 f=0x7f80fa7b50c8(Canvas(html)(-1)) key=282 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr(<0x7f80fa7b5248>) clipChain(0x7f80fa77f200 <0,0,48000,60000> [root asr]) ref=0x7f80fa7b5020 agr=0x7f80fa7b50c8 hitTestInfo(0x1) hitTestArea(0,0,48000,60000)
CompositorHitTestInfo p=0x7f80fa77f110 f=0x7f80fa7b50c8(Canvas(html)(-1)) key=26 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr(<0x7f80fa7b5248>) clipChain(0x7f80fa77f338 <0,0,48000,60000> [0x7f80fa7b5248], 0x7f80fa77f200 <0,0,48000,60000> [root asr]) ref=0x7f80fa7b5020 agr=0x7f80fa7b50c8 hitTestInfo(0x1) hitTestArea(0,0,48000,60000)
CanvasBackgroundColor p=0x7f80fa77f380 f=0x7f80fa7b50c8(Canvas(html)(-1)) key=17 bounds(0,0,48000,60000) layerBounds(0,0,48000,60000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr(<0x7f80fa7b5248>) clipChain(0x7f80fa77f338 <0,0,48000,60000> [0x7f80fa7b5248], 0x7f80fa77f200 <0,0,48000,60000> [root asr]) uniform ref=0x7f80fa7b5020 agr=0x7f80fa7b50c8 (rgba 0,0,0,0)
BackgroundColor p=0x7f80fa77f448 f=0x7f80fa7b5ca0(Block(div)(0) id:a) key=6 bounds(480,480,12000,12000) layerBounds(480,480,12000,12000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr(<0x7f80fa7b5248>) clipChain(0x7f80fa77f338 <0,0,48000,60000> [0x7f80fa7b5248], 0x7f80fa77f200 <0,0,48000,60000> [root asr]) uniform ref=0x7f80fa7b5020 agr=0x7f80fa7b50c8 (opaque 480,480,12000,12000) (rgba 0,1,0,1) backgroundRect(480,480,12000,12000)
BlendMode p=0x7f80fa77f700 f=0x7f80fa7b5d68(HTMLCanvas(canvas)(1) id:b) key=8 bounds(480,480,6000,6000) layerBounds(480,480,6000,6000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr(<0x7f80fa7b5248>) clipChain(0x7f80fa77f200 <0,0,48000,60000> [root asr]) ref=0x7f80fa7b5020 agr=0x7f80fa7b50c8
CompositorHitTestInfo p=0x7f80fa77f020 f=0x7f80fa7b5d68(HTMLCanvas(canvas)(1) id:b) key=26 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr(<0x7f80fa7b5248>) clipChain(0x7f80fa77f338 <0,0,48000,60000> [0x7f80fa7b5248], 0x7f80fa77f200 <0,0,48000,60000> [root asr]) ref=0x7f80fa7b5020 agr=0x7f80fa7b50c8 hitTestInfo(0x1) hitTestArea(480,480,6000,6000)
nsDisplayCanvas p=0x7f80fa77f638 f=0x7f80fa7b5d68(HTMLCanvas(canvas)(1) id:b) key=16 bounds(480,480,6000,6000) layerBounds(480,480,6000,6000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr(<0x7f80fa7b5248>) clipChain(0x7f80fa77f338 <0,0,48000,60000> [0x7f80fa7b5248], 0x7f80fa77f200 <0,0,48000,60000> [root asr]) ref=0x7f80fa7b5020 agr=0x7f80fa7b50c8
If I add a ForceStackingContext
flag to this call that moves the BlendContainer inside the AsyncZoom and the test passes. But then on the fixed-pos-scrolled-clip-2.html
test case I get this display list:
SolidColor p=0x7ff39afc7868 f=0x7ff399e8d020(Viewport(-1)) key=52 bounds(0,0,48000,60000) layerBounds(0,0,48000,60000) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr() clipChain() uniform ref=0x7ff399e8d020 agr=0x7ff399e8d020 (opaque 0,0,48000,60000) (rgba 255,255,255,255) layer=0x7ff399e95000
CompositorHitTestInfo p=0x7ff39afc4020 f=0x7ff399e8d1a8(HTMLScroll(html)(-1)) key=26 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr() clipChain() ref=0x7ff399e8d020 agr=0x7ff399e8d020 hitTestInfo(0x1) hitTestArea(0,0,48000,60000)
OwnLayer p=0x7ff39afc4920 f=0x7ff399e8d6f0(ScrollbarFrame(scrollbar)(-1)) key=811 bounds(47400,0,600,60000) layerBounds(47400,0,600,60000) visible(47400,0,600,60000) building(47400,0,600,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr() clipChain(0x7ff39afc4110 <0,0,48000,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d020 (flags 0x0) (scrolltarget 3) layer=0x7ff399e93400
nsDisplayContainer p=0x7ff39afc4828 f=0x7ff399e8d6f0(ScrollbarFrame(scrollbar)(-1)) key=27 bounds(47400,0,600,60000) layerBounds(47400,0,600,60000) visible(47400,0,600,60000) building(47400,0,600,60000) componentAlpha(0,0,0,0) clip() asr() clipChain() ref=0x7ff399e8d020 agr=0x7ff399e8d020
CompositorHitTestInfo p=0x7ff39afc4738 f=0x7ff399e8d6f0(ScrollbarFrame(scrollbar)(-1)) key=26 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(47400,0,600,60000) building(47400,0,600,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr() clipChain(0x7ff39afc4110 <0,0,48000,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d020 hitTestInfo(0x501) hitTestArea(47400,0,600,60000)
ThemedBackground p=0x7ff39afc4158 f=0x7ff399e8d6f0(ScrollbarFrame(scrollbar)(-1)) key=71 bounds(47400,0,600,60000) layerBounds(47400,0,600,60000) visible(47400,0,600,60000) building(47400,0,600,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr() clipChain(0x7ff39afc4110 <0,0,48000,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d020 (themed, appearance:56) layer=0x7ff399e94400
ThemedBackground p=0x7ff39afc4248 f=0x7ff399e8d808(SliderFrame(slider)(-1)) key=71 bounds(47400,0,600,60000) layerBounds(47400,0,600,60000) visible(47400,0,600,60000) building(47400,0,600,60000) componentAlpha(0,0,0,0) clip(0,0,48000,60000) asr() clipChain(0x7ff39afc4110 <0,0,48000,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d020 (themed, appearance:64) layer=0x7ff399e94400
OwnLayer p=0x7ff39afc4560 f=0x7ff399e8d808(SliderFrame(slider)(-1)) key=1067 bounds(47400,0,600,13320) layerBounds(0,0,600,13320) visible(47400,0,600,13320) building(47400,0,600,13320) componentAlpha(0,0,0,0) clip(47400,0,600,60000) asr() clipChain(0x7ff39afc4428 <47400,0,600,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d910 (flags 0x0) (scrolltarget 3) layer=0x7ff399e93800
CompositorHitTestInfo p=0x7ff39afc4338 f=0x7ff399e8d910(ButtonBoxFrame(thumb)(0)) key=26 bounds(0,0,0,0) layerBounds(-47400,0,0,0) visible(47400,0,600,13320) building(47400,0,600,13320) componentAlpha(0,0,0,0) clip(47400,0,600,60000) asr() clipChain(0x7ff39afc4428 <47400,0,600,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d910 hitTestInfo(0x701) hitTestArea(47400,0,600,13320)
ThemedBackground p=0x7ff39afc4470 f=0x7ff399e8d910(ButtonBoxFrame(thumb)(0)) key=71 bounds(47400,0,600,13320) layerBounds(0,0,600,13320) visible(47400,0,600,13320) building(47400,0,600,13320) componentAlpha(0,0,0,0) clip(47400,0,600,60000) asr() clipChain(0x7ff39afc4428 <47400,0,600,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d910 (themed, appearance:62) layer=0x7ff399e93c00
AsyncZoom p=0x7ff39afc6050 f=0x7ff399e8d1a8(HTMLScroll(html)(-1)) key=2 bounds(0,0,47400,60000) layerBounds(0,0,47400,60000) visible(0,0,48000,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip(0,0,47400,60000) asr() clipChain(0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d020 (flags 0x0) (scrolltarget 0) layer=0x7ff399e94800
CompositorHitTestInfo p=0x7ff39afc4ab0 f=0x7ff399e8d0c8(Canvas(html)(-1)) key=282 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,60000) building(0,0,48000,60000) componentAlpha(0,0,0,0) clip() asr(<0x7ff399e8d248>) clipChain(0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d0c8 hitTestInfo(0x1) hitTestArea(0,0,47400,258000)
nsDisplayContainer p=0x7ff39afc5f58 f=0x7ff399e8d0c8(Canvas(html)(-1)) key=27 bounds(0,0,47400,120000) layerBounds(0,0,47400,120000) visible(0,0,48000,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip() asr(<0x7ff399e8d248>) clipChain() ref=0x7ff399e8d020 agr=0x7ff399e8d0c8
CompositorHitTestInfo p=0x7ff39afc5e20 f=0x7ff399e8d0c8(Canvas(html)(-1)) key=26 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip(0,0,47400,120000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4ba0 <0,0,47400,120000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d0c8 hitTestInfo(0x1) hitTestArea(0,0,47400,258000)
CanvasBackgroundColor p=0x7ff39afc4be8 f=0x7ff399e8d0c8(Canvas(html)(-1)) key=17 bounds(0,0,47400,258000) layerBounds(0,0,47400,258000) visible(0,0,47400,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip(0,0,47400,120000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4ba0 <0,0,47400,120000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) uniform ref=0x7ff399e8d020 agr=0x7ff399e8d0c8 (opaque 0,0,47400,258000) (rgba 255,255,255,255) layer=0x7ff399e96400
WrapList p=0x7ff39afc5478 f=0x7ff399e8e1e8(ScrollbarFrame(scrollbar)(-1)) key=330 bounds(23400,18000,600,24000) layerBounds(23400,18000,600,24000) visible(0,0,48000,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip(0,0,47400,120000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4ba0 <0,0,47400,120000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d0c8
nsDisplayContainer p=0x7ff39afc5380 f=0x7ff399e8e1e8(ScrollbarFrame(scrollbar)(-1)) key=27 bounds(23400,18000,600,24000) layerBounds(23400,18000,600,24000) visible(0,0,48000,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip() asr(<0x7ff399e8d248>) clipChain() ref=0x7ff399e8d020 agr=0x7ff399e8d0c8
CompositorHitTestInfo p=0x7ff39afc5290 f=0x7ff399e8e1e8(ScrollbarFrame(scrollbar)(-1)) key=26 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,48000,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip(0,0,47400,120000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4ba0 <0,0,47400,120000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d0c8 hitTestInfo(0x509) hitTestArea(23400,18000,600,24000)
ThemedBackground p=0x7ff39afc4cb0 f=0x7ff399e8e1e8(ScrollbarFrame(scrollbar)(-1)) key=71 bounds(23400,18000,600,24000) layerBounds(23400,18000,600,24000) visible(23400,18000,600,24000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip(0,0,47400,120000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4ba0 <0,0,47400,120000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d0c8 (themed, appearance:56) layer=0x7ff399e96400
ThemedBackground p=0x7ff39afc4da0 f=0x7ff399e8e300(SliderFrame(slider)(-1)) key=71 bounds(23400,18000,600,24000) layerBounds(23400,18000,600,24000) visible(23400,18000,600,24000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip(0,0,47400,120000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4ba0 <0,0,47400,120000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8d0c8 (themed, appearance:64) layer=0x7ff399e96400
OwnLayer p=0x7ff39afc50b8 f=0x7ff399e8e300(SliderFrame(slider)(-1)) key=1067 bounds(23400,18000,600,11100) layerBounds(0,0,600,11100) visible(23400,18000,600,11100) building(23400,18000,600,11100) componentAlpha(0,0,0,0) clip(23400,18000,600,24000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc5248 <23400,18000,600,24000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8e408 (flags 0x0) (scrolltarget 4) layer=0x7ff399e94c00
CompositorHitTestInfo p=0x7ff39afc4e90 f=0x7ff399e8e408(ButtonBoxFrame(thumb)(0)) key=26 bounds(0,0,0,0) layerBounds(-23400,-18000,0,0) visible(23400,18000,600,11100) building(23400,18000,600,11100) componentAlpha(0,0,0,0) clip(23400,18000,600,24000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4f80 <23400,18000,600,24000> [0x7ff399e8d248]) ref=0x7ff399e8d020 agr=0x7ff399e8e408 hitTestInfo(0x709) hitTestArea(23400,18000,600,11100)
ThemedBackground p=0x7ff39afc4fc8 f=0x7ff399e8e408(ButtonBoxFrame(thumb)(0)) key=71 bounds(23400,18000,600,11100) layerBounds(0,0,600,11100) visible(23400,18000,600,11100) building(23400,18000,600,11100) componentAlpha(0,0,0,0) clip(23400,18000,600,24000) asr(<0x7ff399e8d248>) clipChain(0x7ff39afc4f80 <23400,18000,600,24000> [0x7ff399e8d248]) ref=0x7ff399e8d020 agr=0x7ff399e8e408 (themed, appearance:62) layer=0x7ff399e94000
CompositorHitTestInfo p=0x7ff39afc55c0 f=0x7ff399e8e5b8(Block(div)(0) class:subframe) key=282 bounds(0,0,0,0) layerBounds(0,-18000,0,0) visible(0,0,48000,120000) building(0,0,48000,120000) componentAlpha(0,0,0,0) clip() asr(<0x7ff399e8dd40>, <0x7ff399e8d248>) clipChain(0x7ff39afc56b0 <0,18000,23400,24000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8e5b8 hitTestInfo(0x1) hitTestArea(0,18000,23400,48000)
CompositorHitTestInfo p=0x7ff39afc56f8 f=0x7ff399e8e5b8(Block(div)(0) class:subframe) key=26 bounds(0,0,0,0) layerBounds(0,-18000,0,0) visible(0,18000,24000,48000) building(0,18000,24000,48000) componentAlpha(0,0,0,0) clip(0,18000,23400,48000) asr(<0x7ff399e8dd40>, <0x7ff399e8d248>) clipChain(0x7ff39afc57e8 <0,18000,23400,48000> [0x7ff399e8dd40], 0x7ff39afc56b0 <0,18000,23400,24000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8e5b8 hitTestInfo(0x1) hitTestArea(0,18000,23400,48000)
BackgroundColor p=0x7ff39afc58c0 f=0x7ff399e8e748(Block(div)(1) class:absoluteClip) key=6 bounds(6000,18000,12000,12000) layerBounds(6000,0,12000,12000) visible(6000,18000,12000,12000) building(6000,18000,12000,12000) componentAlpha(0,0,0,0) clip(6000,18000,12000,12000) asr(<0x7ff399e8dd40>, <0x7ff399e8d248>) clipChain(0x7ff39afc59c0 <6000,18000,12000,12000> [0x7ff399e8dd40], 0x7ff39afc56b0 <0,18000,23400,24000> [0x7ff399e8d248], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) uniform ref=0x7ff399e8d020 agr=0x7ff399e8e5b8 (opaque 6000,18000,12000,12000) (rgba 1,0,0,1) backgroundRect(6000,18000,12000,12000) layer=0x7ff399e95c00
FixedPosition p=0x7ff39afc5c78 f=0x7ff399e8e890(Block(div)(1) class:fixed) key=31 bounds(0,0,47400,60000) layerBounds(0,0,47400,60000) visible(0,0,47400,60000) building(0,0,47400,60000) componentAlpha(0,0,0,0) clip(0,0,47400,60000) asr() clipChain(0x7ff39afc5c30 <6000,18000,12000,12000> [0x7ff399e8dd40], 0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8e890 hitTestInfo(0x1) hitTestArea(0,0,47400,60000) (containerASR <0x7ff399e8dd40>, <0x7ff399e8d248>) (scrolltarget 3) layer=0x7ff399e95400
BackgroundColor p=0x7ff39afc5a08 f=0x7ff399e8e890(Block(div)(1) class:fixed) key=6 bounds(0,0,47400,60000) layerBounds(0,0,47400,60000) visible(0,0,47400,60000) building(0,0,47400,60000) componentAlpha(0,0,0,0) clip() asr() clipChain() uniform ref=0x7ff399e8d020 agr=0x7ff399e8e890 (opaque 0,0,47400,60000) (rgba 0,0,0,1) backgroundRect(0,0,47400,60000) layer=0x7ff399e95800
Background p=0x7ff39afc5b08 f=0x7ff399e8e890(Block(div)(1) class:fixed) key=5 bounds(0,6000,47400,12000) layerBounds(0,6000,47400,12000) visible(0,6000,47400,12000) building(0,0,47400,60000) componentAlpha(0,0,0,0) clip(0,0,47400,60000) asr() clipChain(0x7ff39afc46f0 <0,0,47400,60000> [root asr]) ref=0x7ff399e8d020 agr=0x7ff399e8e890 (opaque 0,6000,47400,12000) layer=0x7ff399e95800
which causes an assertion failure because the clip for the FixedPosition 0x7ff39afc5c78
item is not finite. It is inside the nsDisplayContainer 0x7ff39afc5f58
item which has a different ASR. I think the right thing to do here is to move this FixedPosition
item outside the nsDisplayContainer
, but I'm not sure how to do that. I presume that if there were a blend mode somewhere on this testcase, the nsDisplayContainer
would instead be a BlendContainer
and having the FixedPosition
item outside it should be ok because you shouldn't be able to blend fixed-pos items with non-fixed-pos items. Or maybe CSS is just crazy and you can?
Anyhow, suggestions welcome while I keep poking around.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
No, I think it's fine if the nsDisplayContainer
wraps the FixedPosition, but the nsDisplayContainer's ASR should be the root ASR, not the scrolled ASR. I'm not sure how the nsDisplayContainer
ends up with the scrolled ASR as the wrapListASR. The wrapListASR should be coming from the containerASRTracker which should ultimately yield the root ASR because it contains a fixed element.
However, I think forcing a stacking context here might be a bit heavy-weight. The AsyncZoomContainer wrapping was supposed to handle all the parts of BuildDisplayListForStackingContext which are actually needed, without running the full thing. Up to now, I was thinking that the only needed part was the nsDisplayListSet flattening, but now it turns out that blend container wrapping is needed, too.
Unfortunately I don't remember why I thought BuildDisplayListForStackingContext was too heavy-weight.
Assignee | ||
Comment 5•5 years ago
|
||
Thanks! I'll try adding the blend container wrapping inside the AsyncZoom container wrapping then. If that doesn't work out I can try looking into why the ASR is wrong.
Clearing needinfo on matt for now.
Assignee | ||
Comment 6•5 years ago
|
||
If there are mix-blend-mode items inside the async zoom container, the
BlendContainer can end up outside the async zoom container, at the top-level
stacking context. But this causes the blend mode to fail with WebRender.
Instead, if we are creating an async zoom container, we check to see if there
was a mix-blend-mode inside it, and create the blend container just inside
the async zoom container.
Updated•5 years ago
|
Comment 8•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Actually given where we are in the beta cycle and the medium-ish risk level of this patch I'm not going to request uplift.
Description
•