mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Don't guard the context opacity keywords with the svg in opentype pref.
This is effectively the stylo version of the second patch for bug 1365926, and should fix bug 1442867.
This commit is contained in:
parent
ce562a2cc6
commit
50a299f82c
1 changed files with 10 additions and 10 deletions
|
@ -113,17 +113,17 @@ impl Parse for SVGStrokeDashArray {
|
|||
pub type SVGOpacity = generic::SVGOpacity<Opacity>;
|
||||
|
||||
impl Parse for SVGOpacity {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<Self, ParseError<'i>> {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(opacity) = input.try(|i| Opacity::parse(context, i)) {
|
||||
Ok(generic::SVGOpacity::Opacity(opacity))
|
||||
} else if is_context_value_enabled() {
|
||||
try_match_ident_ignore_ascii_case! { input,
|
||||
"context-fill-opacity" => Ok(generic::SVGOpacity::ContextFillOpacity),
|
||||
"context-stroke-opacity" => Ok(generic::SVGOpacity::ContextStrokeOpacity),
|
||||
}
|
||||
} else {
|
||||
Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
||||
return Ok(generic::SVGOpacity::Opacity(opacity));
|
||||
}
|
||||
|
||||
try_match_ident_ignore_ascii_case! { input,
|
||||
"context-fill-opacity" => Ok(generic::SVGOpacity::ContextFillOpacity),
|
||||
"context-stroke-opacity" => Ok(generic::SVGOpacity::ContextStrokeOpacity),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue