diff --git a/components/style/servo/url.rs b/components/style/servo/url.rs index b4821f21e66..91521c8a120 100644 --- a/components/style/servo/url.rs +++ b/components/style/servo/url.rs @@ -98,6 +98,18 @@ impl CssUrl { resolved: ServoUrl::parse(url).ok(), } } + + /// Parses a URL request and records that the corresponding request needs to + /// be CORS-enabled. + /// + /// This is only for shape images and masks in Gecko, thus unimplemented for + /// now so somebody notices when trying to do so. + pub fn parse_with_cors_anonymous<'i, 't>( + _context: &ParserContext, + _input: &mut Parser<'i, 't>, + ) -> Result> { + unimplemented!("Need to record somewhere that the request needs to be CORS-enabled") + } } impl Parse for CssUrl { diff --git a/components/style/values/specified/image.rs b/components/style/values/specified/image.rs index 2eabb452f02..1b080816e83 100644 --- a/components/style/values/specified/image.rs +++ b/components/style/values/specified/image.rs @@ -167,8 +167,11 @@ impl Image { }) } - /// Provides an alternate method for parsing that associates the URL - /// with anonymous CORS headers. + /// Provides an alternate method for parsing that associates the URL with + /// anonymous CORS headers. + /// + /// FIXME(emilio): It'd be nicer for this to pass a `CorsMode` parameter to + /// a shared function instead. pub fn parse_with_cors_anonymous<'i, 't>( context: &ParserContext, input: &mut Parser<'i, 't>,