1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-07 21:17:07 +09:00

Tests/LibWeb: Regression test for auto margin on max-width container

An earlier variant of the commit following this one introduced a
regression for the behavior tested here, but did not fail any in-tree
tests. So lets add an explicit regression test to make that easier to
catch in the future.
This commit is contained in:
InvalidUsernameException 2025-06-04 20:19:20 +02:00 committed by Alexander Kalenik
parent 777228acca
commit ede84567f1
Notes: github-actions[bot] 2025-06-05 15:57:22 +00:00
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,12 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: not-inline
BlockContainer <div> at (204,8) content-size 392x100 children: not-inline
BlockContainer <(anonymous)> at (8,108) content-size 784x0 children: inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]
PaintableWithLines (BlockContainer<DIV>) [204,8 392x100]
PaintableWithLines (BlockContainer(anonymous)) [8,108 784x0]

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<style>
div {
max-width: 50%;
height: 100px;
background: lightgrey;
margin: 0 auto;
}
</style>
<div></div>