mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #24340 - jdm:image-cache-cors, r=Manishearth
Allow using CORS filtered image responses as WebGL textures More specifically, this makes the "is this image same origin?" check consider the CORS status of the original response, rather than relying on an overly-strict "is this image's response's URL same-origin with a particular global?" check. To do this, we make the image cache double keyed based on the requested URL as well as the requesting origin, and store the CORS status of the eventual response with the final image that eventually gets sent to the HTMLImageElement consumer. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24330 and fix #24368 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24340) <!-- Reviewable:end -->
This commit is contained in:
commit
75548f40c6
109 changed files with 531 additions and 419 deletions
|
@ -159,6 +159,8 @@ impl HTMLVideoElement {
|
|||
let image_cache = window.image_cache();
|
||||
let response = image_cache.find_image_or_metadata(
|
||||
poster_url.clone().into(),
|
||||
window.origin().immutable().clone(),
|
||||
None,
|
||||
UsePlaceholder::No,
|
||||
CanRequestImages::Yes,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue