mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
Previously, has_scrollable_overflow was a purely geometric check, true whenever content extended beyond the padding box regardless of the overflow property. This caused unnecessary scroll frame allocation for boxes with `overflow:visible`. Per CSS Overflow 3, scrollable overflow is only defined for scroll containers (overflow: auto/hidden/scroll). Gate the flag on `is_scroll_container()` so that only actual scroll containers get scroll frames assigned.
61 lines
4.4 KiB
Plaintext
61 lines
4.4 KiB
Plaintext
Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline
|
||
BlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 260 0+0+0] [BFC] children: not-inline
|
||
BlockContainer <body> at [8,8] [8+0+0 784 0+0+8] [8+0+0 244 0+0+8] children: not-inline
|
||
BlockContainer <div.outer> at [34,34] [0+1+25 400 25+1+332] [0+1+25 70 25+1+0] [BFC] children: not-inline
|
||
BlockContainer <div.inner> at [35,35] [0+1+0 400 0+1+-2] [0+1+0 100 0+1+0] children: inline
|
||
frag 0 from TextNode start: 0, length: 47, rect: [35,35 382.296875x18] baseline: 13.796875
|
||
"This should be scrollable vertically because of"
|
||
frag 1 from TextNode start: 48, length: 12, rect: [35,53 93.4375x18] baseline: 13.796875
|
||
"the padding."
|
||
TextNode <#text> (not painted)
|
||
InlineNode <span> at [35,35] [0+0+0 0 0+0+0] [0+0+0 18 0+0+0]
|
||
BlockContainer <(anonymous)> at [8,130] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||
TextNode <#text> (not painted)
|
||
BlockContainer <div.outer> at [34,156] [0+1+25 400 25+1+332] [0+1+25 70 25+1+0] [BFC] children: not-inline
|
||
BlockContainer <div.inner> at [35,157] [0+1+0 400 0+1+-2] [0+1+0 100 0+1+0] children: inline
|
||
frag 0 from TextNode start: 0, length: 46, rect: [35,157 373.796875x18] baseline: 13.796875
|
||
"This padding represents, within the scrollable"
|
||
frag 1 from TextNode start: 47, length: 44, rect: [35,175 370.875x18] baseline: 13.796875
|
||
"overflow rectangle, the box’s own padding so"
|
||
frag 2 from TextNode start: 92, length: 45, rect: [35,193 366.578125x18] baseline: 13.796875
|
||
"that when its content is scrolled to the end,"
|
||
frag 3 from TextNode start: 138, length: 44, rect: [35,211 359.828125x18] baseline: 13.796875
|
||
"there is padding between the end-edge of its"
|
||
frag 4 from TextNode start: 183, length: 48, rect: [35,229 391.71875x18] baseline: 13.796875
|
||
"in-flow (or floated) content and the border edge"
|
||
frag 5 from TextNode start: 232, length: 50, rect: [35,247 395.328125x18] baseline: 13.796875
|
||
"of the box. It typically ends up being exactly the"
|
||
frag 6 from TextNode start: 283, length: 47, rect: [35,265 399.1875x18] baseline: 13.796875
|
||
"same size as the box’s own padding, except in a"
|
||
frag 7 from TextNode start: 331, length: 37, rect: [35,283 320.640625x18] baseline: 13.796875
|
||
"few cases—such as when an out-of-flow"
|
||
frag 8 from TextNode start: 369, length: 48, rect: [35,301 389.421875x18] baseline: 13.796875
|
||
"positioned element, or the visible overflow of a"
|
||
frag 9 from TextNode start: 418, length: 45, rect: [35,319 371.28125x18] baseline: 13.796875
|
||
"descendent, has already increased the size of"
|
||
frag 10 from TextNode start: 464, length: 45, rect: [35,337 366x18] baseline: 13.796875
|
||
"the scrollable overflow rectangle outside the"
|
||
frag 11 from TextNode start: 510, length: 39, rect: [35,355 319.109375x18] baseline: 13.796875
|
||
"conceptual “content edge” of the scroll"
|
||
frag 12 from TextNode start: 550, length: 20, rect: [35,373 165.21875x18] baseline: 13.796875
|
||
"container’s content."
|
||
TextNode <#text> (not painted)
|
||
BlockContainer <(anonymous)> at [8,252] [0+0+0 784 0+0+0] [0+0+0 0 0+0+0] children: inline
|
||
TextNode <#text> (not painted)
|
||
|
||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x260]
|
||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x244]
|
||
PaintableWithLines (BlockContainer<DIV>.outer) [8,8 452x122] overflow: [9,9 450x152]
|
||
PaintableWithLines (BlockContainer<DIV>.inner) [34,34 402x102]
|
||
TextPaintable (TextNode<#text>)
|
||
PaintableWithLines (InlineNode<SPAN>) [35,35 0x18]
|
||
PaintableWithLines (BlockContainer(anonymous)) [8,130 784x0]
|
||
PaintableWithLines (BlockContainer<DIV>.outer) [8,130 452x122] overflow: [9,131 450x260]
|
||
PaintableWithLines (BlockContainer<DIV>.inner) [34,156 402x102]
|
||
TextPaintable (TextNode<#text>)
|
||
PaintableWithLines (BlockContainer(anonymous)) [8,252 784x0]
|
||
|
||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||
SC for BlockContainer<HTML> [0,0 800x260] [children: 0] (z-index: auto)
|