Files
rust_browser/tests/goldens/expected/149-float-right-with-block-children.layout.txt
Zachary D. Rowitsch 4d2b62f596 Fix three layout bugs: nobr inline display, block-in-inline split ordering, and BFC-only float avoidance
Three bugs caused Google's homepage to render incorrectly (elements at 0,0
or pushed off-screen):

1. <nobr> defaulted to display:block instead of inline, inflating float
   shrink-to-fit widths to the full viewport.

2. normalize_children ran before split_block_in_inline, wrapping inline
   elements in anonymous blocks before the splitter could find them.

3. Float avoidance applied to non-BFC blocks instead of BFC blocks
   (condition was inverted per CSS 2.1 §9.5).

Also implements CSS 2.1 Appendix E paint order: floats now paint after
normal flow block backgrounds via multi-phase rendering in the display
list builder. Positioned elements act as mini stacking contexts and
don't propagate skip_floats to their children.

Net result: +10 WPT tests passing (11 promoted, 1 minor regression).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 09:04:44 -05:00

116 lines
5.6 KiB
Plaintext

LayoutBox node=#1 tag=html box=block
content: (0, 0, 800, 106.96001)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#9 tag=body box=block
content: (8, 8, 784, 86.4)
padding: 0 0 0 0
border: 0 0 0 0
margin: 8 8 8 8
LayoutBox node=#10 tag=(anonymous-block) box=block
content: (8, 8, 784, 0)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 0 lines, height=0, max_width=0
LayoutBox node=#10 tag=anonymous box=anon
content: (0, 0, 3.0543318, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: " "
LayoutBox node=#11 tag=aside box=block
content: (540.8, 9, 235.20001, 96.96001)
padding: 0 15 0 15
border: 1 1 1 1
margin: 0 0 0 15
LayoutBox node=#13 tag=h4 box=block
content: (540.8, 30.28, 235.20001, 19.200003)
padding: 0 0 0 0
border: 0 0 0 0
margin: 21.28 0 21.28 0
inline_context: 1 lines, height=19.200003, max_width=87.953
line[0]: rect=(540.8, 30.28, 87.953, 19.2) fragments=4
frag[0]: rect=(540.8, 30.28, 23.823788, 16) text="This" start=false end=false
frag[1]: rect=(567.6781, 30.28, 9.409692, 16) text="is" start=false end=false
frag[2]: rect=(580.14215, 30.28, 14.672541, 16) text="an" start=false end=false
frag[3]: rect=(597.869, 30.28, 30.883995, 16) text="aside" start=false end=false
LayoutBox node=#14 tag=anonymous box=anon
content: (501.8, 0, 87.95301, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "This is an aside"
LayoutBox node=#16 tag=p box=block
content: (540.8, 70.76, 235.20001, 19.200005)
padding: 0 0 0 0
border: 0 0 0 0
margin: 16 0 16 0
inline_context: 1 lines, height=19.200005, max_width=107.00734
line[0]: rect=(540.8, 70.76, 107.00734, 19.2) fragments=3
frag[0]: rect=(540.8, 70.76, 30.014685, 16) text="Aside" start=false end=false
frag[1]: rect=(573.869, 70.76, 42.372982, 16) text="content" start=false end=false
frag[2]: rect=(619.2963, 70.76, 28.511015, 16) text="here." start=false end=false
LayoutBox node=#17 tag=anonymous box=anon
content: (501.8, 0, 107.00733, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Aside content here."
LayoutBox node=#19 tag=anonymous box=anon
content: (0, 0, 3.0543318, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: " "
LayoutBox node=#20 tag=p box=block
content: (8, 24, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 16 0 16 0
inline_context: 1 lines, height=19.2, max_width=405.79138
line[0]: rect=(8, 24, 405.79138, 19.2) fragments=13
frag[0]: rect=(8, 24, 27.535978, 16) text="Main" start=false end=false
frag[1]: rect=(38.590313, 24, 42.372982, 16) text="content" start=false end=false
frag[2]: rect=(84.017624, 24, 22.331863, 16) text="that" start=false end=false
frag[3]: rect=(109.40382, 24, 29.039646, 16) text="flows" start=false end=false
frag[4]: rect=(141.4978, 24, 40.293686, 16) text="around" start=false end=false
frag[5]: rect=(184.84583, 24, 18.126286, 16) text="the" start=false end=false
frag[6]: rect=(206.02644, 24, 38.860497, 16) text="floated" start=false end=false
frag[7]: rect=(247.94127, 24, 29.098385, 16) text="aside" start=false end=false
frag[8]: rect=(280.09396, 24, 45.392067, 16) text="element" start=false end=false
frag[9]: rect=(328.54034, 24, 14.367107, 16) text="on" start=false end=false
frag[10]: rect=(345.96176, 24, 18.126286, 16) text="the" start=false end=false
frag[11]: rect=(367.14236, 24, 17.938326, 16) text="left" start=false end=false
frag[12]: rect=(388.135, 24, 25.656387, 16) text="side." start=false end=false
LayoutBox node=#21 tag=anonymous box=anon
content: (0, 0, 405.79138, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Main content that fl..."
LayoutBox node=#23 tag=p box=block
content: (8, 59.2, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 16 0 16 0
inline_context: 1 lines, height=19.2, max_width=389.14536
line[0]: rect=(8, 59.2, 389.14536, 19.2) fragments=10
frag[0]: rect=(8, 59.2, 40.305435, 16) text="Second" start=false end=false
frag[1]: rect=(51.359768, 59.2, 58.408222, 16) text="paragraph" start=false end=false
frag[2]: rect=(112.82232, 59.2, 11.148312, 16) text="of" start=false end=false
frag[3]: rect=(127.024956, 59.2, 27.864904, 16) text="main" start=false end=false
frag[4]: rect=(157.9442, 59.2, 42.372982, 16) text="content" start=false end=false
frag[5]: rect=(203.37152, 59.2, 54.049923, 16) text="continues" start=false end=false
frag[6]: rect=(260.47577, 59.2, 40.928047, 16) text="flowing" start=false end=false
frag[7]: rect=(304.45813, 59.2, 40.293686, 16) text="around" start=false end=false
frag[8]: rect=(347.80615, 59.2, 18.126286, 16) text="the" start=false end=false
frag[9]: rect=(368.98676, 59.2, 28.158588, 16) text="float." start=false end=false
LayoutBox node=#24 tag=anonymous box=anon
content: (0, 0, 389.1454, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Second paragraph of ..."