diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-04 15:50:04 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-04 15:50:04 +0200 |
commit | 7bc93101709026cc3c5e04f8e31bc876a28bc11a (patch) | |
tree | f0526aeffc057f3ee1065df3f492894660fbae72 /Libraries/LibHTML/DOM/Document.cpp | |
parent | b1758ae2b37ad02acd3a06a3afa60a1d3ca379f9 (diff) | |
download | serenity-7bc93101709026cc3c5e04f8e31bc876a28bc11a.zip |
LibHTML: Add a Frame class and use it for document layout width
Each HtmlView now has a main_frame(), which represents the main frame
of the web page. Frame inherits from TreeNode<Frame>, which will allow
us to someday implement a Frame tree (to support the <frame> element.)
Diffstat (limited to 'Libraries/LibHTML/DOM/Document.cpp')
-rw-r--r-- | Libraries/LibHTML/DOM/Document.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Libraries/LibHTML/DOM/Document.cpp b/Libraries/LibHTML/DOM/Document.cpp index 22a9d0a910..45482fd91d 100644 --- a/Libraries/LibHTML/DOM/Document.cpp +++ b/Libraries/LibHTML/DOM/Document.cpp @@ -4,6 +4,7 @@ #include <LibHTML/DOM/HTMLHeadElement.h> #include <LibHTML/DOM/HTMLHtmlElement.h> #include <LibHTML/DOM/HTMLTitleElement.h> +#include <LibHTML/Frame.h> #include <LibHTML/Layout/LayoutDocument.h> #include <stdio.h> @@ -63,3 +64,12 @@ String Document::title() const return title_element->text_content(); } + +void Document::attach_to_frame(Badge<Frame>, Frame& frame) +{ + m_frame = frame.make_weak_ptr(); +} + +void Document::detach_from_frame(Badge<Frame>, Frame&) +{ +} |