diff options
author | Sebastian C <sebsebmc@gmail.com> | 2025-04-05 00:38:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-05 05:38:24 +0000 |
commit | 76edcff20262543556f7b14ddbefdf6aaf0059ec (patch) | |
tree | 14d36c0608355be15a3e432e435b5837121a68f5 /components/script/stylesheet_loader.rs | |
parent | 478e876f6d094d889bafb0fea5b0b7b6ebb8d1aa (diff) | |
download | servo-76edcff20262543556f7b14ddbefdf6aaf0059ec.tar.gz servo-76edcff20262543556f7b14ddbefdf6aaf0059ec.zip |
Check all ancestor navigable trustworthiness for mixed content (#36157)
Propagate through documents a flag that represents if any of the
ancestor navigables has a potentially trustworthy origin.
The "potentially trustworthy origin" concept appears to have gotten
confused in a couple of places and we were instead testing if a URL had
"potentially trustworthy" properties.
The main test for the ancestor navigables is
[mixed-content/nested-iframes](https://github.com/web-platform-tests/wpt/blob/master/mixed-content/nested-iframes.window.js)
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #36108
<!-- Either: -->
- [X] There are tests for these changes
---------
Signed-off-by: Sebastian C <sebsebmc@gmail.com>
Diffstat (limited to 'components/script/stylesheet_loader.rs')
-rw-r--r-- | components/script/stylesheet_loader.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/stylesheet_loader.rs b/components/script/stylesheet_loader.rs index 6570c3df284..6290d2709cc 100644 --- a/components/script/stylesheet_loader.rs +++ b/components/script/stylesheet_loader.rs @@ -351,6 +351,7 @@ impl StylesheetLoader<'_> { None, self.elem.global().get_referrer(), document.insecure_requests_policy(), + document.has_trustworthy_ancestor_or_current_origin(), ) .origin(document.origin().immutable().clone()) .pipeline_id(Some(self.elem.global().pipeline_id())) |