-
Notifications
You must be signed in to change notification settings - Fork 711
[css-overflow-4] Should abspos painting in line-clamp depend only on whether the containing block is before clamp? #11962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I would have expected Ian's interpretation fwiw (so all the absposes in there getting painted), but agreed we didn't discuss that. |
I think it's the logical / consistent behavior given we decided that:
Should paint both absposes as well, tho. |
An additional issue with relying on the static-position is the fact that it creates inconsistency with something like: |
The CSS Working Group just discussed
The full IRC log of that discussion<TabAtkins> andreubotella: we previously resolved on abspos wrt compat behavior<TabAtkins> andreubotella: in #11379 <TabAtkins> andreubotella: we show all abspos whose CB is the line-calmp container or a predecessor <TabAtkins> andreubotella: we never resolved o nwhat to do for abspos whose CB is a descendant of the line-clamp container <TabAtkins> andreubotella: we'd discussed it, just never resolved <TabAtkins> andreubotella: when i was working on chrome impl, tests, and spec pr, i was trying to get as close to continue:discard as possible <TabAtkins> andreubotella: and in that, if the CB is in a discarded fragment, the abspos wouldn't show up <TabAtkins> andreubotella: so the behavior i'm ipmlementing is the abspos is hidden if its static position is below the clamp point <TabAtkins> andreubotella: but Ian had a differetn udnerstanding, that an abspos is hidden if and only if its CB is fully below the clamp <TabAtkins> andreubotella: that includes the previous resolution, and is also simpler to implement in chromium <florian> q+ <emilio> q+ <TabAtkins> andreubotella: it's less similar to continue:discard, but considering we're dealing with webcompat i think it makes sense <astearns> ack florian <TabAtkins> florian: making sure i understand <TabAtkins> florian: in both cases, we're talking only about abspos whose CB is a descendant of the clamp container <TabAtkins> florian: other cases are handled already <TabAtkins> florian: so q is if we hide the abpsos when its CB is after the clamp point, or static position is after <TabAtkins> florian: if CB is after the clamp point, its static position is necessarily after too <TabAtkins> florian: but reverse isn't necessarily true <astearns> ack emilio <TabAtkins> florian: CB might be (partially) above the clamp, but static posiition is after. that's the case, yeah? <TabAtkins> andreubotella: correct <TabAtkins> emilio: if the CB is another abspos that's already out of the question <TabAtkins> emilio: so this is only if the CB is in-flow <TabAtkins> emilio: if it's in-flow, proposal is that if the in-flow is completely clamped, you don't paint the abspos, otherwise you do <TabAtkins> emilio: that seems sensible to me <astearns> ack fantasai <iank_> q+ <TabAtkins> florian: so in andreu's initial, if the CB was partially in and partially out, but the staticpos was out, you suppress <TabAtkins> florian: but now if the CB is partialy in and partially out, you always paint the abspos <astearns> ack iank_ <TabAtkins> fantasai: yeah, don't thinkwe should depend on static position unless it's staically positioned <TabAtkins> iank_: i think we should indeed use this simple thing <TabAtkins> iank_: removing static position is trivial, shoudln't depend on it <TabAtkins> iank_: and anchorpos can depend on entirely differnt things, not caring about static poisition at all. shouldn't try and depend on that <astearns> ack fantasai <TabAtkins> fantasai: thinking about pagination, more interesting <TabAtkins> fantasai: if doing some regions things, abspos containing block on second page with an abspos that positioned itself really far up, impls struggly with that. can't move to a previous page very well, but can push to next page <TabAtkins> fantasai: so there's an inconsistency in pagination today. hope someday we can fix <iank_> thats not strictly true for chromium's implementation. <TabAtkins> fantasai: but for this case, i think it's reasonable to do a simpler appraoch - if something is discarded <TabAtkins> florian: i think i largely agree, but in pagaintion i'm not clear this behavior is wholely wrong <TabAtkins> florian: moving an abspos back to earlier pages when the CB is paginated should get right <TabAtkins> florian: but if the CB is an inline on a later page, less convicned it's worthwhile to move to an earlier page <TabAtkins> astearns: sounds like we ahve a resolution for this particular case <fantasai> I think drawing outside the fragmentation container is wrong <TabAtkins> andreubotella: proposed: an abspos is hidden if and only if its CB is fully after the clamp point <fantasai> TabAtkins: IIRC, we do have the geometry of everything after the clamp point? <fantasai> andreubotella: <fantasai> andreubotella: yep <fantasai> TabAtkins: So well-defined what the position of things is <fantasai> andreubotella: but I wouldn't be sure that's true for 'continue: discard' <TabAtkins> astearns: objections? <TabAtkins> RESOLVED: An abspos is hidden by line-clamp only if its CB is fully below the clamp point <TabAtkins> andreubotella: should this also apply to fixpos? <TabAtkins> iank_: yeah they're the same <TabAtkins> iank_: if there's a transformed ancestor, it's jsut a normal abspos |
In w3c/csswg-drafts#11962, the CSSWG resolved that abspos which are descendants of a line-clamp container must be hidden if and only if their containing block is fully after the clamp point. This is a significantly different behavior than the current implementation, and this CL updates it. As part of that, it reverts a large part of that code that deals with marking individual OOFs as hidden for paint, and instead marks a `ContainingBlockInfo` as such. This also implements a previous CSSWG resolution, that at w3c/csswg-drafts#11379, which fixed a web compat bug by saying that abspos whose containing block is the line-clamp container or an ancestor of it should always be shown. That previous resolution is a subset of the newer one, and so it doesn't need any additional implementation. This CL also rewrites most abspos tests, since they were written using the current implementation's behavior in mind, and adds similar tests for fixed positioning. Bug: 40336192, 393549029, 407973206 Change-Id: I199f1c9ef01aa1e532148e8ad3227ee1932e5b4c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396495 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: Andreu Botella <[email protected]> Cr-Commit-Position: refs/heads/main@{#1454384}
In w3c/csswg-drafts#11962, the CSSWG resolved that abspos which are descendants of a line-clamp container must be hidden if and only if their containing block is fully after the clamp point. This is a significantly different behavior than the current implementation, and this CL updates it. As part of that, it reverts a large part of that code that deals with marking individual OOFs as hidden for paint, and instead marks a `ContainingBlockInfo` as such. This also implements a previous CSSWG resolution, that at w3c/csswg-drafts#11379, which fixed a web compat bug by saying that abspos whose containing block is the line-clamp container or an ancestor of it should always be shown. That previous resolution is a subset of the newer one, and so it doesn't need any additional implementation. This CL also rewrites most abspos tests, since they were written using the current implementation's behavior in mind, and adds similar tests for fixed positioning. Bug: 40336192, 393549029, 407973206 Change-Id: I199f1c9ef01aa1e532148e8ad3227ee1932e5b4c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396495 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: Andreu Botella <[email protected]> Cr-Commit-Position: refs/heads/main@{#1454384}
In w3c/csswg-drafts#11962, the CSSWG resolved that abspos which are descendants of a line-clamp container must be hidden if and only if their containing block is fully after the clamp point. This is a significantly different behavior than the current implementation, and this CL updates it. As part of that, it reverts a large part of that code that deals with marking individual OOFs as hidden for paint, and instead marks a `ContainingBlockInfo` as such. This also implements a previous CSSWG resolution, that at w3c/csswg-drafts#11379, which fixed a web compat bug by saying that abspos whose containing block is the line-clamp container or an ancestor of it should always be shown. That previous resolution is a subset of the newer one, and so it doesn't need any additional implementation. This CL also rewrites most abspos tests, since they were written using the current implementation's behavior in mind, and adds similar tests for fixed positioning. Bug: 40336192, 393549029, 407973206 Change-Id: I199f1c9ef01aa1e532148e8ad3227ee1932e5b4c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6396495 Reviewed-by: Ian Kilpatrick <[email protected]> Commit-Queue: Andreu Botella <[email protected]> Cr-Commit-Position: refs/heads/main@{#1454384}
The |
When implementing #11379 in Chromium (https://crrev.com/c/6257576), it became clear from @bfgeek's reviews that he and I didn't share the same understanding of how abspos should behave when their containing block is a descendant of the line-clamp container, in the
continue: collapse
case:continue: collapse
(#7708) #10816, in the experimental Chromium implementation, and in the WPT tests I wrote while working on that implementation. I think it is also the behavior Firefox had before they rolled back not painting content after clamp as a result of the abspos compat issue.continue: collapse
issue.This affects cases such as the following, where the first abspos would always be painted, but second abspos would be hidden in my understanding and painted in Ian's:
I don't think we ever discussed this in the CSSWG (although I think we have discussed some of this in hallway conversations in TPAC or F2F's), and the only thing that came close to this in the various issues and PR's is that comment by @tabatkins about the painting of abspos depending on their containing block, and my WIP PR that has the other behavior. So we should resolve on something.
@emilio @frivoal @alanbaradlay
The text was updated successfully, but these errors were encountered: