mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #19434 - emilio:moz-document, r=xidorn
style: Disable @-moz-document on author sheets on nightly and early beta. Bug: 1035091 Reviewed-by: xidorn MozReview-Commit-ID: AAUs1jJifjS <!-- 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/19434) <!-- Reviewable:end -->
This commit is contained in:
commit
3b78cf1045
2 changed files with 24 additions and 6 deletions
File diff suppressed because one or more lines are too long
|
@ -424,12 +424,27 @@ impl<'a, 'b, 'i, R: ParseErrorReporter> AtRuleParser<'i> for NestedRuleParser<'a
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"-moz-document" => {
|
"-moz-document" => {
|
||||||
if cfg!(feature = "gecko") {
|
if !cfg!(feature = "gecko") {
|
||||||
let cond = DocumentCondition::parse(self.context, input)?;
|
return Err(input.new_custom_error(
|
||||||
Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Document(cond, location)))
|
StyleParseErrorKind::UnsupportedAtRule(name.clone())
|
||||||
} else {
|
))
|
||||||
Err(input.new_custom_error(StyleParseErrorKind::UnsupportedAtRule(name.clone())))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "gecko")]
|
||||||
|
{
|
||||||
|
use gecko_bindings::structs;
|
||||||
|
|
||||||
|
if self.stylesheet_origin == Origin::Author &&
|
||||||
|
unsafe { !structs::StylePrefs_sMozDocumentEnabledInContent }
|
||||||
|
{
|
||||||
|
return Err(input.new_custom_error(
|
||||||
|
StyleParseErrorKind::UnsupportedAtRule(name.clone())
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let cond = DocumentCondition::parse(self.context, input)?;
|
||||||
|
Ok(AtRuleType::WithBlock(AtRuleBlockPrelude::Document(cond, location)))
|
||||||
},
|
},
|
||||||
_ => Err(input.new_custom_error(StyleParseErrorKind::UnsupportedAtRule(name.clone())))
|
_ => Err(input.new_custom_error(StyleParseErrorKind::UnsupportedAtRule(name.clone())))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue