From c91981eba825155521dfeadc9aec3961d3590b23 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 12 Jun 2020 18:09:40 +0200 Subject: [PATCH] LibWeb: Handle negative values when collapsing vertical margins In the presence of negative margins, we subtract the largest negative margin from max(0, largest positive margin). --- Base/home/anon/www/margin-collapse-2.html | 23 +++++++++++++++++++++++ Base/home/anon/www/welcome.html | 1 + Libraries/LibWeb/Layout/LayoutBlock.cpp | 9 ++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Base/home/anon/www/margin-collapse-2.html diff --git a/Base/home/anon/www/margin-collapse-2.html b/Base/home/anon/www/margin-collapse-2.html new file mode 100644 index 0000000000..f1d92ded30 --- /dev/null +++ b/Base/home/anon/www/margin-collapse-2.html @@ -0,0 +1,23 @@ + +
foo
+
bar
+
baz
diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html index ed0c2e14b1..42e2e6865f 100644 --- a/Base/home/anon/www/welcome.html +++ b/Base/home/anon/www/welcome.html @@ -28,6 +28,7 @@ span#ua {

Your user agent is:

Some small test pages: