mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 09:47:35 +00:00
LibWeb: Start adding support for the <iframe> element! :^)
This patch introduces a bunch of things: - Subframes (Web::Frame::create_subframe()) - HTMLIFrameElement (loads and owns the hosted Web::Frame) - LayoutFrame (layout and rendering of the hosted frame) There's still a huge number of things missing, like scrolling, overflow handling, event handling, scripting, etc. But we can make a little iframe in a document and it actually renders another document there. I think that's pretty cool! :^)
This commit is contained in:
parent
f2aa21ebc4
commit
422bbe98a5
13 changed files with 321 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
|||
#include <LibWeb/DOM/HTMLHeadElement.h>
|
||||
#include <LibWeb/DOM/HTMLHeadingElement.h>
|
||||
#include <LibWeb/DOM/HTMLHtmlElement.h>
|
||||
#include <LibWeb/DOM/HTMLIFrameElement.h>
|
||||
#include <LibWeb/DOM/HTMLImageElement.h>
|
||||
#include <LibWeb/DOM/HTMLInputElement.h>
|
||||
#include <LibWeb/DOM/HTMLLinkElement.h>
|
||||
|
@ -76,6 +77,8 @@ NonnullRefPtr<Element> create_element(Document& document, const FlyString& tag_n
|
|||
return adopt(*new HTMLInputElement(document, lowercase_tag_name));
|
||||
if (lowercase_tag_name == "br")
|
||||
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 == "h1"
|
||||
|| lowercase_tag_name == "h2"
|
||||
|| lowercase_tag_name == "h3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue