diff options
author | elomscansio <163124154+elomscansio@users.noreply.github.com> | 2025-04-24 13:12:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-24 12:12:39 +0000 |
commit | 189214810e034ffa4d4a019d8b6f593a459a19b8 (patch) | |
tree | b6e13c53ece8c1ca6a5a78e4d20190aa5ceb9ffd /components/script/layout_image.rs | |
parent | 878d5950354e3707854f94a409caa99d9ea6ebf8 (diff) | |
download | servo-189214810e034ffa4d4a019d8b6f593a459a19b8.tar.gz servo-189214810e034ffa4d4a019d8b6f593a459a19b8.zip |
layout_image: Include missing request settings in layout-initiated image loads (#36621)
This PR updates the `fetch_image_for_layout` function to include missing
security-related request settings:
- `insecure_requests_policy`
- `has_trustworthy_ancestor_origin`
- `policy_container`
---
<!-- 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 #36591
<!-- Either: -->
- [X] There are tests for these changes
Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
Diffstat (limited to 'components/script/layout_image.rs')
-rw-r--r-- | components/script/layout_image.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/layout_image.rs b/components/script/layout_image.rs index 7fd23804ffd..df542b4b759 100644 --- a/components/script/layout_image.rs +++ b/components/script/layout_image.rs @@ -119,7 +119,10 @@ pub(crate) fn fetch_image_for_layout( ) .origin(document.origin().immutable().clone()) .destination(Destination::Image) - .pipeline_id(Some(document.global().pipeline_id())); + .pipeline_id(Some(document.global().pipeline_id())) + .insecure_requests_policy(document.insecure_requests_policy()) + .has_trustworthy_ancestor_origin(document.has_trustworthy_ancestor_origin()) + .policy_container(document.policy_container().to_owned()); // Layout image loads do not delay the document load event. document.fetch_background(request, context); |