1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

LibWeb: Add (stub) HTMLTable{,Cell,Row}Element C++ classes

We'll need a place to implement the various presentational attributes
for table parts, and more stuff.
This commit is contained in:
Andreas Kling 2020-06-07 23:10:45 +02:00
parent 3654710c41
commit 10851d87a2
8 changed files with 269 additions and 0 deletions

View file

@ -42,6 +42,9 @@
#include <LibWeb/DOM/HTMLLinkElement.h>
#include <LibWeb/DOM/HTMLScriptElement.h>
#include <LibWeb/DOM/HTMLStyleElement.h>
#include <LibWeb/DOM/HTMLTableCellElement.h>
#include <LibWeb/DOM/HTMLTableElement.h>
#include <LibWeb/DOM/HTMLTableRowElement.h>
#include <LibWeb/DOM/HTMLTitleElement.h>
namespace Web {
@ -79,6 +82,14 @@ NonnullRefPtr<Element> create_element(Document& document, const FlyString& tag_n
return adopt(*new HTMLBRElement(document, lowercase_tag_name));
if (lowercase_tag_name == "iframe")
return adopt(*new HTMLIFrameElement(document, lowercase_tag_name));
if (lowercase_tag_name == "table")
return adopt(*new HTMLTableElement(document, lowercase_tag_name));
if (lowercase_tag_name == "tr")
return adopt(*new HTMLTableRowElement(document, lowercase_tag_name));
if (lowercase_tag_name == "td" || lowercase_tag_name == "th")
return adopt(*new HTMLTableCellElement(document, lowercase_tag_name));
if (lowercase_tag_name == "iframe")
return adopt(*new HTMLIFrameElement(document, lowercase_tag_name));
if (lowercase_tag_name == "h1"
|| lowercase_tag_name == "h2"
|| lowercase_tag_name == "h3"