mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Position absolute block-level boxes below previous siblings
Whether an absbox is positioned below or to the right of its previous sibling in an `InlineFormattingContext` is determined by the display-outside value before blockification, so we store the pre-blockification `display` value in `ComputedValues` to access it in `InlineFormattingContext` and position the box accordingly.
This commit is contained in:
parent
7867fef8d7
commit
5b1eba7ac8
Notes:
github-actions[bot]
2025-09-29 16:39:03 +00:00
Author: https://github.com/Pasi4K5 🔰
Commit: 5b1eba7ac8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6133
Reviewed-by: https://github.com/Calme1709
Reviewed-by: https://github.com/awesomekling
9 changed files with 67 additions and 4 deletions
|
|
@ -0,0 +1,21 @@
|
|||
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] children: not-inline
|
||||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 34 0+0+0] [BFC] children: not-inline
|
||||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 18 0+0+8] children: inline
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [8,8 27.15625x18] baseline: 13.796875
|
||||
"foo"
|
||||
TextNode <#text> (not painted)
|
||||
BlockContainer <div> at [8,26] positioned [0+0+0 27.640625 0+0+0] [0+0+0 18 0+0+0] [BFC] children: inline
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [8,26 27.640625x18] baseline: 13.796875
|
||||
"bar"
|
||||
TextNode <#text> (not painted)
|
||||
TextNode <#text> (not painted)
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x34]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x18]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,26 27.640625x18]
|
||||
TextPaintable (TextNode<#text>)
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x34] [children: 0] (z-index: auto)
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
foo <div style="position:absolute">bar</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue