aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcanvaselement.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-10-03 17:36:02 -0400
committerJosh Matthews <josh@joshmatthews.net>2019-10-04 15:08:40 -0400
commit1df8d57dc6adcf56c22b45053b3d2eca904d17d3 (patch)
treece2ba8d6672925a95d551a0ece8ee9e279332e3e /components/script/dom/htmlcanvaselement.rs
parent583536c9406e685405d5b28da99dd8cab94c7d66 (diff)
downloadservo-1df8d57dc6adcf56c22b45053b3d2eca904d17d3.tar.gz
servo-1df8d57dc6adcf56c22b45053b3d2eca904d17d3.zip
Support CORS attributes for image elements.
Diffstat (limited to 'components/script/dom/htmlcanvaselement.rs')
-rw-r--r--components/script/dom/htmlcanvaselement.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs
index eb62d920ca9..9e638539995 100644
--- a/components/script/dom/htmlcanvaselement.rs
+++ b/components/script/dom/htmlcanvaselement.rs
@@ -442,13 +442,19 @@ pub mod utils {
use crate::dom::window::Window;
use net_traits::image_cache::CanRequestImages;
use net_traits::image_cache::{ImageOrMetadataAvailable, ImageResponse, UsePlaceholder};
+ use net_traits::request::CorsSettings;
use servo_url::ServoUrl;
- pub fn request_image_from_cache(window: &Window, url: ServoUrl) -> ImageResponse {
+ pub fn request_image_from_cache(
+ window: &Window,
+ url: ServoUrl,
+ cors_setting: Option<CorsSettings>,
+ ) -> ImageResponse {
let image_cache = window.image_cache();
let response = image_cache.find_image_or_metadata(
url.into(),
window.origin().immutable().clone(),
+ cors_setting,
UsePlaceholder::No,
CanRequestImages::No,
);