Add parent-first-child top and parent-last-child bottom margin collapsing using a two-level approach (Level A shifts child inside parent, Level B adjusts grandparent for effective collapsed margin). Fix pre-existing bug in shift_subtree_x that incorrectly skipped absolute/fixed children. Extract shared MARGIN_EPSILON constant, add 9 unit tests and 4 golden tests (209-212), promote 31 WPT tests to pass. Includes code review fixes: pub(crate) visibility for is_root_element, known-limitation docs, and inline-content shift test coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
24 lines
1.8 KiB
Plaintext
24 lines
1.8 KiB
Plaintext
DisplayList items=22
|
|
Text rect=(8, 17.6, 20.417034, 16) text="The" color=#ff0000 font_size=16
|
|
Text rect=(31.471367, 17.6, 21.791481, 16) text="first" color=#ff0000 font_size=16
|
|
Text rect=(56.31718, 17.6, 19.947138, 16) text="line" color=#ff0000 font_size=16
|
|
Text rect=(79.31865, 17.6, 11.148312, 16) text="of" color=#ff0000 font_size=16
|
|
Text rect=(93.52129, 17.6, 20.15859, 16) text="this" color=#ff0000 font_size=16
|
|
Text rect=(116.734215, 17.6, 58.408222, 16) text="paragraph" color=#ff0000 font_size=16
|
|
Text rect=(8, 36.800003, 37.509544, 16) text="should" color=#000000 font_size=16
|
|
Text rect=(48.563877, 36.800003, 13.85022, 16) text="be" color=#000000 font_size=16
|
|
Text rect=(65.46843, 36.800003, 21.85022, 16) text="red." color=#000000 font_size=16
|
|
Text rect=(90.37298, 36.800003, 20.417034, 16) text="The" color=#000000 font_size=16
|
|
Text rect=(113.84434, 36.800003, 21.345081, 16) text="rest" color=#000000 font_size=16
|
|
Text rect=(138.24376, 36.800003, 11.148312, 16) text="of" color=#000000 font_size=16
|
|
Text rect=(152.44641, 36.800003, 18.126286, 16) text="the" color=#000000 font_size=16
|
|
Text rect=(173.62703, 36.800003, 21.321585, 16) text="text" color=#000000 font_size=16
|
|
Text rect=(8, 56, 37.509544, 16) text="should" color=#000000 font_size=16
|
|
Text rect=(48.563877, 56, 13.85022, 16) text="be" color=#000000 font_size=16
|
|
Text rect=(65.46843, 56, 18.126286, 16) text="the" color=#000000 font_size=16
|
|
Text rect=(86.64904, 56, 39.013214, 16) text="default" color=#000000 font_size=16
|
|
Text rect=(128.71658, 56, 27.735683, 16) text="color" color=#000000 font_size=16
|
|
Text rect=(159.5066, 56, 32.42291, 16) text="which" color=#000000 font_size=16
|
|
Text rect=(194.98386, 56, 8.657856, 16) text="is" color=#000000 font_size=16
|
|
Text rect=(8, 75.200005, 31.906021, 16) text="black." color=#000000 font_size=16
|