Open Bug 1147539 Opened 9 years ago Updated 2 years ago

Unnecessary event regions for from XUL window being placed on top of content area

Categories

(Core :: Layout, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

(Keywords: correctness)

Attachments

(1 file)

Attached file simple page
With APZ and event regions turned on on Mac, opening the attached testcase in a small window with minimal chrome gives me this display list:

> SolidColor p=0x12ecceda0 f=0x1236c2530(Viewport(-1)) bounds(0,0,13020,13080) layerBounds(0,0,13020,13080) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip()  uniform (opaque 0,0,13020,13080) (rgba 238,238,238,255) layer=0x12b39f000
> LayerEventRegions p=0x11b67a820 f=0x1236c2530(Viewport(-1)) bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip()  (hitRegion < (x=0, y=0, w=13020, h=13080); >)
> Border p=0x11b67a8b0 f=0x1236c3458(DocElementBox(window)(-1)) bounds(0,0,13020,60) layerBounds(0,0,13020,60) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip()  layer=0x12b39f000
> ThemedBackground p=0x11eae3b38 f=0x12a4f2850(Box(toolbox)(0)) bounds(0,60,13020,0) layerBounds(0,60,13020,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (themed, appearance:11) layer=0x12b39f000
> BackgroundColor p=0x12d2b9a00 f=0x12a54b1d0(Box(tabbrowser)(1)) bounds(0,60,13020,13020) layerBounds(0,60,13020,13020) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  uniform (opaque 0,60,13020,13020) (rgba 1,1,1,1) layer=0x12b39f000
> LayerEventRegions p=0x12d2b9a90 f=0x12a5ec350(FrameOuter(browser src=)(0)) bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (hitRegion < (x=0, y=60, w=13020, h=13020); >)
> SubDocument p=0x12eccec20 f=0x12c33f4a0(Viewport(-1)) bounds(0,60,13020,13020) layerBounds(0,60,13020,13020) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (opaque 0,60,13020,13020) layer=0x12ecc8000
>   LayerEventRegions p=0x12d2b9b20 f=0x12c33f4a0(Viewport(-1)) bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip()  (hitRegion < (x=0, y=60, w=13020, h=13020); >)
>   LayerEventRegions p=0x12d2c2020 f=0x12c340050(Canvas(html)(-1)) bounds(0,0,0,0) layerBounds(0,-60,0,0) visible(0,60,13020,13020) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (hitRegion < (x=0, y=60, w=13020, h=13020); >)
>   CanvasBackgroundColor p=0x12d2c20d0 f=0x12c340050(Canvas(html)(-1)) bounds(0,60,13020,13020) layerBounds(0,0,13020,13020) visible(0,60,13020,13020) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  uniform (opaque 0,60,13020,13020) (rgba 255,255,255,255) layer=0x12ecc9400
>   nsDisplayTransform p=0x12d2c2238 f=0x12cb68c20(Block(div)(0)) bounds(480,540,12000,12000) layerBounds(480,480,12000,12000) visible(480,540,12000,12000) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (will-change=transform)[ 1 0; 0 1; 16 18; ] layer=0x12ecc8400
>     LayerEventRegions p=0x12d2c2118 f=0x12cb68c20(Block(div)(0)) bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,12000,12000) componentAlpha(0,0,0,0) clip()  (will-change=transform) (hitRegion < (x=0, y=0, w=12000, h=12000); >)
>     BackgroundColor p=0x12d2c21a8 f=0x12cb68c20(Block(div)(0)) bounds(0,0,12000,12000) layerBounds(0,0,12000,12000) visible(0,0,12000,12000) componentAlpha(0,0,0,0) clip(0,0,12000,12000)  uniform (opaque 0,0,12000,12000) (will-change=transform) (rgba 1,0,0,1) layer=0x12ecc8800
> LayerEventRegions p=0x12d2b9820 f=0x12a5d3460(Box(_moz_generated_content_after)(-1)) z=2 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020) 
> Background p=0x12d2b98b0 f=0x12a5d3460(Box(_moz_generated_content_after)(-1)) z=2 bounds(0,-60,13020,120) layerBounds(0,-60,13020,120) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,0)  layer=0x12b39f000
> LayerEventRegions p=0x11b67a918 f=0x12a4ed680(Box(hbox)(44)) z=5 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (hitRegion < (x=0, y=60, w=960, h=960); >)
> LayerEventRegions p=0x11b67a9a8 f=0x12a4edcb0(Box(vbox)(0)) bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (hitRegion < (x=0, y=60, w=960, h=960); >)
> LayerEventRegions p=0x11eae3820 f=0x12a4edd50(Box(hbox)(45)) z=5 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (hitRegion < (x=960, y=60, w=2040, h=60); (x=960, y=120, w=960, h=1020); >)
> LayerEventRegions p=0x11eae39e8 f=0x12a4ee6e8(Box(vbox)(1)) z=-1 bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (hitRegion < (x=1920, y=60, w=1080, h=1080); >)
> LayerEventRegions p=0x11eae38b0 f=0x12a4ee648(Box(vbox)(0)) bounds(0,0,0,0) layerBounds(0,0,0,0) visible(0,0,13020,13080) componentAlpha(0,0,0,0) clip(0,60,13020,13020)  (hitRegion < (x=960, y=60, w=960, h=960); >)

