Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 00055d9dab65a99dbe3407afad48d425d13e0a24
https://github.com/WebKit/WebKit/commit/00055d9dab65a99dbe3407afad48d425d13e0a24
Author: Sammy Gill <[email protected]>
Date: 2026-08-21 (Fri, 21 Aug 2026)
Changed paths:
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderBlockFlow.h
M Source/WebCore/rendering/RenderBlockFlowInlines.h
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBox.h
M Source/WebCore/rendering/RenderBoxInlines.h
M Source/WebCore/rendering/RenderObject.h
Log Message:
-----------
[margin-trim][cleanup] Move margin trimming machinery out of RenderBox
https://bugs.webkit.org/show_bug.cgi?id=255434
rdar://108030923
Reviewed by Alan Baradlay.
Now that margin-trim only applies to block containers, RenderBlockFlow is the
only renderer that can trim one of its children's margins. The
machinery for it does not need to sit on RenderBox anymore, where every other
layout system can see it.
To help cleanup the code a bit and make the responsibility clear we can
move most of the code that lives in RenderBox into RenderBlockFlow.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalWidth const):
(WebCore::RenderBox::computeOrTrimInlineMargin const): Deleted.
Instead of having a "compute or trim," function let's just replace it
with the code inline since it's really only used in one place.
Canonical link: https://commits.webkit.org/319637@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications