aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2018-09-15 19:15:10 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2018-09-15 19:19:18 +0200
commit278ab8613f095418118fc1a91a270a8ddca8880f (patch)
tree3367ef43c6f27bbcfebbf935f28e26d888a124a9
parent8aeaa3fc02a1cd3fc2c7ccde6f9b625b45585b6d (diff)
downloadservo-278ab8613f095418118fc1a91a270a8ddca8880f.tar.gz
servo-278ab8613f095418118fc1a91a270a8ddca8880f.zip
style: Fix servo build and drop a FIXME there.
-rw-r--r--components/style/servo/url.rs12
-rw-r--r--components/style/values/specified/image.rs7
2 files changed, 17 insertions, 2 deletions
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<Self, ParseError<'i>> {
+ 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>,