mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
LibWeb: Rename "FrameHostElement" to "BrowsingContextContainer"
With the renaming of "Frame" to "BrowsingContext", this changes "FrameHostElement" to "BrowsingContextContainer" to further match the spec. https://html.spec.whatwg.org/#browsing-context-container
This commit is contained in:
parent
8298e406a4
commit
59cfc4a8db
5 changed files with 16 additions and 16 deletions
|
@ -67,10 +67,10 @@ set(SOURCES
|
||||||
Dump.cpp
|
Dump.cpp
|
||||||
FontCache.cpp
|
FontCache.cpp
|
||||||
HTML/AttributeNames.cpp
|
HTML/AttributeNames.cpp
|
||||||
|
HTML/BrowsingContextContainer.cpp
|
||||||
HTML/CanvasRenderingContext2D.cpp
|
HTML/CanvasRenderingContext2D.cpp
|
||||||
HTML/EventNames.cpp
|
HTML/EventNames.cpp
|
||||||
HTML/FormAssociatedElement.cpp
|
HTML/FormAssociatedElement.cpp
|
||||||
HTML/FrameHostElement.cpp
|
|
||||||
HTML/GlobalEventHandlers.cpp
|
HTML/GlobalEventHandlers.cpp
|
||||||
HTML/HTMLAnchorElement.cpp
|
HTML/HTMLAnchorElement.cpp
|
||||||
HTML/HTMLAreaElement.cpp
|
HTML/HTMLAreaElement.cpp
|
||||||
|
|
|
@ -6,22 +6,22 @@
|
||||||
|
|
||||||
#include <LibWeb/DOM/Document.h>
|
#include <LibWeb/DOM/Document.h>
|
||||||
#include <LibWeb/DOM/Event.h>
|
#include <LibWeb/DOM/Event.h>
|
||||||
#include <LibWeb/HTML/FrameHostElement.h>
|
#include <LibWeb/HTML/BrowsingContextContainer.h>
|
||||||
#include <LibWeb/Origin.h>
|
#include <LibWeb/Origin.h>
|
||||||
#include <LibWeb/Page/BrowsingContext.h>
|
#include <LibWeb/Page/BrowsingContext.h>
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
FrameHostElement::FrameHostElement(DOM::Document& document, QualifiedName qualified_name)
|
BrowsingContextContainer::BrowsingContextContainer(DOM::Document& document, QualifiedName qualified_name)
|
||||||
: HTMLElement(document, move(qualified_name))
|
: HTMLElement(document, move(qualified_name))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FrameHostElement::~FrameHostElement()
|
BrowsingContextContainer::~BrowsingContextContainer()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameHostElement::inserted()
|
void BrowsingContextContainer::inserted()
|
||||||
{
|
{
|
||||||
HTMLElement::inserted();
|
HTMLElement::inserted();
|
||||||
if (!is_connected())
|
if (!is_connected())
|
||||||
|
@ -33,24 +33,24 @@ void FrameHostElement::inserted()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Origin FrameHostElement::content_origin() const
|
Origin BrowsingContextContainer::content_origin() const
|
||||||
{
|
{
|
||||||
if (!m_nested_browsing_context || !m_nested_browsing_context->document())
|
if (!m_nested_browsing_context || !m_nested_browsing_context->document())
|
||||||
return {};
|
return {};
|
||||||
return m_nested_browsing_context->document()->origin();
|
return m_nested_browsing_context->document()->origin();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FrameHostElement::may_access_from_origin(const Origin& origin) const
|
bool BrowsingContextContainer::may_access_from_origin(const Origin& origin) const
|
||||||
{
|
{
|
||||||
return origin.is_same(content_origin());
|
return origin.is_same(content_origin());
|
||||||
}
|
}
|
||||||
|
|
||||||
const DOM::Document* FrameHostElement::content_document() const
|
const DOM::Document* BrowsingContextContainer::content_document() const
|
||||||
{
|
{
|
||||||
return m_nested_browsing_context ? m_nested_browsing_context->document() : nullptr;
|
return m_nested_browsing_context ? m_nested_browsing_context->document() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameHostElement::nested_browsing_context_did_load(Badge<FrameLoader>)
|
void BrowsingContextContainer::nested_browsing_context_did_load(Badge<FrameLoader>)
|
||||||
{
|
{
|
||||||
dispatch_event(DOM::Event::create(EventNames::load));
|
dispatch_event(DOM::Event::create(EventNames::load));
|
||||||
}
|
}
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
class FrameHostElement : public HTMLElement {
|
class BrowsingContextContainer : public HTMLElement {
|
||||||
public:
|
public:
|
||||||
FrameHostElement(DOM::Document&, QualifiedName);
|
BrowsingContextContainer(DOM::Document&, QualifiedName);
|
||||||
virtual ~FrameHostElement() override;
|
virtual ~BrowsingContextContainer() override;
|
||||||
|
|
||||||
BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; }
|
BrowsingContext* nested_browsing_context() { return m_nested_browsing_context; }
|
||||||
const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; }
|
const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; }
|
|
@ -13,7 +13,7 @@
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
HTMLIFrameElement::HTMLIFrameElement(DOM::Document& document, QualifiedName qualified_name)
|
HTMLIFrameElement::HTMLIFrameElement(DOM::Document& document, QualifiedName qualified_name)
|
||||||
: FrameHostElement(document, move(qualified_name))
|
: BrowsingContextContainer(document, move(qualified_name))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ void HTMLIFrameElement::parse_attribute(const FlyString& name, const String& val
|
||||||
|
|
||||||
void HTMLIFrameElement::inserted()
|
void HTMLIFrameElement::inserted()
|
||||||
{
|
{
|
||||||
FrameHostElement::inserted();
|
BrowsingContextContainer::inserted();
|
||||||
if (is_connected())
|
if (is_connected())
|
||||||
load_src(attribute(HTML::AttributeNames::src));
|
load_src(attribute(HTML::AttributeNames::src));
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <LibWeb/HTML/FrameHostElement.h>
|
#include <LibWeb/HTML/BrowsingContextContainer.h>
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
class HTMLIFrameElement final : public FrameHostElement {
|
class HTMLIFrameElement final : public BrowsingContextContainer {
|
||||||
public:
|
public:
|
||||||
using WrapperType = Bindings::HTMLIFrameElementWrapper;
|
using WrapperType = Bindings::HTMLIFrameElementWrapper;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue