Re: [w3c/uievents] Standardize layerX/layerY on MouseEvent (#135)

> In Gecko, we use the closest abspos containing block or scrolling box (and per [webcompat/web-bugs#94500](https://github.com/webcompat/web-bugs/issues/94500) we should add outer `<svg>` as well I guess).

In Chromium, the definition is "whatever causes a layout object to have a PaintLayer" (see [here](https://source.chromium.org/search?q=layertyperequired) - all cases where kNoPaintLayer is not returned). Webkit is probably almost the same.

Several of those (including `<svg>` elements) are there because `PaintLayer` was a required part of the old compositing system (that system is now gone as of Chromium 96). Various of these cases are instances of what we call the "fundamental compositing bug". We have not yet fixed that bug, since we decided to decouple it from CompositeAfterPaint, but plan to fix it soon.

Once that bug is fixed, the Chromium behavior will be that `layerX` and `layerY` refer to the "containing element which is a stacking context, is positioned, or paints in the positioned phase of the paint spec (see w3c/csswg-drafts#2717). That definition seems pretty good, and simpler/more consistent than "abspos containing or scrolling box". @emilio WDYT? Will that definition work for you?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/135#issuecomment-991162056

Received on Friday, 10 December 2021 17:34:27 UTC