diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp index 95b354d98d..0b20d84290 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp @@ -60,4 +60,11 @@ const DOM::Document* BrowsingContextContainer::content_document() const return document; } +DOM::Document const* BrowsingContextContainer::content_document_without_origin_check() const +{ + if (!m_nested_browsing_context) + return nullptr; + return m_nested_browsing_context->active_document(); +} + } diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h index 43f17da1a4..11f64a00c9 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h @@ -19,6 +19,7 @@ public: const BrowsingContext* nested_browsing_context() const { return m_nested_browsing_context; } const DOM::Document* content_document() const; + DOM::Document const* content_document_without_origin_check() const; virtual void inserted() override; diff --git a/Userland/Libraries/LibWeb/Layout/FrameBox.cpp b/Userland/Libraries/LibWeb/Layout/FrameBox.cpp index 7adf602918..21c4bf2ff0 100644 --- a/Userland/Libraries/LibWeb/Layout/FrameBox.cpp +++ b/Userland/Libraries/LibWeb/Layout/FrameBox.cpp @@ -36,7 +36,7 @@ void FrameBox::paint(PaintContext& context, PaintPhase phase) ReplacedBox::paint(context, phase); if (phase == PaintPhase::Foreground) { - auto* hosted_document = dom_node().content_document(); + auto* hosted_document = dom_node().content_document_without_origin_check(); if (!hosted_document) return; auto* hosted_layout_tree = hosted_document->layout_node();