mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:07:46 +00:00
LibWeb: Allow block level boxes to be floated and have clearance
Before, we completely ignored clearance for block-level boxes if they were floated. This was incorrect because it is valid for a block-level box to be floated and still have clearance. However, unlike clearance on normal flow boxes, clearance on floating boxes does not affect the y-position of subsequent normal flow boxes. Instead, it pushes the box's position to the very beginning of an edge. Work towards https://github.com/SerenityOS/serenity/issues/21023
This commit is contained in:
parent
9240233378
commit
81ddad3fcf
3 changed files with 72 additions and 2 deletions
|
@ -0,0 +1,34 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x976 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 600x960 children: not-inline
|
||||
BlockContainer <div.normal> at (18,18) content-size 300x300 children: not-inline
|
||||
BlockContainer <div#top> at (8,328) content-size 100x100 floating [BFC] children: inline
|
||||
line 0 width: 26.640625, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [8,328 26.640625x17.46875]
|
||||
"top"
|
||||
TextNode <#text>
|
||||
BlockContainer <div#left> at (8,428) content-size 100x100 floating [BFC] children: inline
|
||||
line 0 width: 26.25, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 4, rect: [8,428 26.25x17.46875]
|
||||
"left"
|
||||
TextNode <#text>
|
||||
BlockContainer <div#right> at (108,428) content-size 100x100 floating [BFC] children: inline
|
||||
line 0 width: 37.109375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
|
||||
frag 0 from TextNode start: 0, length: 5, rect: [108,428 37.109375x17.46875]
|
||||
"right"
|
||||
TextNode <#text>
|
||||
BlockContainer <div.normal> at (18,338) content-size 300x300 children: not-inline
|
||||
BlockContainer <div.normal> at (18,658) content-size 300x300 children: not-inline
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x976]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x976]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 600x960]
|
||||
PaintableWithLines (BlockContainer<DIV>.normal) [8,8 320x320]
|
||||
PaintableWithLines (BlockContainer<DIV>#top) [8,328 100x100]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>#left) [8,428 100x100]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>#right) [108,428 100x100]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>.normal) [8,328 320x320]
|
||||
PaintableWithLines (BlockContainer<DIV>.normal) [8,648 320x320]
|
Loading…
Add table
Add a link
Reference in a new issue