Closed Bug 1184248 Opened 9 years ago Closed 6 years ago

Change CSS 'contain: paint' to use 'overflow: clip', not 'overflow: -moz-hidden-unscrollable'.

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: zentner.kyle, Unassigned)

References

()

Details

We do not currently implement 'overflow: clip' (which might be renamed to 'overflow: hidden-unscrollable').

The only difference between 'overflow: clip' and 'overflow: -moz-hidden-unscrollable' is that 'overflow: clip' establishes a block formatting context.

Since 'contain: paint' establishes a formatting context anyways, the behavior resulting from using '-moz-hidden-unscrollable' should be almost exactly the same. However, this still results in the computed style being incorrect. Furthermore, there are minor differences between a BFC and an FC.
I would love to work on this if I could get some more information, specifically which parts of the source code need to be changed here. Do all these (below) simply need to be changed, and what is the relationship with contain: paint?

https://dxr.mozilla.org/mozilla-central/search?q=%22overflow%3A+-moz-hidden-unscrollable%22&redirect=false&case=false
Flags: needinfo?(dholbert)
Thanks for the interest, Muhsin! This is a placeholder bug about adjusting our "contain: paint" implementation, which has not yet landed. (bug 1170781)  The mostly-ready-to-land patches over there are coded to an older spec version, and this bug is about updating the implementation to react to a spec change.

So, there's not yet code in the tree that needs fixing. (But there will be once bug 1170781 has landed.)

After that lands, I think the idea here would be to:
 (a) introduce a new value for "overflow", called "clip", which behaves similarly to -moz-hidden-unscrollable but has differences that Kyle noted in comment 0.  It might co-opt some of our soon-to-land "contain:paint" code, not sure.

 (b) Convert our for "contain:paint" to simply force "overflow" to take on this value, rather than having its own custom code, as described in the updated containment spec draft: https://drafts.csswg.org/css-containment/#containment-paint
Flags: needinfo?(dholbert)
Can I get this bug assigned to me? I would like to work on it.
I only just noticed that this is flagged as a mentored bug, with me as the mentor (which is how people ended up finding it in comment 1 and comment 3).

I don't actually have cycles to help mentor this at the moment, beyond the high-level overview in comment 2, and I'm not actually sure this is a good starter-bug (so, not necessarily a good mentored bug).  It's probably best for Kyle or another layout hacker to take this bug or to mentor it.

Anup, you may want to take a different bug -- sorry for the confusion about having this bug on the mentored-bug list.
Mentor: dholbert
Fwiw, it looks like the CSSWG opted not to have 'contain' affect the value of 'overflow' here. Reasoning should be in the Sydney F2F minutes.
Yeah, this is INVALID now, per comment 5.  See bug 1465250 where we're doing what the spec ended up saying instead.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.