mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Respect the -moz- gradient pref again.
This hopefully allows us to unship them eventually. Bug: 1451874 Reviewed-by: xidorn MozReview-Commit-ID: 2MDRZLmLMM0
This commit is contained in:
parent
ccc9d1c4c2
commit
3927b3453a
1 changed files with 13 additions and 1 deletions
|
@ -227,9 +227,21 @@ impl Parse for Gradient {
|
||||||
|
|
||||||
let (shape, repeating, mut compat_mode) = match result {
|
let (shape, repeating, mut compat_mode) = match result {
|
||||||
Some(result) => result,
|
Some(result) => result,
|
||||||
None => return Err(input.new_custom_error(StyleParseErrorKind::UnexpectedFunction(func.clone()))),
|
None => return Err(input.new_custom_error(StyleParseErrorKind::UnexpectedFunction(func))),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
|
{
|
||||||
|
use gecko_bindings::structs;
|
||||||
|
if compat_mode == CompatMode::Moz &&
|
||||||
|
!unsafe { structs::StaticPrefs_sVarCache_layout_css_prefixes_gradients }
|
||||||
|
{
|
||||||
|
return Err(input.new_custom_error(
|
||||||
|
StyleParseErrorKind::UnexpectedFunction(func)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let (kind, items) = input.parse_nested_block(|i| {
|
let (kind, items) = input.parse_nested_block(|i| {
|
||||||
let shape = match shape {
|
let shape = match shape {
|
||||||
Shape::Linear => GradientKind::parse_linear(context, i, &mut compat_mode)?,
|
Shape::Linear => GradientKind::parse_linear(context, i, &mut compat_mode)?,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue