about summary refs log tree commit diff stats
path: root/test/layout/inline-margin-collapses-over-empty-boxes.html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-02-07 19:27:16 +0100
committerbptato <nincsnevem662@gmail.com>2025-02-07 20:18:47 +0100
commitd57ef74a78ba32e8187d74c1975e7a4181af36c0 (patch)
treef29a16e1d0c7e600f438862bc37f925acfc3eb45 /test/layout/inline-margin-collapses-over-empty-boxes.html
parentebdb900ebc843e93dec4846e2f2434bf18ad8613 (diff)
downloadchawan-d57ef74a78ba32e8187d74c1975e7a4181af36c0.tar.gz
layout: unify BlockBox and InlineBox, refactor building
* normalize flow baseline computation
* fix various margin collapsing bugs
* eliminate inlineStack
* eliminate push*
* derive BlockBox and InlineBox from CSSBox

This removes a pointer from BlockBox, and adds a pointer to both
BlockBox and InlineBox (type field).  A net loss, but it makes the code
more manageable.
Plus, inline groups now need one less allocation, so overall it's not
that bad.
Diffstat (limited to 'test/layout/inline-margin-collapses-over-empty-boxes.html')
-rw-r--r--test/layout/inline-margin-collapses-over-empty-boxes.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/layout/inline-margin-collapses-over-empty-boxes.html b/test/layout/inline-margin-collapses-over-empty-boxes.html
new file mode 100644
index 00000000..859b3f87
--- /dev/null
+++ b/test/layout/inline-margin-collapses-over-empty-boxes.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<span>
+test1
+<div>
+test2
+</div>
+test3
+</span>
+
+<br>
+
+<span>
+test4
+<div style="margin-bottom: 1em">
+test5
+</div>
+<div style="margin-top: 1em">
+test6
+</div>
+</span>
+
+<span>
+test7
+<div style="margin-bottom: 1em">
+test8
+</div>
+<div style="margin-top: 1em">
+</div>
+test9
+</span>
+
+<br>
+<span>
+testa
+<div style="margin-bottom: 1em">
+testb
+</div>
+<div style="margin-top: 1em; margin-bottom: 2em">
+</div>
+</span>
+<div style="margin-top: 2em">
+testd
+</div>