зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #20586 - style: Respect the -moz- gradient pref again (from emilio:moz-gradient-pref); r=xidorn
This hopefully allows us to unship them eventually. Bug: 1451874 Reviewed-by: xidorn MozReview-Commit-ID: 2MDRZLmLMM0 Source-Repo: https://github.com/servo/servo Source-Revision: 954ac8157f1acac6454ced09bfc948a0bcce75e2 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : d599106eac67425f2e8a2efd245a26fedea223e5
This commit is contained in:
Родитель
9e037b91f8
Коммит
c482852324
|
@ -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)?,
|
||||
|
|
Загрузка…
Ссылка в новой задаче