1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +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:
Andreas Kling 2021-11-18 15:01:28 +01:00
parent 2b866e3c9b
commit 7c57961c61
43 changed files with 73 additions and 75 deletions

View file

@ -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) {

View file

@ -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 };
};