Bug 255736

Summary: [margin-trim][block layout] self-collapsing children at block-end don't have nested content trimmed
Product: WebKit Reporter: Sammy Gill <sgill26>
Component: Layout and RenderingAssignee: Sammy Gill <sgill26>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/39674
Bug Depends on: 253610    
Bug Blocks: 253454    

Sammy Gill
Reported 2023-04-20 10:52:45 PDT
If you have a block structure that is something similar to the following: <container> <item style="margin-bottom: 10px"></item> <item style="margin-bottom: 10px; height: 0px;"> <item style="margin-bottom: 10px; height: 0px;"> <item style="margin-bottom: 10px; height: 0px;"> <item style="margin-bottom: 10px; height: 0px;"></item> <item style="margin-bottom: 10px; height: 0px;"></item> </item> </item> </item> </container> We currently trim the last child, which is self collapsing, and its margins correctly, but none of the children nested within it are trimmed. Since these are at the block-end and we trim the margins that are collapsed through for the container, none of the inner margins end up participating in margin collapsing with the container's margin and renderings look correct. However, with the tests added as a part of 253610 we can actually see that these margins are not trimmed by looking at the computed style values.
Attachments
Radar WebKit Bug Importer
Comment 1 2023-04-20 10:53:51 PDT
Sammy Gill
Comment 2 2023-04-20 11:10:57 PDT
Sammy Gill
Comment 3 2023-04-24 20:52:48 PDT
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/39674
EWS
Comment 4 2023-04-26 15:36:20 PDT
Committed 263439@main (809b95bb1a78): <https://commits.webkit.org/263439@main> Reviewed commits have been landed. Closing PR #12982 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.