mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +00:00
LibWeb: Move BrowsingContext into HTML/
Browsing contexts are defined by the HTML specification, so let's move them into the HTML directory. :^)
This commit is contained in:
parent
2b866e3c9b
commit
7c57961c61
43 changed files with 73 additions and 75 deletions
|
@ -29,12 +29,12 @@
|
|||
#include <LibGUI/ToolbarContainer.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/SyntaxHighlighter/SyntaxHighlighter.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/OutOfProcessWebView.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Browser {
|
||||
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventHandler.h>
|
||||
#include <LibWeb/HTML/Scripting/ClassicScript.h>
|
||||
#include <LibWeb/Origin.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/WebAssembly/WebAssemblyObject.h>
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ set(SOURCES
|
|||
Dump.cpp
|
||||
FontCache.cpp
|
||||
HTML/AttributeNames.cpp
|
||||
HTML/BrowsingContext.cpp
|
||||
HTML/BrowsingContextContainer.cpp
|
||||
HTML/CanvasRenderingContext2D.cpp
|
||||
HTML/DOMParser.cpp
|
||||
|
@ -242,7 +243,6 @@ set(SOURCES
|
|||
Namespace.cpp
|
||||
NavigationTiming/PerformanceTiming.cpp
|
||||
OutOfProcessWebView.cpp
|
||||
Page/BrowsingContext.cpp
|
||||
Page/EditEventHandler.cpp
|
||||
Page/EventHandler.cpp
|
||||
Page/Page.cpp
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#include <LibGfx/Rect.h>
|
||||
#include <LibWeb/CSS/Length.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/FontCache.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <LibGfx/Palette.h>
|
||||
#include <LibWeb/CSS/StyleValue.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Loader/LoadRequest.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ class DOMRectReadOnly;
|
|||
}
|
||||
|
||||
namespace Web::HTML {
|
||||
class BrowsingContext;
|
||||
class CanvasRenderingContext2D;
|
||||
class CloseEvent;
|
||||
class DOMParser;
|
||||
|
@ -261,7 +262,6 @@ class TextNode;
|
|||
}
|
||||
|
||||
namespace Web {
|
||||
class BrowsingContext;
|
||||
class EditEventHandler;
|
||||
class EventHandler;
|
||||
class FrameLoader;
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/HTMLCollection.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/Layout/BreakNode.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web {
|
||||
namespace Web::HTML {
|
||||
|
||||
BrowsingContext::BrowsingContext(Page& page, HTML::BrowsingContextContainer* container)
|
||||
: m_page(page)
|
|
@ -20,7 +20,7 @@
|
|||
#include <LibWeb/Page/EventHandler.h>
|
||||
#include <LibWeb/TreeNode.h>
|
||||
|
||||
namespace Web {
|
||||
namespace Web::HTML {
|
||||
|
||||
class BrowsingContext : public TreeNode<BrowsingContext> {
|
||||
public:
|
||||
|
@ -60,8 +60,8 @@ public:
|
|||
FrameLoader& loader() { 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&);
|
||||
|
||||
|
@ -112,7 +112,7 @@ private:
|
|||
WeakPtr<Page> m_page;
|
||||
|
||||
FrameLoader m_loader;
|
||||
EventHandler m_event_handler;
|
||||
Web::EventHandler m_event_handler;
|
||||
|
||||
WeakPtr<HTML::BrowsingContextContainer> m_container;
|
||||
RefPtr<DOM::Document> m_active_document;
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/BrowsingContextContainer.h>
|
||||
#include <LibWeb/Origin.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventLoop/EventLoop.h>
|
||||
#include <LibWeb/HighResolutionTime/Performance.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/HTML/HTMLFormElement.h>
|
||||
#include <LibWeb/HTML/HTMLInputElement.h>
|
||||
#include <LibWeb/HTML/SubmitEvent.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/URL/URL.h>
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLIFrameElement.h>
|
||||
#include <LibWeb/Layout/FrameBox.h>
|
||||
#include <LibWeb/Origin.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/ShadowRoot.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/HTML/HTMLFormElement.h>
|
||||
#include <LibWeb/HTML/HTMLInputElement.h>
|
||||
|
@ -15,7 +16,6 @@
|
|||
#include <LibWeb/Layout/ButtonBox.h>
|
||||
#include <LibWeb/Layout/CheckBox.h>
|
||||
#include <LibWeb/Layout/RadioButton.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
#include <LibGUI/Scrollbar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/ShareableBitmap.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||
#include <LibWeb/InProcessWebView.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/EventHandler.h>
|
||||
#include <LibWeb/Painting/PaintContext.h>
|
||||
#include <LibWeb/UIEvents/MouseEvent.h>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <LibWeb/CSS/Length.h>
|
||||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Layout/BlockFormattingContext.h>
|
||||
#include <LibWeb/Layout/Box.h>
|
||||
|
@ -14,7 +15,6 @@
|
|||
#include <LibWeb/Layout/ListItemBox.h>
|
||||
#include <LibWeb/Layout/ListItemMarkerBox.h>
|
||||
#include <LibWeb/Layout/ReplacedBox.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLBodyElement.h>
|
||||
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Layout/Box.h>
|
||||
#include <LibWeb/Layout/FormattingContext.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Painting/BackgroundPainting.h>
|
||||
#include <LibWeb/Painting/BorderPainting.h>
|
||||
#include <LibWeb/Painting/ShadowPainting.h>
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <LibGfx/Painter.h>
|
||||
#include <LibGfx/StylePainter.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/ButtonBox.h>
|
||||
#include <LibWeb/Layout/Label.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#include <LibGfx/Font.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <LibGfx/StylePainter.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/CheckBox.h>
|
||||
#include <LibWeb/Layout/Label.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include <AK/Debug.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/FrameBox.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include <LibGfx/FontDatabase.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <LibGfx/StylePainter.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/ImageBox.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLImageElement.h>
|
||||
#include <LibWeb/Layout/ReplacedBox.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
class ImageBox
|
||||
: public ReplacedBox
|
||||
, public BrowsingContext::ViewportClient {
|
||||
, public HTML::BrowsingContext::ViewportClient {
|
||||
public:
|
||||
ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>, const ImageLoader&);
|
||||
virtual ~ImageBox() override;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Painting/StackingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
#include <LibGfx/StylePainter.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Layout/Label.h>
|
||||
#include <LibWeb/Layout/LabelableNode.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
#include <LibGfx/Painter.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLHtmlElement.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Layout/FormattingContext.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Layout/Node.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
@ -91,13 +91,13 @@ HitTestResult Node::hit_test(const Gfx::IntPoint& position, HitTestType type) co
|
|||
return result;
|
||||
}
|
||||
|
||||
const BrowsingContext& Node::browsing_context() const
|
||||
HTML::BrowsingContext const& Node::browsing_context() const
|
||||
{
|
||||
VERIFY(document().browsing_context());
|
||||
return *document().browsing_context();
|
||||
}
|
||||
|
||||
BrowsingContext& Node::browsing_context()
|
||||
HTML::BrowsingContext& Node::browsing_context()
|
||||
{
|
||||
VERIFY(document().browsing_context());
|
||||
return *document().browsing_context();
|
||||
|
|
|
@ -65,8 +65,8 @@ public:
|
|||
DOM::Document& document() { 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;
|
||||
InitialContainingBlock& root();
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#include <LibGfx/Painter.h>
|
||||
#include <LibGfx/StylePainter.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/Label.h>
|
||||
#include <LibWeb/Layout/RadioButton.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/Box.h>
|
||||
#include <LibWeb/Layout/InlineFormattingContext.h>
|
||||
#include <LibWeb/Layout/TableBox.h>
|
||||
|
@ -12,7 +13,6 @@
|
|||
#include <LibWeb/Layout/TableFormattingContext.h>
|
||||
#include <LibWeb/Layout/TableRowBox.h>
|
||||
#include <LibWeb/Layout/TableRowGroupBox.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#include <AK/StringBuilder.h>
|
||||
#include <LibGfx/Painter.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/BlockContainer.h>
|
||||
#include <LibWeb/Layout/InlineFormattingContext.h>
|
||||
#include <LibWeb/Layout/Label.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
|
||||
namespace Web::Layout {
|
||||
|
||||
|
|
|
@ -13,18 +13,18 @@
|
|||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLIFrameElement.h>
|
||||
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||
#include <LibWeb/Loader/FrameLoader.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web {
|
||||
|
||||
static RefPtr<Gfx::Bitmap> s_default_favicon_bitmap;
|
||||
|
||||
FrameLoader::FrameLoader(BrowsingContext& browsing_context)
|
||||
FrameLoader::FrameLoader(HTML::BrowsingContext& browsing_context)
|
||||
: m_browsing_context(browsing_context)
|
||||
{
|
||||
if (!s_default_favicon_bitmap) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
IFrame,
|
||||
};
|
||||
|
||||
explicit FrameLoader(BrowsingContext&);
|
||||
explicit FrameLoader(HTML::BrowsingContext&);
|
||||
~FrameLoader();
|
||||
|
||||
bool load(const AK::URL&, Type);
|
||||
|
@ -31,8 +31,8 @@ public:
|
|||
|
||||
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:
|
||||
// ^ResourceClient
|
||||
|
@ -43,7 +43,7 @@ private:
|
|||
void load_favicon(RefPtr<Gfx::Bitmap> bitmap = nullptr);
|
||||
bool parse_document(DOM::Document&, const ByteBuffer& data);
|
||||
|
||||
BrowsingContext& m_browsing_context;
|
||||
HTML::BrowsingContext& m_browsing_context;
|
||||
size_t m_redirects_count { 0 };
|
||||
};
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <LibWeb/DOM/Position.h>
|
||||
#include <LibWeb/DOM/Range.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Layout/LayoutPosition.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/EditEventHandler.h>
|
||||
|
||||
namespace Web {
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Web {
|
|||
|
||||
class EditEventHandler {
|
||||
public:
|
||||
explicit EditEventHandler(BrowsingContext& frame)
|
||||
explicit EditEventHandler(HTML::BrowsingContext& frame)
|
||||
: m_frame(frame)
|
||||
{
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public:
|
|||
virtual void handle_insert(DOM::Position, u32 code_point);
|
||||
|
||||
private:
|
||||
BrowsingContext& m_frame;
|
||||
HTML::BrowsingContext& m_frame;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
#include <LibWeb/DOM/Range.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/HTML/HTMLIFrameElement.h>
|
||||
#include <LibWeb/HTML/HTMLImageElement.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/Page/EventHandler.h>
|
||||
#include <LibWeb/Page/Page.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_edit_event_handler(make<EditEventHandler>(frame))
|
||||
{
|
||||
|
|
|
@ -17,11 +17,9 @@
|
|||
|
||||
namespace Web {
|
||||
|
||||
class BrowsingContext;
|
||||
|
||||
class EventHandler {
|
||||
public:
|
||||
explicit EventHandler(Badge<BrowsingContext>, BrowsingContext&);
|
||||
explicit EventHandler(Badge<HTML::BrowsingContext>, HTML::BrowsingContext&);
|
||||
~EventHandler();
|
||||
|
||||
bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
|
@ -43,7 +41,7 @@ private:
|
|||
Layout::InitialContainingBlock* layout_root();
|
||||
const Layout::InitialContainingBlock* layout_root() const;
|
||||
|
||||
BrowsingContext& m_frame;
|
||||
HTML::BrowsingContext& m_frame;
|
||||
|
||||
bool m_in_mouse_selection { false };
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
namespace Web {
|
||||
|
@ -12,21 +12,21 @@ namespace Web {
|
|||
Page::Page(PageClient& client)
|
||||
: m_client(client)
|
||||
{
|
||||
m_top_level_browsing_context = BrowsingContext::create(*this);
|
||||
m_top_level_browsing_context = HTML::BrowsingContext::create(*this);
|
||||
}
|
||||
|
||||
Page::~Page()
|
||||
{
|
||||
}
|
||||
|
||||
BrowsingContext& Page::focused_context()
|
||||
HTML::BrowsingContext& Page::focused_context()
|
||||
{
|
||||
if (m_focused_context)
|
||||
return *m_focused_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();
|
||||
}
|
||||
|
|
|
@ -34,13 +34,13 @@ public:
|
|||
PageClient& client() { 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(LoadRequest&);
|
||||
|
@ -65,8 +65,8 @@ public:
|
|||
private:
|
||||
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.
|
||||
bool m_same_origin_policy_enabled { false };
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Loader/ContentFilter.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <WebContent/ClientConnection.h>
|
||||
#include <WebContent/PageHost.h>
|
||||
#include <WebContent/WebContentClientEndpoint.h>
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include <LibGfx/ShareableBitmap.h>
|
||||
#include <LibGfx/SystemTheme.h>
|
||||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
#include <LibWeb/HTML/BrowsingContext.h>
|
||||
#include <LibWeb/Layout/InitialContainingBlock.h>
|
||||
#include <LibWeb/Page/BrowsingContext.h>
|
||||
#include <WebContent/WebContentClientEndpoint.h>
|
||||
|
||||
namespace WebContent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue