This commit is contained in:
elomscansio 2025-06-03 16:01:07 +02:00 committed by GitHub
commit 8dbcb49906
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 133 additions and 60 deletions

View file

@ -4299,7 +4299,14 @@ impl Document {
}
pub(crate) fn set_csp_list(&self, csp_list: Option<CspList>) {
self.policy_container.borrow_mut().set_csp_list(csp_list);
if let Some(new_list) = csp_list {
let mut current = self.get_csp_list();
match current {
Some(ref mut existing) => existing.append(new_list),
None => current = Some(new_list),
}
self.policy_container.borrow_mut().set_csp_list(current);
}
}
pub(crate) fn get_csp_list(&self) -> Option<CspList> {