LibWeb: Implement the "The html element fills the viewport quirk"

Fixes #18037.
This commit is contained in:
Andreas Kling 2023-05-03 19:48:32 +02:00
parent 508927cae2
commit 590723aa3b
Notes: sideshowbarker 2024-07-17 04:03:27 +09:00
69 changed files with 97 additions and 67 deletions

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x157 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: not-inline
BlockContainer <div> at (8,8) content-size 784x100 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x348.34375 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x332.34375 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
TextNode <#text>

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x135.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 780x119.46875 children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 780x0 children: inline
TextNode <#text>

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x36 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x20 children: inline
line 0 width: 352.34375, height: 20, bottom: 20, baseline: 13.53125
frag 0 from TextNode start: 0, length: 14, rect: [8,8 112.421875x17.46875]

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x191 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x175 children: inline
line 0 width: 210.828125, height: 175, bottom: 175, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [8,8 43.125x17.46875]

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x194.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x178.46875 children: inline
line 0 width: 210.828125, height: 178.46875, bottom: 178.46875, baseline: 175
frag 0 from TextNode start: 0, length: 6, rect: [8,169 43.125x17.46875]

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x262 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,25) content-size 784x229 children: not-inline
BlockContainer <div#foo> at (34,26) content-size 100x100 children: inline
line 0 width: 27.15625, height: 17.46875, bottom: 17.46875, baseline: 13.53125

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x352 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x336 children: not-inline
BlockContainer <div#foo> at (9,9) content-size 100x100 children: inline
line 0 width: 27.15625, height: 17.46875, bottom: 17.46875, baseline: 13.53125

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x366 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x350 children: not-inline
BlockContainer <div#foo> at (8,8) content-size 100x100 children: not-inline
BlockContainer <(anonymous)> at (8,133) content-size 784x0 children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x166 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x150 children: not-inline
BlockContainer <div#foo> at (8,8) content-size 100x50 children: not-inline
BlockContainer <div#baz> at (8,8) content-size 50x50 children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x37.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x21.46875 children: not-inline
BlockContainer <div#begin> at (8,8) content-size 784x2 children: not-inline
BlockContainer <(anonymous)> at (8,10) content-size 784x17.46875 children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x70.589843 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x54.589843 children: inline
line 0 width: 137.646484, height: 54.589843, bottom: 54.589843, baseline: 42.285156
frag 0 from TextNode start: 0, length: 5, rect: [8,8 137.646484x54.589843]

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x125.179687 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x109.179687 children: inline
line 0 width: 275.292968, height: 109.179687, bottom: 109.179687, baseline: 84.570312
frag 0 from TextNode start: 0, length: 5, rect: [8,8 275.292968x109.179687]

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div.foo> at (8,8) content-size 784x17.46875 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 28.40625x17.46875 flex-item [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 500x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x268 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x252 children: not-inline
Box <div.container.column> at (9,9) content-size 250x250 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x268 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x252 children: not-inline
Box <div.container.column> at (9,9) content-size 782x250 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x268 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x252 children: not-inline
Box <div.container.column> at (9,9) content-size 250x250 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x268 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x252 children: not-inline
Box <div.container> at (9,9) content-size 782x250 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x324 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x308 children: not-inline
Box <div.my-container.column> at (9,9) content-size 782x306 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 250x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x222 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x206 children: not-inline
Box <div.container> at (9,9) content-size 250x204 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container.width-constrained> at (9,9) content-size 250x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x76.40625 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x60.40625 children: not-inline
Box <div.container> at (9,9) content-size 500x58.40625 flex-container(column) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 500x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 500x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x30 [BFC] children: not-inline
BlockContainer <html> at (1,1) content-size 798x600 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x12 children: not-inline
BlockContainer <(anonymous)> at (10,10) content-size 780x0 children: inline
TextNode <#text>

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x70 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x54 children: not-inline
Box <div.container> at (9,9) content-size 600x52 flex-container(row) [FFC] children: not-inline
BlockContainer <div.box> at (20,10) content-size 150x50 flex-item [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 782x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 250x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 500x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104 children: not-inline
Box <div.container> at (9,9) content-size 500x102 flex-container(row) [FFC] children: not-inline
BlockContainer <(anonymous)> at (9,9) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x268 [BFC] children: not-inline
BlockContainer <html> at (1,1) content-size 798x600 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x250 children: not-inline
Box <div.flexbox> at (11,11) content-size 100x248 flex-container(row) [FFC] children: not-inline
BlockContainer <div> at (12,12) content-size 30x30 flex-item [BFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x50.9375 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x34.9375 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x34.9375 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x444.28125 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x428.28125 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x74.9375 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x50.9375 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x34.9375 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x34.9375 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x166.8125 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x150.8125 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x44.9375 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x216 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x200 children: not-inline
Box <div.mw-page-container-inner> at (8,8) content-size 784x0 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x40 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x24 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x24 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x288.28125 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x272.28125 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x143.40625 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x127.40625 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x185.875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x169.875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x17.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x233.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x217.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x200 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x83.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x67.46875 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x67.46875 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x120.8125 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x104.8125 children: not-inline
Box <div.grid-container> at (8,8) content-size 784x34.9375 [GFC] children: not-inline
BlockContainer <(anonymous)> at (8,8) content-size 0x0 [BFC] children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x118 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x102 children: not-inline
BlockContainer <div.box> at (9,9) content-size 100x100 positioned [BFC] children: not-inline
BlockContainer <(anonymous)> at (8,110) content-size 784x0 children: inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x16 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x0 children: inline
BlockContainer <div#container> at (8,8) content-size 500x400 positioned [BFC] children: inline
TextNode <#text>

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x232.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x216.46875 children: inline
line 0 width: 174.828125, height: 216.46875, bottom: 216.46875, baseline: 213
frag 0 from TextNode start: 0, length: 6, rect: [8,207 43.125x17.46875]

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x273.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x257.46875 children: inline
line 0 width: 772, height: 130.46875, bottom: 130.46875, baseline: 127
frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,84 100x50]

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
BlockContainer <div.wrapper> at (8,8) content-size 784x17.46875 children: not-inline
TableWrapper <(anonymous)> at (235.265625,8) content-size 329.46875x17.46875 [BFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x74.40625 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x58.40625 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 784x0 [BFC] children: not-inline
TableBox <table#empty-table> at (8,8) content-size 784x0 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x293.625 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x277.625 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 164.296875x66.40625 [BFC] children: not-inline
TableBox <table.table-border-black> at (9,9) content-size 164.296875x64.40625 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 102x100 [BFC] children: not-inline
TableBox <body> at (8,8) content-size 102x100 [TFC] children: not-inline
TableRowBox <div.row> at (8,8) content-size 102x100 children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x108.21875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x92.21875 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 782x92.21875 [BFC] children: not-inline
TableBox <table.ambox> at (9,9) content-size 780x90.21875 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x51.40625 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x35.40625 children: not-inline
BlockContainer <div.wrapper> at (8,8) content-size 784x35.40625 children: not-inline
TableWrapper <(anonymous)> at (108,8) content-size 584x35.40625 [BFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 102x100 [BFC] children: not-inline
TableBox <body> at (8,8) content-size 102x100 [TFC] children: not-inline
TableRowBox <div.row> at (8,8) content-size 102x100 children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x166 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x150 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x150 [BFC] children: not-inline
TableBox <div.table> at (8,8) content-size 200x150 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x316 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x300 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x300 [BFC] children: not-inline
TableBox <div.table> at (8,8) content-size 200x300 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x316 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x300 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x300 [BFC] children: not-inline
TableBox <div.table> at (8,8) content-size 200x300 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x316 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x300 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x300 [BFC] children: not-inline
TableBox <div.table> at (8,8) content-size 200x300 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x33.46875 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x17.46875 children: not-inline
TableWrapper <(anonymous)> at (350,8) content-size 100x17.46875 [BFC] children: not-inline
TableBox <div> at (350,8) content-size 100x17.46875 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x226 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x210 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 584x210 [BFC] children: not-inline
TableBox <table.table> at (108,108) content-size 584x10 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x16 [BFC] children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x0 children: not-inline
TableWrapper <(anonymous)> at (8,8) content-size 200x0 [BFC] children: not-inline
TableBox <div.table> at (8,8) content-size 200x0 [TFC] children: not-inline

View file

@ -1,5 +1,5 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x30 [BFC] children: not-inline
BlockContainer <html> at (1,1) content-size 798x600 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x12 children: not-inline
BlockContainer <(anonymous)> at (10,10) content-size 780x0 children: inline
TextNode <#text>

View file

@ -867,6 +867,13 @@ void Document::update_layout()
viewport_state.set_content_width(viewport_rect.width());
viewport_state.set_content_height(viewport_rect.height());
if (auto* document_element = this->document_element()) {
VERIFY(document_element->layout_node());
auto& icb_state = layout_state.get_mutable(verify_cast<Layout::NodeWithStyleAndBoxModelMetrics>(*document_element->layout_node()));
icb_state.set_content_width(viewport_rect.width());
icb_state.set_content_height(viewport_rect.height());
}
root_formatting_context.run(
*m_layout_root,
Layout::LayoutMode::Normal,

View file

@ -398,6 +398,29 @@ void BlockFormattingContext::compute_height(Box const& box, AvailableSpace const
height = max(height, calculate_inner_height(box, available_space.height, computed_values.min_height()).to_px(box));
}
if (box.document().in_quirks_mode()
&& box.dom_node()
&& box.dom_node()->is_html_html_element()
&& box.computed_values().height().is_auto()) {
// 3.6. The html element fills the viewport quirk
// https://quirks.spec.whatwg.org/#the-html-element-fills-the-viewport-quirk
// FIXME: Handle vertical writing mode.
auto& box_state = m_state.get_mutable(box);
// 1. Let margins be sum of the used values of the margin-left and margin-right properties of element
// if element has a vertical writing mode, otherwise let margins be the sum of the used values of
// the margin-top and margin-bottom properties of element.
auto margins = box_state.margin_top + box_state.margin_bottom;
// 2. Let size be the size of the initial containing block in the block flow direction minus margins.
auto size = box_state.content_height() - margins;
// 3. Return the bigger value of size and the normal border box size the element would have
// according to the CSS specification.
height = max(size, height);
}
m_state.get_mutable(box).set_content_height(height);
}