Hi, I'm currently working on ::backdrop pseudo-element, which is part of the Fullscreen API [1], and is the last non-trivial part I plan to fix before unprefixing that API.
::backdrop is a pseudo-element which presents right below every fullscreen element (precisely, every top layer element) for covering everything else below. The pseudo-element as well as the fullscreen element both have out-of-flow frames. Except several special cases, a frame of a pseudo-element is a child of a frame of its originating element. However, ::backdrop cannot be implemented that way, becasue any element can go fullscreen, which means the frame of the fullscreen element can be video, image, or iframe. Those frame are not container frame, and thus cannot be a parent frame. bz suggested that we could probably create an anonymous node in canvas frame, and put the placeholder of ::backdrop as a child of the canvas frame. The main difficulty of this solution is that, we would need quite a bit of hack in the element restyler. Also we may need to manage several raw pointers between them to allow efficient access, which could complicate the lifetime management. dbaron suggested we may be able to remove the constraint that only nsContainerFrame can be a parent frame, and if that's possible, we can handle it like other normal pseudo-elements. But it seems to me removing that restriction is non-trivial, because several places (especially in text frame and bidi pres utils) assume parents have principal child list. I still have no clear idea how can I implement this pseudo-element. Any suggestion? [1] https://fullscreen.spec.whatwg.org/#::backdrop-pseudo-element - Xidorn _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

