diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-12 13:47:49 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-12 13:47:49 +0200 |
commit | 6242459c0f759b88fcd380d9342ead8dfc7acebc (patch) | |
tree | 46ff04e806c6a90376518e0a6e866070ecea5de7 /Base | |
parent | bf79b198f68c82c10a43420fab446fa9aad8939d (diff) | |
download | serenity-6242459c0f759b88fcd380d9342ead8dfc7acebc.zip |
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.
Diffstat (limited to 'Base')
-rw-r--r-- | Base/home/anon/www/br.html | 14 | ||||
-rw-r--r-- | Base/home/anon/www/welcome.html | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Base/home/anon/www/br.html b/Base/home/anon/www/br.html new file mode 100644 index 0000000000..0af2d1eb56 --- /dev/null +++ b/Base/home/anon/www/br.html @@ -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> diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html index 8a1524bc29..24602f109e 100644 --- a/Base/home/anon/www/welcome.html +++ b/Base/home/anon/www/welcome.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> |