Browse Source

LibWeb: Move BrowsingContext into HTML/

Browsing contexts are defined by the HTML specification, so let's move
them into the HTML directory. :^)
Andreas Kling 3 years ago
parent
commit
7c57961c61
43 changed files with 73 additions and 75 deletions
  1. 1 1
      Userland/Applications/Browser/Tab.cpp
  2. 1 1
      Userland/Libraries/LibWeb/Bindings/WindowObject.cpp
  3. 1 1
      Userland/Libraries/LibWeb/CMakeLists.txt
  4. 1 1
      Userland/Libraries/LibWeb/CSS/Length.cpp
  5. 1 1
      Userland/Libraries/LibWeb/CSS/StyleComputer.cpp
  6. 1 1
      Userland/Libraries/LibWeb/CSS/StyleValue.cpp
  7. 3 3
      Userland/Libraries/LibWeb/DOM/Document.cpp
  8. 5 5
      Userland/Libraries/LibWeb/DOM/Document.h
  9. 1 1
      Userland/Libraries/LibWeb/DOM/Element.cpp
  10. 1 1
      Userland/Libraries/LibWeb/DOM/Window.cpp
  11. 1 1
      Userland/Libraries/LibWeb/Forward.h
  12. 2 2
      Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp
  13. 4 4
      Userland/Libraries/LibWeb/HTML/BrowsingContext.h
  14. 1 1
      Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp
  15. 1 1
      Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp
  16. 1 1
      Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
  17. 1 1
      Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp
  18. 1 1
      Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp
  19. 1 1
      Userland/Libraries/LibWeb/InProcessWebView.cpp
  20. 1 1
      Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp
  21. 1 1
      Userland/Libraries/LibWeb/Layout/Box.cpp
  22. 1 1
      Userland/Libraries/LibWeb/Layout/ButtonBox.cpp
  23. 1 1
      Userland/Libraries/LibWeb/Layout/CheckBox.cpp
  24. 1 1
      Userland/Libraries/LibWeb/Layout/FrameBox.cpp
  25. 1 1
      Userland/Libraries/LibWeb/Layout/ImageBox.cpp
  26. 2 2
      Userland/Libraries/LibWeb/Layout/ImageBox.h
  27. 1 1
      Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp
  28. 1 1
      Userland/Libraries/LibWeb/Layout/Label.cpp
  29. 3 3
      Userland/Libraries/LibWeb/Layout/Node.cpp
  30. 2 2
      Userland/Libraries/LibWeb/Layout/Node.h
  31. 1 1
      Userland/Libraries/LibWeb/Layout/RadioButton.cpp
  32. 1 1
      Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp
  33. 1 1
      Userland/Libraries/LibWeb/Layout/TextNode.cpp
  34. 2 2
      Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
  35. 4 4
      Userland/Libraries/LibWeb/Loader/FrameLoader.h
  36. 1 1
      Userland/Libraries/LibWeb/Page/EditEventHandler.cpp
  37. 2 2
      Userland/Libraries/LibWeb/Page/EditEventHandler.h
  38. 2 2
      Userland/Libraries/LibWeb/Page/EventHandler.cpp
  39. 2 4
      Userland/Libraries/LibWeb/Page/EventHandler.h
  40. 4 4
      Userland/Libraries/LibWeb/Page/Page.cpp
  41. 7 7
      Userland/Libraries/LibWeb/Page/Page.h
  42. 1 1
      Userland/Services/WebContent/ClientConnection.cpp
  43. 1 1
      Userland/Services/WebContent/PageHost.cpp

+ 1 - 1
Userland/Applications/Browser/Tab.cpp

