Bug 253454

Summary: Web Inspector: Box model should indicate that a margin has been "trimmed" by its containing block's `margin-trim` property
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   
Bug Depends on: 253606, 253610, 253712, 253713, 253714, 253715, 253716, 253717, 253718, 253719, 255736    
Bug Blocks:    

Description Sammy Gill 2023-03-06 12:08:51 PST
Web Inspector currently does not take into account the rendered box for showing the element’s box model, but with `margin-trim`, the computed margins may no longer be the same as the used margins, as they might be trimmed by the parent container. We should provide some sort of treatment to indicate this - we should also think a bit more deeply about how to do so, since we currently allow editing margins in the box model, but now that edit may not visually affect anything if that margin was trimmed.

Without this work, the box model may show a margin for an edge of an element where no margin was applied at layout time. Not a horrible regression, but odd.
Comment 1 Sammy Gill 2023-03-06 12:09:31 PST
I think the solution for this will be to update the margin computed value when we do any trimming
Comment 2 Sammy Gill 2023-03-06 12:09:50 PST
rdar://103374677
Comment 3 Brent Fulgham 2023-04-26 16:01:54 PDT
All subtasks are now complete.