LibWeb/HTML: Track secure context as part of Serialized{Document,Worker}

This is somewhat awkward as the spec refers to 'is secure context'
with respect to these objects 'relevant settings object'. A natural
way of implementing this could be storing a pointer to the relevant
settings object like the JS representations of these objects do
(and then changing is_secure_context to accept this representation
too), but for now it seems much simpler to just store a boolean for
this purpose and sidestep both problems above.
This commit is contained in:
Shannon Booth
2026-02-24 21:33:31 +01:00
committed by Shannon Booth
parent cb6a4683ce
commit 025ddd385b
Notes: github-actions[bot] 2026-02-26 06:24:21 +00:00
3 changed files with 22 additions and 7 deletions

View File

@@ -22,6 +22,7 @@ enum class CanUseCrossOriginIsolatedAPIs : u8 {
struct SerializedDocument {
URL::URL url;
bool relevant_settings_object_is_secure_context { false };
};
struct SerializedWindow {
@@ -29,6 +30,7 @@ struct SerializedWindow {
};
struct SerializedWorkerGlobalScope {
bool relevant_settings_object_is_secure_context { false };
};
using SerializedGlobal = Variant<SerializedWindow, SerializedWorkerGlobalScope>;