Skip to content

Commit 3dff788

Browse files
committed
Document that list markers survive container relocation without help
A third audit pass raised a plausible concern: does PropagateContainerRelocation's raw Location reassignment leave a list-item's marker stale, the way it would without CssBox.OffsetTop's explicit marker handling? Investigated empirically with a diagnostic test (with and without an explicit marker shift) - no difference. CreateListItemBox recomputes the marker's position from its owner's current Location unconditionally on every PerformLayoutImp call, and every ancestor this method climbs is still mid-PerformLayoutImp when it runs, so the marker always re-derives correctly afterward. Recorded as an investigated non-issue rather than adding redundant handling.
1 parent 2015821 commit 3dff788

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎Source/HtmlRenderer/Core/Fragmentation/BlockFragmentation.cs‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,18 @@ private static List<CssBox> CollectPrecedingKeepWithNextRun(CssBox box)
294294
/// (<paramref name="movedBox"/> has already been repositioned; shifting it again would double-count
295295
/// it) and never a relayout.
296296
/// </remarks>
297+
/// <remarks>
298+
/// A third audit pass raised a plausible-sounding concern worth recording as a non-issue: does a
299+
/// list-item marker (<see cref="CssBox.ListItemBox"/>) go stale here the way it would after a raw
300+
/// <see cref="CssBox.Location"/> change elsewhere? No - confirmed empirically (a diagnostic test
301+
/// showed identical marker positions with and without an explicit marker shift added here).
302+
/// <c>CssBox.CreateListItemBox</c> recomputes the marker's position from its owner's CURRENT
303+
/// <c>Location</c> unconditionally on every <c>PerformLayoutImp</c> call (not only once, at
304+
/// creation) - and every ancestor this method climbs is, by construction, still mid-<c>PerformLayoutImp</c>
305+
/// when it runs (this method is only ever called from deep within that same call's own child-loop
306+
/// or line-breaking step), so <c>CreateListItemBox</c> always re-fires afterward with the
307+
/// already-corrected <c>Location</c>. No explicit marker handling needed here.
308+
/// </remarks>
297309
internal static void PropagateContainerRelocation(CssBox movedBox, double delta)
298310
{
299311
if (delta == 0)

0 commit comments

Comments
 (0)