1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:27: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:
Andreas Kling 2020-06-05 23:36:02 +02:00
parent f2aa21ebc4
commit 422bbe98a5
13 changed files with 321 additions and 0 deletions

View file

@ -41,6 +41,7 @@ class PageView;
class Frame : public TreeNode<Frame> {
public:
static NonnullRefPtr<Frame> create_subframe() { return adopt(*new Frame); }
static NonnullRefPtr<Frame> create(PageView& page_view) { return adopt(*new Frame(page_view)); }
~Frame();
@ -64,6 +65,7 @@ public:
void did_scroll(Badge<PageView>);
private:
Frame();
explicit Frame(PageView&);
WeakPtr<PageView> m_page_view;