mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Implement parsing and serialization for most of image-set().
This implements the basic image-set notation without the format() function (for simplicity). There's a remaining serialization issue (we should probably skip 1x resolutions), but that's fine for now, I'll address this in a follow-up when the feature is testable. The intention is to do the image selection at computed value time (keeping a selected index or such), but same, follow-up. This also fixes an issue where the cors-mode for -moz-image-rect and cross-fade() was getting ignored when parsing. Differential Revision: https://phabricator.services.mozilla.com/D100640
This commit is contained in:
parent
f27003c810
commit
4f28a8cd31
6 changed files with 139 additions and 30 deletions
|
@ -285,14 +285,15 @@ impl SpecifiedImageUrl {
|
|||
|
||||
/// Provides an alternate method for parsing that associates the URL
|
||||
/// with anonymous CORS headers.
|
||||
pub fn parse_with_cors_anonymous<'i, 't>(
|
||||
pub fn parse_with_cors_mode<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
cors_mode: CorsMode,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
Ok(SpecifiedImageUrl(SpecifiedUrl::parse_with_cors_mode(
|
||||
context,
|
||||
input,
|
||||
CorsMode::Anonymous,
|
||||
cors_mode,
|
||||
)?))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue