1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00
serenity/Userland/Libraries/LibWeb/HTML/FrameHostElement.h
Andreas Kling 4190fd2199 LibWeb: Rename Web::Frame to Web::BrowsingContext
Our "frame" concept very closely matches what the web specs call a
"browsing context", so let's rename it to that. :^)

The "main frame" becomes the "top-level browsing context",
and "sub-frames" are now "nested browsing contexts".
2021-05-30 12:39:53 +02:00

34 lines
842 B
C++

/*
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/HTML/HTMLElement.h>
namespace Web::HTML {
class FrameHostElement : public HTMLElement {
public:
FrameHostElement(DOM::Document&, QualifiedName);
virtual ~FrameHostElement() override;
BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; }
const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; }
const DOM::Document* content_document() const;
Origin content_origin() const;
bool may_access_from_origin(const Origin&) const;
void nested_browsing_context_did_load(Badge<FrameLoader>);
virtual void inserted() override;
protected:
RefPtr<BrowsingContext> m_nested_browsing_context;
};
}