1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +00:00

LibWeb: Propagate overflow modes from <html> or <body> to viewport

This patch implements "Overflow Viewport Propagation" from CSS-OVERFLOW.
It fixes an issue where many websites were not scrollable because they
had `overflow: scroll` on the body element and we didn't propagate it.
This commit is contained in:
Andreas Kling 2023-08-03 12:26:43 +02:00
parent 09eed8eea2
commit 4011a107a4
5 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,10 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x2016 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x2000 children: not-inline
BlockContainer <div> at (8,8) content-size 100x2000 children: inline
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x2016]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x2016]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x2000]
PaintableWithLines (BlockContainer<DIV>) [8,8 100x2000]

View file

@ -0,0 +1,10 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x616 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x600 children: not-inline
BlockContainer <div.long> at (8,8) content-size 784x2000 children: inline
TextNode <#text>
PaintableWithLines (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x2008]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x616] overflow: [0,0 800x2008]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x600] overflow: [8,8 784x2000]
PaintableWithLines (BlockContainer<DIV>.long) [8,8 784x2000]