From b27f855107cbd77e57a18a0d5be42a6795858ea3 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 15 Nov 2022 01:57:10 +0200 Subject: [PATCH] LibWeb: Add the 'is popup' BrowsingContext property This will also be used by the window.open algorithm steps. --- Userland/Libraries/LibWeb/HTML/BrowsingContext.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h index 6ac3a860de..27a8763690 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h @@ -241,6 +241,8 @@ public: VisibilityState system_visibility_state() const; void set_system_visibility_state(VisibilityState); + void set_is_popup(bool is_popup) { m_is_popup = is_popup; } + // https://html.spec.whatwg.org/multipage/window-object.html#a-browsing-context-is-discarded void discard(); bool has_been_discarded() const { return m_has_been_discarded; } @@ -298,6 +300,9 @@ private: // https://html.spec.whatwg.org/multipage/browsers.html#tlbc-group JS::GCPtr m_group; + // https://html.spec.whatwg.org/multipage/browsers.html#is-popup + bool m_is_popup { false }; + // https://html.spec.whatwg.org/multipage/interaction.html#system-visibility-state VisibilityState m_system_visibility_state { VisibilityState::Hidden };