@@ -29,12 +29,12 @@
 #include <LibGUI/ToolbarContainer.h>
 #include <LibGUI/ToolbarContainer.h>
 #include <LibGUI/Window.h>
 #include <LibGUI/Window.h>
 #include <LibJS/Interpreter.h>
 #include <LibJS/Interpreter.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h>
 #include <LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/OutOfProcessWebView.h>
 #include <LibWeb/OutOfProcessWebView.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Browser {
 namespace Browser {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Bindings/WindowObject.cpp

@@ -38,10 +38,10 @@
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventHandler.h>
 #include <LibWeb/HTML/EventHandler.h>
 #include <LibWeb/HTML/Scripting/ClassicScript.h>
 #include <LibWeb/HTML/Scripting/ClassicScript.h>
 #include <LibWeb/Origin.h>
 #include <LibWeb/Origin.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/WebAssembly/WebAssemblyObject.h>
 #include <LibWeb/WebAssembly/WebAssemblyObject.h>
 
 

+ 1 - 1
Userland/Libraries/LibWeb/CMakeLists.txt

@@ -94,6 +94,7 @@ set(SOURCES
     Dump.cpp
     Dump.cpp
     FontCache.cpp
     FontCache.cpp
     HTML/AttributeNames.cpp
     HTML/AttributeNames.cpp
+    HTML/BrowsingContext.cpp
     HTML/BrowsingContextContainer.cpp
     HTML/BrowsingContextContainer.cpp
     HTML/CanvasRenderingContext2D.cpp
     HTML/CanvasRenderingContext2D.cpp
     HTML/DOMParser.cpp
     HTML/DOMParser.cpp
@@ -242,7 +243,6 @@ set(SOURCES
     Namespace.cpp
     Namespace.cpp
     NavigationTiming/PerformanceTiming.cpp
     NavigationTiming/PerformanceTiming.cpp
     OutOfProcessWebView.cpp
     OutOfProcessWebView.cpp
-    Page/BrowsingContext.cpp
     Page/EditEventHandler.cpp
     Page/EditEventHandler.cpp
     Page/EventHandler.cpp
     Page/EventHandler.cpp
     Page/Page.cpp
     Page/Page.cpp

+ 1 - 1
Userland/Libraries/LibWeb/CSS/Length.cpp

@@ -11,8 +11,8 @@
 #include <LibGfx/Rect.h>
 #include <LibGfx/Rect.h>
 #include <LibWeb/CSS/Length.h>
 #include <LibWeb/CSS/Length.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::CSS {
 namespace Web::CSS {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleComputer.cpp

@@ -18,7 +18,7 @@
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/FontCache.h>
 #include <LibWeb/FontCache.h>
-#include <LibWeb/Page/BrowsingContext.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <ctype.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <stdio.h>
 
 

+ 1 - 1
Userland/Libraries/LibWeb/CSS/StyleValue.cpp

@@ -9,9 +9,9 @@
 #include <LibGfx/Palette.h>
 #include <LibGfx/Palette.h>
 #include <LibWeb/CSS/StyleValue.h>
 #include <LibWeb/CSS/StyleValue.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Loader/LoadRequest.h>
 #include <LibWeb/Loader/LoadRequest.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 
 
 namespace Web::CSS {
 namespace Web::CSS {

+ 3 - 3
Userland/Libraries/LibWeb/DOM/Document.cpp

@@ -36,6 +36,7 @@
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/HTML/AttributeNames.h>
 #include <LibWeb/HTML/AttributeNames.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/EventNames.h>
 #include <LibWeb/HTML/EventNames.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
@@ -56,7 +57,6 @@
 #include <LibWeb/Layout/TreeBuilder.h>
 #include <LibWeb/Layout/TreeBuilder.h>
 #include <LibWeb/Namespace.h>
 #include <LibWeb/Namespace.h>
 #include <LibWeb/Origin.h>
 #include <LibWeb/Origin.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/SVG/TagNames.h>
 #include <LibWeb/SVG/TagNames.h>
 #include <LibWeb/UIEvents/EventNames.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;
     m_browsing_context = browsing_context;
     update_layout();
     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);
     VERIFY(&browsing_context == m_browsing_context);
     tear_down_layout_tree();
     tear_down_layout_tree();

+ 5 - 5
Userland/Libraries/LibWeb/DOM/Document.h

@@ -120,11 +120,11 @@ public:
     String title() const;
     String title() const;
     void set_title(const String&);
     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();
     Page* page();
     const Page* page() const;
     const Page* page() const;
@@ -339,7 +339,7 @@ private:
     RefPtr<CSS::StyleSheetList> m_style_sheets;
     RefPtr<CSS::StyleSheetList> m_style_sheets;
     RefPtr<Node> m_hovered_node;
     RefPtr<Node> m_hovered_node;
     RefPtr<Node> m_inspected_node;
     RefPtr<Node> m_inspected_node;
-    WeakPtr<BrowsingContext> m_browsing_context;
+    WeakPtr<HTML::BrowsingContext> m_browsing_context;
     AK::URL m_url;
     AK::URL m_url;
 
 
     RefPtr<Window> m_window;
     RefPtr<Window> m_window;

+ 1 - 1
Userland/Libraries/LibWeb/DOM/Element.cpp

@@ -21,6 +21,7 @@
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOMParsing/InnerHTML.h>
 #include <LibWeb/DOMParsing/InnerHTML.h>
 #include <LibWeb/Geometry/DOMRect.h>
 #include <LibWeb/Geometry/DOMRect.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/Parser/HTMLParser.h>
 #include <LibWeb/HTML/Parser/HTMLParser.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/BlockContainer.h>
@@ -32,7 +33,6 @@
 #include <LibWeb/Layout/TableRowGroupBox.h>
 #include <LibWeb/Layout/TableRowGroupBox.h>
 #include <LibWeb/Layout/TreeBuilder.h>
 #include <LibWeb/Layout/TreeBuilder.h>
 #include <LibWeb/Namespace.h>
 #include <LibWeb/Namespace.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::DOM {
 namespace Web::DOM {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/DOM/Window.cpp

@@ -15,11 +15,11 @@
 #include <LibWeb/DOM/EventDispatcher.h>
 #include <LibWeb/DOM/EventDispatcher.h>
 #include <LibWeb/DOM/Timer.h>
 #include <LibWeb/DOM/Timer.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/PageTransitionEvent.h>
 #include <LibWeb/HTML/PageTransitionEvent.h>
 #include <LibWeb/HighResolutionTime/Performance.h>
 #include <LibWeb/HighResolutionTime/Performance.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Selection/Selection.h>
 #include <LibWeb/Selection/Selection.h>
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Forward.h

@@ -115,6 +115,7 @@ class DOMRectReadOnly;
 }
 }
 
 
 namespace Web::HTML {
 namespace Web::HTML {
+class BrowsingContext;
 class CanvasRenderingContext2D;
 class CanvasRenderingContext2D;
 class CloseEvent;
 class CloseEvent;
 class DOMParser;
 class DOMParser;
@@ -261,7 +262,6 @@ class TextNode;
 }
 }
 
 
 namespace Web {
 namespace Web {
-class BrowsingContext;
 class EditEventHandler;
 class EditEventHandler;
 class EventHandler;
 class EventHandler;
 class FrameLoader;
 class FrameLoader;

+ 2 - 2
Userland/Libraries/LibWeb/Page/BrowsingContext.cpp → Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp

@@ -7,15 +7,15 @@
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/HTMLCollection.h>
 #include <LibWeb/DOM/HTMLCollection.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/Layout/BreakNode.h>
 #include <LibWeb/Layout/BreakNode.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/TextNode.h>
 #include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 
 
-namespace Web {
+namespace Web::HTML {
 
 
 BrowsingContext::BrowsingContext(Page& page, HTML::BrowsingContextContainer* container)
 BrowsingContext::BrowsingContext(Page& page, HTML::BrowsingContextContainer* container)
     : m_page(page)
     : m_page(page)

+ 4 - 4
Userland/Libraries/LibWeb/Page/BrowsingContext.h → Userland/Libraries/LibWeb/HTML/BrowsingContext.h

@@ -20,7 +20,7 @@
 #include <LibWeb/Page/EventHandler.h>
 #include <LibWeb/Page/EventHandler.h>
 #include <LibWeb/TreeNode.h>
 #include <LibWeb/TreeNode.h>
 
 
-namespace Web {
+namespace Web::HTML {
 
 
 class BrowsingContext : public TreeNode<BrowsingContext> {
 class BrowsingContext : public TreeNode<BrowsingContext> {
 public:
 public:
@@ -60,8 +60,8 @@ public:
     FrameLoader& loader() { return m_loader; }
     FrameLoader& loader() { return m_loader; }
     FrameLoader const& loader() const { return m_loader; }
     FrameLoader const& loader() const { return m_loader; }
 
 
-    EventHandler& event_handler() { return m_event_handler; }
-    EventHandler const& event_handler() const { return m_event_handler; }
+    Web::EventHandler& event_handler() { return m_event_handler; }
+    Web::EventHandler const& event_handler() const { return m_event_handler; }
 
 
     void scroll_to_anchor(String const&);
     void scroll_to_anchor(String const&);
 
 
@@ -112,7 +112,7 @@ private:
     WeakPtr<Page> m_page;
     WeakPtr<Page> m_page;
 
 
     FrameLoader m_loader;
     FrameLoader m_loader;
-    EventHandler m_event_handler;
+    Web::EventHandler m_event_handler;
 
 
     WeakPtr<HTML::BrowsingContextContainer> m_container;
     WeakPtr<HTML::BrowsingContextContainer> m_container;
     RefPtr<DOM::Document> m_active_document;
     RefPtr<DOM::Document> m_active_document;

+ 1 - 1
Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp

@@ -6,9 +6,9 @@
 
 
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Event.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/BrowsingContextContainer.h>
 #include <LibWeb/HTML/BrowsingContextContainer.h>
 #include <LibWeb/Origin.h>
 #include <LibWeb/Origin.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 
 
 namespace Web::HTML {
 namespace Web::HTML {

+ 1 - 1
Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp

@@ -10,9 +10,9 @@
 #include <LibWeb/Bindings/MainThreadVM.h>
 #include <LibWeb/Bindings/MainThreadVM.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HTML/EventLoop/EventLoop.h>
 #include <LibWeb/HighResolutionTime/Performance.h>
 #include <LibWeb/HighResolutionTime/Performance.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::HTML {
 namespace Web::HTML {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp

@@ -6,11 +6,11 @@
 
 
 #include <AK/StringBuilder.h>
 #include <AK/StringBuilder.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventNames.h>
 #include <LibWeb/HTML/EventNames.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
 #include <LibWeb/HTML/SubmitEvent.h>
 #include <LibWeb/HTML/SubmitEvent.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/URL/URL.h>
 #include <LibWeb/URL/URL.h>
 
 

+ 1 - 1
Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.cpp

@@ -6,10 +6,10 @@
 
 
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Event.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/Layout/FrameBox.h>
 #include <LibWeb/Layout/FrameBox.h>
 #include <LibWeb/Origin.h>
 #include <LibWeb/Origin.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::HTML {
 namespace Web::HTML {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp

@@ -8,6 +8,7 @@
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/Event.h>
 #include <LibWeb/DOM/ShadowRoot.h>
 #include <LibWeb/DOM/ShadowRoot.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/EventNames.h>
 #include <LibWeb/HTML/EventNames.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLFormElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
 #include <LibWeb/HTML/HTMLInputElement.h>
@@ -15,7 +16,6 @@
 #include <LibWeb/Layout/ButtonBox.h>
 #include <LibWeb/Layout/ButtonBox.h>
 #include <LibWeb/Layout/CheckBox.h>
 #include <LibWeb/Layout/CheckBox.h>
 #include <LibWeb/Layout/RadioButton.h>
 #include <LibWeb/Layout/RadioButton.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::HTML {
 namespace Web::HTML {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/InProcessWebView.cpp

@@ -13,13 +13,13 @@
 #include <LibGUI/Scrollbar.h>
 #include <LibGUI/Scrollbar.h>
 #include <LibGUI/Window.h>
 #include <LibGUI/Window.h>
 #include <LibGfx/ShareableBitmap.h>
 #include <LibGfx/ShareableBitmap.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/Parser/HTMLParser.h>
 #include <LibWeb/HTML/Parser/HTMLParser.h>
 #include <LibWeb/InProcessWebView.h>
 #include <LibWeb/InProcessWebView.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/TextNode.h>
 #include <LibWeb/Layout/TextNode.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/EventHandler.h>
 #include <LibWeb/Page/EventHandler.h>
 #include <LibWeb/Painting/PaintContext.h>
 #include <LibWeb/Painting/PaintContext.h>
 #include <LibWeb/UIEvents/MouseEvent.h>
 #include <LibWeb/UIEvents/MouseEvent.h>

+ 1 - 1
Userland/Libraries/LibWeb/Layout/BlockFormattingContext.cpp

@@ -6,6 +6,7 @@
 
 
 #include <LibWeb/CSS/Length.h>
 #include <LibWeb/CSS/Length.h>
 #include <LibWeb/DOM/Node.h>
 #include <LibWeb/DOM/Node.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/BlockFormattingContext.h>
 #include <LibWeb/Layout/BlockFormattingContext.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/Box.h>
@@ -14,7 +15,6 @@
 #include <LibWeb/Layout/ListItemBox.h>
 #include <LibWeb/Layout/ListItemBox.h>
 #include <LibWeb/Layout/ListItemMarkerBox.h>
 #include <LibWeb/Layout/ListItemMarkerBox.h>
 #include <LibWeb/Layout/ReplacedBox.h>
 #include <LibWeb/Layout/ReplacedBox.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Layout/Box.cpp

@@ -7,12 +7,12 @@
 
 
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLBodyElement.h>
 #include <LibWeb/HTML/HTMLBodyElement.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/FormattingContext.h>
 #include <LibWeb/Layout/FormattingContext.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Painting/BackgroundPainting.h>
 #include <LibWeb/Painting/BackgroundPainting.h>
 #include <LibWeb/Painting/BorderPainting.h>
 #include <LibWeb/Painting/BorderPainting.h>
 #include <LibWeb/Painting/ShadowPainting.h>
 #include <LibWeb/Painting/ShadowPainting.h>

+ 1 - 1
Userland/Libraries/LibWeb/Layout/ButtonBox.cpp

@@ -9,9 +9,9 @@
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/ButtonBox.h>
 #include <LibWeb/Layout/ButtonBox.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/Label.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Layout/CheckBox.cpp

@@ -8,9 +8,9 @@
 #include <LibGfx/Font.h>
 #include <LibGfx/Font.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibGfx/StylePainter.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/CheckBox.h>
 #include <LibWeb/Layout/CheckBox.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/Label.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Layout/FrameBox.cpp

@@ -7,9 +7,9 @@
 #include <AK/Debug.h>
 #include <AK/Debug.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/FrameBox.h>
 #include <LibWeb/Layout/FrameBox.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Layout/ImageBox.cpp

@@ -7,8 +7,8 @@
 #include <LibGfx/FontDatabase.h>
 #include <LibGfx/FontDatabase.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibGfx/StylePainter.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/ImageBox.h>
 #include <LibWeb/Layout/ImageBox.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 2 - 2
Userland/Libraries/LibWeb/Layout/ImageBox.h

@@ -6,15 +6,15 @@
 
 
 #pragma once
 #pragma once
 
 
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLImageElement.h>
 #include <LibWeb/HTML/HTMLImageElement.h>
 #include <LibWeb/Layout/ReplacedBox.h>
 #include <LibWeb/Layout/ReplacedBox.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 
 class ImageBox
 class ImageBox
     : public ReplacedBox
     : public ReplacedBox
-    , public BrowsingContext::ViewportClient {
+    , public HTML::BrowsingContext::ViewportClient {
 public:
 public:
     ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>, const ImageLoader&);
     ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>, const ImageLoader&);
     virtual ~ImageBox() override;
     virtual ~ImageBox() override;

+ 1 - 1
Userland/Libraries/LibWeb/Layout/InitialContainingBlock.cpp

@@ -6,8 +6,8 @@
 
 
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Painting/StackingContext.h>
 #include <LibWeb/Painting/StackingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {

+ 1 - 1
Userland/Libraries/LibWeb/Layout/Label.cpp

@@ -9,11 +9,11 @@
 #include <LibGfx/StylePainter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Element.h>
 #include <LibWeb/DOM/Element.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/LabelableNode.h>
 #include <LibWeb/Layout/LabelableNode.h>
 #include <LibWeb/Layout/TextNode.h>
 #include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 3 - 3
Userland/Libraries/LibWeb/Layout/Node.cpp

@@ -9,13 +9,13 @@
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
 #include <LibWeb/HTML/HTMLHtmlElement.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/FormattingContext.h>
 #include <LibWeb/Layout/FormattingContext.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/Node.h>
 #include <LibWeb/Layout/Node.h>
 #include <LibWeb/Layout/TextNode.h>
 #include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <typeinfo>
 #include <typeinfo>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
@@ -91,13 +91,13 @@ HitTestResult Node::hit_test(const Gfx::IntPoint& position, HitTestType type) co
     return result;
     return result;
 }
 }
 
 
-const BrowsingContext& Node::browsing_context() const
+HTML::BrowsingContext const& Node::browsing_context() const
 {
 {
     VERIFY(document().browsing_context());
     VERIFY(document().browsing_context());
     return *document().browsing_context();
     return *document().browsing_context();
 }
 }
 
 
-BrowsingContext& Node::browsing_context()
+HTML::BrowsingContext& Node::browsing_context()
 {
 {
     VERIFY(document().browsing_context());
     VERIFY(document().browsing_context());
     return *document().browsing_context();
     return *document().browsing_context();

+ 2 - 2
Userland/Libraries/LibWeb/Layout/Node.h

@@ -65,8 +65,8 @@ public:
     DOM::Document& document() { return m_document; }
     DOM::Document& document() { return m_document; }
     const DOM::Document& document() const { return m_document; }
     const DOM::Document& document() const { return m_document; }
 
 
-    const BrowsingContext& browsing_context() const;
-    BrowsingContext& browsing_context();
+    HTML::BrowsingContext const& browsing_context() const;
+    HTML::BrowsingContext& browsing_context();
 
 
     const InitialContainingBlock& root() const;
     const InitialContainingBlock& root() const;
     InitialContainingBlock& root();
     InitialContainingBlock& root();

+ 1 - 1
Userland/Libraries/LibWeb/Layout/RadioButton.cpp

@@ -8,9 +8,9 @@
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibGfx/StylePainter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/RadioButton.h>
 #include <LibWeb/Layout/RadioButton.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Layout/TableFormattingContext.cpp

@@ -5,6 +5,7 @@
  */
  */
 
 
 #include <LibWeb/DOM/Node.h>
 #include <LibWeb/DOM/Node.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/Box.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>
 #include <LibWeb/Layout/TableBox.h>
 #include <LibWeb/Layout/TableBox.h>
@@ -12,7 +13,6 @@
 #include <LibWeb/Layout/TableFormattingContext.h>
 #include <LibWeb/Layout/TableFormattingContext.h>
 #include <LibWeb/Layout/TableRowBox.h>
 #include <LibWeb/Layout/TableRowBox.h>
 #include <LibWeb/Layout/TableRowGroupBox.h>
 #include <LibWeb/Layout/TableRowGroupBox.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Layout/TextNode.cpp

@@ -8,11 +8,11 @@
 #include <AK/StringBuilder.h>
 #include <AK/StringBuilder.h>
 #include <LibGfx/Painter.h>
 #include <LibGfx/Painter.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/BlockContainer.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>
 #include <LibWeb/Layout/InlineFormattingContext.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/Label.h>
 #include <LibWeb/Layout/TextNode.h>
 #include <LibWeb/Layout/TextNode.h>
-#include <LibWeb/Page/BrowsingContext.h>
 
 
 namespace Web::Layout {
 namespace Web::Layout {
 
 

+ 2 - 2
Userland/Libraries/LibWeb/Loader/FrameLoader.cpp

@@ -13,18 +13,18 @@
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/ElementFactory.h>
 #include <LibWeb/DOM/ElementFactory.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/HTML/Parser/HTMLParser.h>
 #include <LibWeb/HTML/Parser/HTMLParser.h>
 #include <LibWeb/Loader/FrameLoader.h>
 #include <LibWeb/Loader/FrameLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 
 
 namespace Web {
 namespace Web {
 
 
 static RefPtr<Gfx::Bitmap> s_default_favicon_bitmap;
 static RefPtr<Gfx::Bitmap> s_default_favicon_bitmap;
 
 
-FrameLoader::FrameLoader(BrowsingContext& browsing_context)
+FrameLoader::FrameLoader(HTML::BrowsingContext& browsing_context)
     : m_browsing_context(browsing_context)
     : m_browsing_context(browsing_context)
 {
 {
     if (!s_default_favicon_bitmap) {
     if (!s_default_favicon_bitmap) {

+ 4 - 4
Userland/Libraries/LibWeb/Loader/FrameLoader.h

@@ -23,7 +23,7 @@ public:
         IFrame,
         IFrame,
     };
     };
 
 
-    explicit FrameLoader(BrowsingContext&);
+    explicit FrameLoader(HTML::BrowsingContext&);
     ~FrameLoader();
     ~FrameLoader();
 
 
     bool load(const AK::URL&, Type);
     bool load(const AK::URL&, Type);
@@ -31,8 +31,8 @@ public:
 
 
     void load_html(StringView, const AK::URL&);
     void load_html(StringView, const AK::URL&);
 
 
-    BrowsingContext& browsing_context() { return m_browsing_context; }
-    const BrowsingContext& browsing_context() const { return m_browsing_context; }
+    HTML::BrowsingContext& browsing_context() { return m_browsing_context; }
+    HTML::BrowsingContext const& browsing_context() const { return m_browsing_context; }
 
 
 private:
 private:
     // ^ResourceClient
     // ^ResourceClient
@@ -43,7 +43,7 @@ private:
     void load_favicon(RefPtr<Gfx::Bitmap> bitmap = nullptr);
     void load_favicon(RefPtr<Gfx::Bitmap> bitmap = nullptr);
     bool parse_document(DOM::Document&, const ByteBuffer& data);
     bool parse_document(DOM::Document&, const ByteBuffer& data);
 
 
-    BrowsingContext& m_browsing_context;
+    HTML::BrowsingContext& m_browsing_context;
     size_t m_redirects_count { 0 };
     size_t m_redirects_count { 0 };
 };
 };
 
 

+ 1 - 1
Userland/Libraries/LibWeb/Page/EditEventHandler.cpp

@@ -10,9 +10,9 @@
 #include <LibWeb/DOM/Position.h>
 #include <LibWeb/DOM/Position.h>
 #include <LibWeb/DOM/Range.h>
 #include <LibWeb/DOM/Range.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/LayoutPosition.h>
 #include <LibWeb/Layout/LayoutPosition.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/EditEventHandler.h>
 #include <LibWeb/Page/EditEventHandler.h>
 
 
 namespace Web {
 namespace Web {

+ 2 - 2
Userland/Libraries/LibWeb/Page/EditEventHandler.h

@@ -13,7 +13,7 @@ namespace Web {
 
 
 class EditEventHandler {
 class EditEventHandler {
 public:
 public:
-    explicit EditEventHandler(BrowsingContext& frame)
+    explicit EditEventHandler(HTML::BrowsingContext& frame)
         : m_frame(frame)
         : m_frame(frame)
     {
     {
     }
     }
@@ -25,7 +25,7 @@ public:
     virtual void handle_insert(DOM::Position, u32 code_point);
     virtual void handle_insert(DOM::Position, u32 code_point);
 
 
 private:
 private:
-    BrowsingContext& m_frame;
+    HTML::BrowsingContext& m_frame;
 };
 };
 
 
 }
 }

+ 2 - 2
Userland/Libraries/LibWeb/Page/EventHandler.cpp

@@ -9,11 +9,11 @@
 #include <LibWeb/DOM/Range.h>
 #include <LibWeb/DOM/Range.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Text.h>
 #include <LibWeb/DOM/Window.h>
 #include <LibWeb/DOM/Window.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLAnchorElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/HTML/HTMLIFrameElement.h>
 #include <LibWeb/HTML/HTMLImageElement.h>
 #include <LibWeb/HTML/HTMLImageElement.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <LibWeb/Page/EventHandler.h>
 #include <LibWeb/Page/EventHandler.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/UIEvents/EventNames.h>
 #include <LibWeb/UIEvents/EventNames.h>
@@ -88,7 +88,7 @@ static Gfx::IntPoint compute_mouse_event_offset(const Gfx::IntPoint& position, c
     };
     };
 }
 }
 
 
-EventHandler::EventHandler(Badge<BrowsingContext>, BrowsingContext& frame)
+EventHandler::EventHandler(Badge<HTML::BrowsingContext>, HTML::BrowsingContext& frame)
     : m_frame(frame)
     : m_frame(frame)
     , m_edit_event_handler(make<EditEventHandler>(frame))
     , m_edit_event_handler(make<EditEventHandler>(frame))
 {
 {

+ 2 - 4
Userland/Libraries/LibWeb/Page/EventHandler.h

@@ -17,11 +17,9 @@
 
 
 namespace Web {
 namespace Web {
 
 
-class BrowsingContext;
-
 class EventHandler {
 class EventHandler {
 public:
 public:
-    explicit EventHandler(Badge<BrowsingContext>, BrowsingContext&);
+    explicit EventHandler(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&);
     ~EventHandler();
     ~EventHandler();
 
 
     bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
     bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
@@ -43,7 +41,7 @@ private:
     Layout::InitialContainingBlock* layout_root();
     Layout::InitialContainingBlock* layout_root();
     const Layout::InitialContainingBlock* layout_root() const;
     const Layout::InitialContainingBlock* layout_root() const;
 
 
-    BrowsingContext& m_frame;
+    HTML::BrowsingContext& m_frame;
 
 
     bool m_in_mouse_selection { false };
     bool m_in_mouse_selection { false };
 
 

+ 4 - 4
Userland/Libraries/LibWeb/Page/Page.cpp

@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: BSD-2-Clause
  * SPDX-License-Identifier: BSD-2-Clause
  */
  */
 
 
-#include <LibWeb/Page/BrowsingContext.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Page/Page.h>
 #include <LibWeb/Page/Page.h>
 
 
 namespace Web {
 namespace Web {
@@ -12,21 +12,21 @@ namespace Web {
 Page::Page(PageClient& client)
 Page::Page(PageClient& client)
     : m_client(client)
     : m_client(client)
 {
 {
-    m_top_level_browsing_context = BrowsingContext::create(*this);
+    m_top_level_browsing_context = HTML::BrowsingContext::create(*this);
 }
 }
 
 
 Page::~Page()
 Page::~Page()
 {
 {
 }
 }
 
 
-BrowsingContext& Page::focused_context()
+HTML::BrowsingContext& Page::focused_context()
 {
 {
     if (m_focused_context)
     if (m_focused_context)
         return *m_focused_context;
         return *m_focused_context;
     return top_level_browsing_context();
     return top_level_browsing_context();
 }
 }
 
 
-void Page::set_focused_browsing_context(Badge<EventHandler>, BrowsingContext& browsing_context)
+void Page::set_focused_browsing_context(Badge<EventHandler>, HTML::BrowsingContext& browsing_context)
 {
 {
     m_focused_context = browsing_context.make_weak_ptr();
     m_focused_context = browsing_context.make_weak_ptr();
 }
 }

+ 7 - 7
Userland/Libraries/LibWeb/Page/Page.h

@@ -34,13 +34,13 @@ public:
     PageClient& client() { return m_client; }
     PageClient& client() { return m_client; }
     const PageClient& client() const { return m_client; }
     const PageClient& client() const { return m_client; }
 
 
-    Web::BrowsingContext& top_level_browsing_context() { return *m_top_level_browsing_context; }
-    const Web::BrowsingContext& top_level_browsing_context() const { return *m_top_level_browsing_context; }
+    HTML::BrowsingContext& top_level_browsing_context() { return *m_top_level_browsing_context; }
+    HTML::BrowsingContext const& top_level_browsing_context() const { return *m_top_level_browsing_context; }
 
 
-    Web::BrowsingContext& focused_context();
-    const Web::BrowsingContext& focused_context() const { return const_cast<Page*>(this)->focused_context(); }
+    HTML::BrowsingContext& focused_context();
+    HTML::BrowsingContext const& focused_context() const { return const_cast<Page*>(this)->focused_context(); }
 
 
-    void set_focused_browsing_context(Badge<EventHandler>, BrowsingContext&);
+    void set_focused_browsing_context(Badge<EventHandler>, HTML::BrowsingContext&);
 
 
     void load(const AK::URL&);
     void load(const AK::URL&);
     void load(LoadRequest&);
     void load(LoadRequest&);
@@ -65,8 +65,8 @@ public:
 private:
 private:
     PageClient& m_client;
     PageClient& m_client;
 
 
-    RefPtr<BrowsingContext> m_top_level_browsing_context;
-    WeakPtr<BrowsingContext> m_focused_context;
+    RefPtr<HTML::BrowsingContext> m_top_level_browsing_context;
+    WeakPtr<HTML::BrowsingContext> m_focused_context;
 
 
     // FIXME: Enable this by default once CORS preflight checks are supported.
     // FIXME: Enable this by default once CORS preflight checks are supported.
     bool m_same_origin_policy_enabled { false };
     bool m_same_origin_policy_enabled { false };

+ 1 - 1
Userland/Services/WebContent/ClientConnection.cpp

@@ -18,10 +18,10 @@
 #include <LibWeb/Cookie/ParsedCookie.h>
 #include <LibWeb/Cookie/ParsedCookie.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/DOM/Document.h>
 #include <LibWeb/Dump.h>
 #include <LibWeb/Dump.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Loader/ContentFilter.h>
 #include <LibWeb/Loader/ContentFilter.h>
 #include <LibWeb/Loader/ResourceLoader.h>
 #include <LibWeb/Loader/ResourceLoader.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <WebContent/ClientConnection.h>
 #include <WebContent/ClientConnection.h>
 #include <WebContent/PageHost.h>
 #include <WebContent/PageHost.h>
 #include <WebContent/WebContentClientEndpoint.h>
 #include <WebContent/WebContentClientEndpoint.h>

+ 1 - 1
Userland/Services/WebContent/PageHost.cpp

@@ -10,8 +10,8 @@
 #include <LibGfx/ShareableBitmap.h>
 #include <LibGfx/ShareableBitmap.h>
 #include <LibGfx/SystemTheme.h>
 #include <LibGfx/SystemTheme.h>
 #include <LibWeb/Cookie/ParsedCookie.h>
 #include <LibWeb/Cookie/ParsedCookie.h>
+#include <LibWeb/HTML/BrowsingContext.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
 #include <LibWeb/Layout/InitialContainingBlock.h>
-#include <LibWeb/Page/BrowsingContext.h>
 #include <WebContent/WebContentClientEndpoint.h>
 #include <WebContent/WebContentClientEndpoint.h>
 
 
 namespace WebContent {
 namespace WebContent {