Bug 307840

Summary: Remove duplicate margin handling for flex/grid items in layoutOverflowRectForPropagation()
Product: WebKit Reporter: fantasai <fantasai.bugs>
Component: New BugsAssignee: fantasai <fantasai.bugs>
Status: NEW    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 286472    
Bug Blocks: 292022    

fantasai
Reported 2026-02-13 12:40:04 PST
LayoutRect RenderBox::layoutOverflowRectForPropagation(const WritingMode parentWritingMode) const { ... // As per https://drafts.csswg.org/css-overflow-3/#scrollable, both flex and grid items margins' should contribute to the scrollable overflow area. if (shouldMarginInlineEndContributeToScrollableOverflow(*this)) { auto marginEnd = std::max(0_lu, this->marginEnd(parentWritingMode)); parentWritingMode.isHorizontal() ? rect.setWidth(rect.width() + marginEnd) : rect.setHeight(rect.height() + marginEnd); } This code is redundant with the contentArea handling added in https://bugs.webkit.org/show_bug.cgi?id=286472 and probably should be removed.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-02-13 12:40:11 PST
Note You need to log in before you can comment on or make changes to this bug.