Bug 255434 - [margin-trim] RenderBox should not be performing trimming
Summary: [margin-trim] RenderBox should not be performing trimming
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-13 21:18 PDT by Sammy Gill
Modified: 2023-04-13 21:19 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sammy Gill 2023-04-13 21:18:57 PDT
RenderBox performs some trimming inside of constrainBlockMarginInAvailableSpaceOrTrim and computeOrTrimInlineMargin as the renderer goes through layout. This has some unfortunate side effects, such as requiring us to set the rare data bits to indicate the margin has been trimmed at the same location. This action requires a const_cast that could be avoided since trimming should not occur at the RenderBox level and should be occurring completely in the layout system it is in (flex, grid, or block). We should make sure that the trimming logic is contained wholly within each layout system and should remove this logic from RenderBox once it is
Comment 1 Radar WebKit Bug Importer 2023-04-13 21:19:14 PDT
<rdar://problem/108030923>