mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 04:52:23 +00:00
LibWeb: Tests for rendering lists and their ordinals
The following tests also expose bugs before this PR: - Layout/input/ol-render-item-values.html: negative ordinal values - Layout/input/ol-render-deep-hybrid-list-item-list.html: ordinals deep into the list owner subtree
This commit is contained in:
parent
00d43b39d1
commit
20546725be
Notes:
github-actions[bot]
2025-06-16 11:46:20 +00:00
Author: https://github.com/manuel-za
Commit: 20546725be
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4442
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/InvalidUsernameException
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/skyz1 ✅
18 changed files with 761 additions and 0 deletions
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<ol id="ol-without-box" style="display:contents">
|
||||
<!--
|
||||
The list item owner will be the document; not "ol-without-box".
|
||||
As a result, the list will be displayed as an ul.
|
||||
FIXME: Ladybird paints MarkerPaintable... but without an actual marker. Firefox and Chrome show a minuscule bullet.
|
||||
-->
|
||||
<li>One</li>
|
||||
<li>Two</li>
|
||||
</ol>
|
||||
</body>
|
14
Tests/LibWeb/Layout/input/list-render-list-owner-not-ol.html
Normal file
14
Tests/LibWeb/Layout/input/list-render-list-owner-not-ol.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<div id="list-item-owner">
|
||||
<ol id="ol-without-box" style="display:contents">
|
||||
<!--
|
||||
The list item owner will be "list-item-owner"; not "ol-without-box".
|
||||
As a result, the list will be displayed as an ul.
|
||||
FIXME: Ladybird paints MarkerPaintable... but without an actual marker. Firefox and Chrome show a minuscule bullet.
|
||||
-->
|
||||
<li>One</li>
|
||||
<li>Two</li>
|
||||
</ol>
|
||||
</div>
|
||||
</html>
|
5
Tests/LibWeb/Layout/input/list-render-no-list.html
Normal file
5
Tests/LibWeb/Layout/input/list-render-no-list.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<body>
|
||||
<li>One
|
||||
<li>Two
|
||||
</body>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<ol>
|
||||
<li>One</li>
|
||||
<li value=22>Twenty-two</li>
|
||||
<div>Ignore these</div>
|
||||
<div>+A<div>+B<div>+C
|
||||
<div style="display:list-item">Twenty-three</div>
|
||||
</div></div></div>
|
||||
<p>Ignore this paragraph</p>
|
||||
<p><span>X<span>Y<span>Z
|
||||
<li>Twenty-four</li>
|
||||
</span></span></span>
|
||||
<div>List item paragraph inside nested divs<div>2025
|
||||
<p style="display:list-item">Twenty-five</p>
|
||||
</div></div>
|
||||
<li>Twenty-six</li>
|
||||
<span style="display:list-item">Twenty-seven</span>
|
||||
<li>Twenty-eight</li>
|
||||
</ol>
|
||||
</html>
|
13
Tests/LibWeb/Layout/input/ol-render-item-values.html
Normal file
13
Tests/LibWeb/Layout/input/ol-render-item-values.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<!--
|
||||
Confirms MarkerPaintable sizes for reference list.
|
||||
FIXME: Left alignment cuts into border.
|
||||
-->
|
||||
<body>
|
||||
<ol start=7>
|
||||
<li>Seven</li>
|
||||
<li value="-112">Minus one hundred and twelve</li> <!-- Confirms negative ordinal -->
|
||||
<li value="1024">Two to the power of ten</li>
|
||||
<li value="11">Eleven</li>
|
||||
</ol>
|
||||
</body>
|
13
Tests/LibWeb/Layout/input/ol-render-style-list-item.html
Normal file
13
Tests/LibWeb/Layout/input/ol-render-style-list-item.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<ol>
|
||||
<li>One</li>
|
||||
<li value=22>Twenty-two</li>
|
||||
<div style="display:list-item">Twenty-three</div>
|
||||
<li>Twenty-four</li>
|
||||
<p style="display:list-item">Twenty-five</p>
|
||||
<li>Twenty-six</li>
|
||||
<span style="display:list-item">Twenty-seven</span>
|
||||
<li>Twenty-eight</li>
|
||||
</ol>
|
||||
</html>
|
20
Tests/LibWeb/Layout/input/ul-render.html
Normal file
20
Tests/LibWeb/Layout/input/ul-render.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<!--
|
||||
Confirms drawing a ul. Font size can be controlled so MarkerPaintable sizes should match reference.
|
||||
FIXME: At some point, `::marker` should support `content`. https://drafts.csswg.org/css-content-3/#propdef-content
|
||||
-->
|
||||
<style>
|
||||
.B li::marker { font-size: .5em; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<ul class="A">
|
||||
<li>Three</li>
|
||||
<li>Four</li>
|
||||
</ul>
|
||||
<ul class="B">
|
||||
<li>One</li>
|
||||
<li>Two</li>
|
||||
</ul>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue