LibHTML: Implement the <hr> element

This also meant I had to implement basic support for the border-styles
"inset" and "outset". If it's neither of those, we default to "solid".
This commit is contained in:
Andreas Kling 2019-10-01 20:50:11 +02:00
parent 53fae2af4f
commit 8f842375a2
Notes: sideshowbarker 2024-07-19 11:51:40 +09:00
6 changed files with 54 additions and 4 deletions

View file

@ -3,6 +3,7 @@
#include <AK/StringBuilder.h>
#include <LibHTML/DOM/Element.h>
#include <LibHTML/DOM/HTMLAnchorElement.h>
#include <LibHTML/DOM/HTMLHRElement.h>
#include <LibHTML/DOM/HTMLHeadElement.h>
#include <LibHTML/DOM/HTMLHeadingElement.h>
#include <LibHTML/DOM/HTMLHtmlElement.h>
@ -22,6 +23,8 @@ static NonnullRefPtr<Element> create_element(Document& document, const String& t
return adopt(*new HTMLHtmlElement(document, tag_name));
if (lowercase_tag_name == "head")
return adopt(*new HTMLHeadElement(document, tag_name));
if (lowercase_tag_name == "hr")
return adopt(*new HTMLHRElement(document, tag_name));
if (lowercase_tag_name == "style")
return adopt(*new HTMLStyleElement(document, tag_name));
if (lowercase_tag_name == "title")