All the LayerEventRegions on the bottom (i.e. after the SubDocument contents) seem unnecessary and wrong, most of them come from elements inside the XUL window's <popupset>. The first LayerEventRegions inside the SubDocument display list also looks unnecessary: its animated geometry root is the XUL root frame, so it's getting its own empty PaintedLayer inside the Subdocument ContainerLayer. These two things are probably separate bugs.

Here's the layer tree:

> ClientLayerManager (0x1278da500)
>   ClientContainerLayer (0x12b39c800) [visible=< (x=0, y=0, w=434, h=436); >] [opaqueContent] [metrics0={ [cb=(x=0.000000, y=0.000000, w=434.000000, h=436.000000)] [sr=(x=0.000000, y=0.000000, w=217.000000, h=218.000000)] [s=(0,0)] [dp=(x=0.000000, y=0.000000, w=217.000000, h=218.000000)] [cdp=(x=0.000000, y=0.000000, w=0.000000, h=0.000000)] [color=rgba(0, 0, 0, 0)] [scrollId=82]
>     ClientTiledPaintedLayer (0x12b39f000) [bounds=(x=0, y=-2, w=434, h=438)] [visible=< (x=0, y=0, w=434, h=2); >] { hitregion=< (x=0, y=0, w=434, h=436); >} [opaqueContent] [valid=< (x=0, y=0, w=434, h=2); >]
>       TiledContentClient (0x12401aa40)
>     ClientContainerLayer (0x12ecc8000) [clip=(x=0, y=2, w=434, h=434)] [visible=< (x=0, y=2, w=434, h=434); >] [opaqueContent]
>       ClientTiledPaintedLayer (0x13032d800) [not visible] { hitregion=< (x=0, y=2, w=434, h=434); >} [opaqueContent]
>       ClientTiledPaintedLayer (0x12ecc9400) [clip=(x=0, y=2, w=0, h=0)] [transform=[ 1 0; 0 1; 0 2; ]] [not visible]
>       ClientColorLayer (0x12ecc9800) [clip=(x=0, y=2, w=434, h=434)] [transform=[ 1 0; 0 1; 0 2; ]] [bounds=(x=0, y=0, w=434, h=434)] [visible=< (x=0, y=0, w=434, h=434); >] { hitregion=< (x=0, y=0, w=434, h=434); >} [opaqueContent] [color=rgba(255, 255, 255, 1)]
>       ClientContainerLayer (0x12ecc8400) [clip=(x=0, y=2, w=434, h=434)] [transform=[ 1 0; 0 1; 16 18; ]] [visible=< (x=0, y=0, w=400, h=400); >]
>         ClientTiledPaintedLayer (0x12ecc8800) [clip=(x=0, y=0, w=0, h=0)] [not visible]
>         ClientColorLayer (0x12ecc8c00) [bounds=(x=0, y=0, w=400, h=400)] [visible=< (x=0, y=0, w=400, h=400); >] { hitregion=< (x=0, y=0, w=400, h=400); >} [opaqueContent] [color=rgba(255, 0, 0, 1)]
>     ClientTiledPaintedLayer (0x13032e000) [not visible] { hitregion=< (x=0, y=2, w=100, h=32); (x=32, y=34, w=68, h=4); >} [opaqueContent]

The PaintedLayers 0x13032d800 and 0x13032e000 are getting recreated on each frame due to bug 1147538.
The window I tested with can be opened from the Browser Console (Cmd+Shift+J, with devtools.chrome.enabled=true) using
> open("https://bugzilla.mozilla.org/attachment.cgi?id=8583255", "", "width=230,height=230,resizable")
(In reply to Markus Stange [:mstange] from comment #0)
> The first LayerEventRegions inside the
> SubDocument display list also looks unnecessary: its animated geometry root
> is the XUL root frame, so it's getting its own empty PaintedLayer inside the
> Subdocument ContainerLayer. These two things are probably separate bugs.

I believe this part was fixed in bug 1172310. The other thing (items inside popupset causing spurious event regions to be created) is still an issue, although I don't think it generates separate layers any more.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: