mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 06:37:52 +00:00
LibWeb: Support the X-Frame-Options header
Navigation responses are now checked for adherence to the `X-Frame-Options` header and an error is shown accordingly.
This commit is contained in:
committed by
Tim Ledbetter
parent
88884c370c
commit
156f9fff32
@@ -5573,6 +5573,18 @@ void Document::reset_cursor_blink_cycle()
|
||||
m_cursor_blink_timer->restart();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/document-sequences.html#doc-container-document
|
||||
GC::Ptr<DOM::Document> Document::container_document() const
|
||||
{
|
||||
// 1. If document's node navigable is null, then return null.
|
||||
auto node_navigable = navigable();
|
||||
if (!node_navigable)
|
||||
return nullptr;
|
||||
|
||||
// 2. Return document's node navigable's container document.
|
||||
return node_navigable->container_document();
|
||||
}
|
||||
|
||||
GC::Ptr<HTML::Navigable> Document::cached_navigable()
|
||||
{
|
||||
return m_cached_navigable.ptr();
|
||||
|
||||
Reference in New Issue
Block a user