mirror of
https://github.com/servo/servo.git
synced 2025-07-02 21:13:39 +01:00
Auto merge of #20586 - emilio:moz-gradient-pref, r=xidorn
style: Respect the -moz- gradient pref again. This hopefully allows us to unship them eventually. Bug: 1451874 Reviewed-by: xidorn MozReview-Commit-ID: 2MDRZLmLMM0 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20586) <!-- Reviewable:end -->
This commit is contained in:
commit
954ac8157f
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 {
|
||||
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 shape = match shape {
|
||||
Shape::Linear => GradientKind::parse_linear(context, i, &mut compat_mode)?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue