diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-18 15:01:28 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-18 21:11:30 +0100 |
commit | 7c57961c61aada999bf1dbc871708546b4fe1ba9 (patch) | |
tree | 17bbd399baddc8cb18a6cc6e0497a70bfb1ffc83 /Userland/Libraries/LibWeb/DOM | |
parent | 2b866e3c9b0c6e230054edbbbe431cb1fbe3037e (diff) | |
download | serenity-7c57961c61aada999bf1dbc871708546b4fe1ba9.zip |
LibWeb: Move BrowsingContext into HTML/
Browsing contexts are defined by the HTML specification, so let's move
them into the HTML directory. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.cpp | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Document.h | 10 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Element.cpp | 2 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Window.cpp | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 9351418658..c6d5bc1367 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -36,6 +36,7 @@ #include <LibWeb/DOM/Window.h> #include <LibWeb/Dump.h> #include <LibWeb/HTML/AttributeNames.h> +#include <LibWeb/HTML/BrowsingContext.h> #include <LibWeb/HTML/EventLoop/EventLoop.h> #include <LibWeb/HTML/EventNames.h> #include <LibWeb/HTML/HTMLAnchorElement.h> @@ -56,7 +57,6 @@ #include <LibWeb/Layout/TreeBuilder.h> #include <LibWeb/Namespace.h> #include <LibWeb/Origin.h> -#include <LibWeb/Page/BrowsingContext.h> #include <LibWeb/Page/Page.h> #include <LibWeb/SVG/TagNames.h> #include <LibWeb/UIEvents/EventNames.h> @@ -300,13 +300,13 @@ void Document::set_title(const String& title) } } -void Document::attach_to_browsing_context(Badge<BrowsingContext>, BrowsingContext& browsing_context) +void Document::attach_to_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext& browsing_context) { m_browsing_context = browsing_context; update_layout(); } -void Document::detach_from_browsing_context(Badge<BrowsingContext>, BrowsingContext& browsing_context) +void Document::detach_from_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext& browsing_context) { VERIFY(&browsing_context == m_browsing_context); tear_down_layout_tree(); diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index f87f3e6fdb..4c4330cfce 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -120,11 +120,11 @@ public: String title() const; void set_title(const String&); - void attach_to_browsing_context(Badge<BrowsingContext>, BrowsingContext&); - void detach_from_browsing_context(Badge<BrowsingContext>, BrowsingContext&); + void attach_to_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&); + void detach_from_browsing_context(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&); - BrowsingContext* browsing_context() { return m_browsing_context.ptr(); } - const BrowsingContext* browsing_context() const { return m_browsing_context.ptr(); } + HTML::BrowsingContext* browsing_context() { return m_browsing_context.ptr(); } + HTML::BrowsingContext const* browsing_context() const { return m_browsing_context.ptr(); } Page* page(); const Page* page() const; @@ -339,7 +339,7 @@ private: RefPtr<CSS::StyleSheetList> m_style_sheets; RefPtr<Node> m_hovered_node; RefPtr<Node> m_inspected_node; - WeakPtr<BrowsingContext> m_browsing_context; + WeakPtr<HTML::BrowsingContext> m_browsing_context; AK::URL m_url; RefPtr<Window> m_window; diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index 5b24af6c37..af80164c7c 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -21,6 +21,7 @@ #include <LibWeb/DOM/Text.h> #include <LibWeb/DOMParsing/InnerHTML.h> #include <LibWeb/Geometry/DOMRect.h> +#include <LibWeb/HTML/BrowsingContext.h> #include <LibWeb/HTML/EventLoop/EventLoop.h> #include <LibWeb/HTML/Parser/HTMLParser.h> #include <LibWeb/Layout/BlockContainer.h> @@ -32,7 +33,6 @@ #include <LibWeb/Layout/TableRowGroupBox.h> #include <LibWeb/Layout/TreeBuilder.h> #include <LibWeb/Namespace.h> -#include <LibWeb/Page/BrowsingContext.h> namespace Web::DOM { diff --git a/Userland/Libraries/LibWeb/DOM/Window.cpp b/Userland/Libraries/LibWeb/DOM/Window.cpp index afff05fabe..67d82dbf58 100644 --- a/Userland/Libraries/LibWeb/DOM/Window.cpp +++ b/Userland/Libraries/LibWeb/DOM/Window.cpp @@ -15,11 +15,11 @@ #include <LibWeb/DOM/EventDispatcher.h> #include <LibWeb/DOM/Timer.h> #include <LibWeb/DOM/Window.h> +#include <LibWeb/HTML/BrowsingContext.h> #include <LibWeb/HTML/EventLoop/EventLoop.h> #include <LibWeb/HTML/PageTransitionEvent.h> #include <LibWeb/HighResolutionTime/Performance.h> #include <LibWeb/Layout/InitialContainingBlock.h> -#include <LibWeb/Page/BrowsingContext.h> #include <LibWeb/Page/Page.h> #include <LibWeb/Selection/Selection.h> |