mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
LibHTML: Implement the <br> element for line breaking
The <br> element will produce a special LayoutBreak node in the layout tree, which forces a break in the line layout whenever encountered. This patch also makes LayoutBlock use the current line-height as the minimum effective height for each line box. This ensures that having multiple <br> elements in a row doesn't create 0-height line boxes.
This commit is contained in:
parent
bf79b198f6
commit
6242459c0f
9 changed files with 89 additions and 1 deletions
14
Base/home/anon/www/br.html
Normal file
14
Base/home/anon/www/br.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<html>
|
||||
<head><title>BR element test</title></head>
|
||||
<body>
|
||||
Hello world<br>
|
||||
This is<br><br>
|
||||
a test page<br>
|
||||
for<br>
|
||||
the<br>
|
||||
<br>
|
||||
BR element!
|
||||
<br><br><br><br>
|
||||
Does it work?
|
||||
</body>
|
||||
</html>
|
|
@ -24,6 +24,7 @@ h1 {
|
|||
<li><a href="selectors.html">selectors</a></li>
|
||||
<li><a href="link.html">link element</a></li>
|
||||
<li><a href="blink.html">blink element</a></li>
|
||||
<li><a href="br.html">br element</a></li>
|
||||
<li><a href="http://www.serenityos.org/">www.serenityos.org</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue