Add -webkit-prefix for serialization when necessary.

This commit is contained in:
Xidorn Quan 2017-05-23 15:43:03 +10:00
parent edd6c2cecb
commit fc2d167184

View file

@ -128,6 +128,10 @@ impl ToCss for Expression {
where W: fmt::Write,
{
dest.write_str("(")?;
if (self.feature.mReqFlags & nsMediaFeature_RequirementFlags::eHasWebkitPrefix as u8) != 0 {
dest.write_str("-webkit-")?;
}
match self.range {
nsMediaExpression_Range::eMin => dest.write_str("min-")?,
nsMediaExpression_Range::eMax => dest.write_str("max-")?,